Goatlab API Docs

Get a list of files

GET
/v1/files

Retrieves a list of files for the specified user. The response will include metadata about each file, such as its ID, name, and upload date.

The files will be returned in a paginated format, with the specified page and limit parameters controlling the results.

Results can be sorted using sortBy and sortOrder.

Authorization

ApiTokenAuth PRODUCT
x-api-key<token>

API Key with role based permission

In: header

Scope: PRODUCT

Query Parameters

page?integer

The page number to retrieve

limit?integer

The number of files to retrieve per page

sortBy?string

Field to sort by

sortOrder?string

Sort order (ascending or descending)

status?string

Filters files by processing status. Defaults to successful, which only returns files that finished processing and passed the antivirus scan.

  • successful: files that have been processed and did not fail the antivirus scan
  • failed: files whose processing failed
  • processing: files currently being scanned or processed
  • pending_upload: files that have not been uploaded yet
  • all: files regardless of processing or antivirus status
persistence?string

Filters files by persistence. Defaults to persistent, which only returns files that do not have an expiration date.

  • persistent: files with no expiration date
  • temporal: files that have an expiration date
  • all: files regardless of expiration date

Header Parameters

x-user-id*string

The ID of the user requesting the file

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/files" \  -H "x-user-id: string"
{
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "originalName": "document.pdf",
      "size": 204800,
      "processingStatus": "PROCESSED",
      "createdAt": "2026-01-05T10:30:00.000Z",
      "updatedAt": "2026-01-05T10:30:00.000Z",
      "ownerId": "user-123",
      "summary": "Quarterly financial overview for Q3 2025.",
      "language": "en",
      "domain": "Finance",
      "documentKind": "Report",
      "extractionStatus": "completed",
      "tags": [
        {
          "key": "author",
          "value": "Jane Doe",
          "aiExtracted": true
        }
      ],
      "warnings": {
        "length": false,
        "infected": false,
        "empty": false,
        "images": false
      },
      "chunksCount": 12,
      "charactersCount": 15240
    }
  ],
  "limit": 30,
  "page": 1,
  "total": 1
}
{
  "message": "Invalid parameters"
}
{
  "message": "Invalid API Key"
}
{
  "message": "Internal Server Error"
}