Logo ExelensiaExelensia/Docs
Getting Started
  • Introduction
API Reference
  • Schemas
  • Templates
  • Upload
  • Process
  • Files
  • Results
  • Exports

Files

The Files API allows you to list and delete files that have been uploaded to your team. Files are created by the Upload API and are referenced in process jobs. Deleting a file removes it from storage and cannot be undone.

Endpoints

GET /v1/files

Returns a paginated list of files belonging to your team.

Query Parameters

ParameterTypeRequiredDefaultDescription
pagenumberNo1Page number (min: 1)
limitnumberNo20Items per page (min: 1, max: 100)
sort_bystringNo—Field to sort by (e.g. createdAt, filename)
sort_orderstringNodescSort direction: asc or desc
searchstringNo—Filter by filename
created_afterstringNo—ISO 8601 date — return files uploaded after this date
created_beforestringNo—ISO 8601 date — return files uploaded before this date
fieldsstringNo—Comma-separated list of fields to return
includestringNo—Related resources to include

Request

Bash
curl -H "x-api-key: your_api_key_here" \
  "https://api.exelensia.com/v1/files?page=1&limit=20"

Response

JSON
{
  "data": [
    {
      "id": "019760a0-0020-7000-8000-000000000020",
      "filename": "invoice_2024_01.pdf",
      "mimetype": "application/pdf",
      "bytes": 245760,
      "status": "READY",
      "createdAt": "2024-01-16T09:00:00.000Z",
      "updatedAt": "2024-01-16T09:00:15.000Z"
    },
    {
      "id": "019760a0-0021-7000-8000-000000000021",
      "filename": "contract_q1.docx",
      "mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      "bytes": 87040,
      "status": "READY",
      "createdAt": "2024-01-16T08:30:00.000Z",
      "updatedAt": "2024-01-16T08:30:10.000Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 2,
    "totalPages": 1
  }
}

File Status Values

StatusDescription
PENDINGUpload initiated, waiting for confirmation
READYFile uploaded successfully and available for processing
FAILEDUpload failed

Status Codes

StatusDescription
200Success
401Missing or invalid authentication

DELETE /v1/files/:id

Deletes a file by ID. This removes the file record and its stored content permanently. This action cannot be undone.

Warning: Deleting a file that has associated process jobs will not delete those jobs or their results. Existing results remain accessible.

Path Parameters

ParameterTypeRequiredDescription
idstringYesFile UUID

Request

Bash
curl -X DELETE \
  -H "x-api-key: your_api_key_here" \
  "https://api.exelensia.com/v1/files/019760a0-0020-7000-8000-000000000020"

Response

JSON
{
  "message": "File deleted successfully"
}

Status Codes

StatusDescription
200File deleted
401Missing or invalid authentication
404File not found

On this page

  • Endpoints
  • GET /v1/files
  • DELETE /v1/files/:id