Skip to content

Introduction to the Anesya API (0.8.1)

Welcome to the official Anesya API documentation.
This API allows you to interact with Anesya’s backend to create smart document extractions and retrieve structured data from them.


Authentication

Create an API Token

To start using the Anesya API, you first need to create an API token.

The API is secured using an API authentication token, which must be included in the Authorization header of each request.

Authorization: <YOUR_API_KEY>

📌 Important: Do not share your tokens and never commit them to GitHub.

You can create your token on this page of the Anesya App. Each token has a defined lifetime: 1m, 3m, 6m, or inf (unlimited).


Endpoint

The API is accessible at the following environment:

  • https://api.anesya.app/

📌 Important: Always include a trailing / at the end of each API URL.


Common error codes

HTTP CodeDescription
200Everything worked fine
201Resource successfully created
202Resource accepted but not ready
400Missing or invalid fields
401Missing or invalid token
403Insufficient credits
404Resource not found

Additional resources


Need help? Contact us at support@anesya.app.
Happy integrating!

Download OpenAPI description
Languages
Servers
Serveur Anesya

https://api.anesya.app/

Operations
Operations

Request

Retrieve a paginated list of all available schemas.

Security
tokenAuth
Query
pageinteger

Page number (starts at 1).

Default 1
sizeinteger

Number of items per page.

Default 50
curl -i -X GET \
  'https://api.anesya.app/schema/?page=1&size=50' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

A paginated list of extract schemas.

Bodyapplication/json
countintegerrequired
Example: 50
nextstring or nullrequired
Example: "https://api.anesya.app/schema/?page=3&size=50"
previousstring or nullrequired
Example: "https://api.anesya.app/schema/?page=1&size=50"
resultsArray of objects(ExtractSchema)required
results[].​idstring(uuid)read-onlyrequired
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
results[].​namestring<= 200 charactersrequired
Example: "Invoice schema"
results[].​descriptionstringrequired
Example: "Schema used for extracting data from customs invoices"
results[].​additional_informationsstring or null

Free-form context to help the AI interpret the document (business jargon, abbreviations, locale/date/currency formats, vendor aliases, layout quirks). Use this when relevant details are missing from the file itself.

Example: "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n"
results[].​schemaobject or nullrequired

Schema definition in OpenAPI JSON format

results[].​created_atstring(date-time)read-only
Example: "2025-06-12T14:56:10.682461Z"
results[].​updated_atstring(date-time)read-only
Example: "2025-06-12T14:56:10.682461Z"
Response
application/json
{ "count": 50, "next": "https://api.anesya.app/schema/?page=3&size=50", "previous": "https://api.anesya.app/schema/?page=1&size=50", "results": [ { … } ] }

Request

Create a new extraction schema.

If you're unsure how to structure your schema, check out the guide : How to Build a JSON Extraction Schema.

Security
tokenAuth
Bodyapplication/jsonrequired
namestring<= 200 charactersrequired
Example: "Invoice schema"
descriptionstringrequired
Example: "Schema used for extracting data from customs invoices"
additional_informationsstring or null

Free-form context to help the AI interpret the document (business jargon, abbreviations, locale/date/currency formats, vendor aliases, layout quirks). Use this when relevant details are missing from the file itself.

Example: "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n"
schemaobject or nullrequired

Schema definition in OpenAPI JSON format

curl -i -X POST \
  https://api.anesya.app/schema/ \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Invoice schema",
    "description": "Schema used for extracting data from customs invoices",
    "additional_informations": "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n",
    "schema": {}
  }'

Responses

Extract schema successfully created.

Bodyapplication/json
idstring(uuid)read-onlyrequired
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
namestring<= 200 charactersrequired
Example: "Invoice schema"
descriptionstringrequired
Example: "Schema used for extracting data from customs invoices"
additional_informationsstring or null

Free-form context to help the AI interpret the document (business jargon, abbreviations, locale/date/currency formats, vendor aliases, layout quirks). Use this when relevant details are missing from the file itself.

Example: "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n"
schemaobject or nullrequired

Schema definition in OpenAPI JSON format

created_atstring(date-time)read-only
Example: "2025-06-12T14:56:10.682461Z"
updated_atstring(date-time)read-only
Example: "2025-06-12T14:56:10.682461Z"
Response
application/json
{ "id": "300f339f-da71-4f9f-80f6-c25a63baae75", "name": "Invoice schema", "description": "Schema used for extracting data from customs invoices", "additional_informations": "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n", "schema": {}, "created_at": "2025-06-12T14:56:10.682461Z", "updated_at": "2025-06-12T14:56:10.682461Z" }

Request

Get the details of a specific extract schema by its ID.

Security
tokenAuth
Path
idstringrequired

The UUID of the extract schema.

curl -i -X GET \
  'https://api.anesya.app/schema/{id}/' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Extract schema details.

Bodyapplication/json
idstring(uuid)read-onlyrequired
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
namestring<= 200 charactersrequired
Example: "Invoice schema"
descriptionstringrequired
Example: "Schema used for extracting data from customs invoices"
additional_informationsstring or null

Free-form context to help the AI interpret the document (business jargon, abbreviations, locale/date/currency formats, vendor aliases, layout quirks). Use this when relevant details are missing from the file itself.

Example: "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n"
schemaobject or nullrequired

Schema definition in OpenAPI JSON format

created_atstring(date-time)read-only
Example: "2025-06-12T14:56:10.682461Z"
updated_atstring(date-time)read-only
Example: "2025-06-12T14:56:10.682461Z"
Response
application/json
{ "id": "300f339f-da71-4f9f-80f6-c25a63baae75", "name": "Invoice schema", "description": "Schema used for extracting data from customs invoices", "additional_informations": "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n", "schema": {}, "created_at": "2025-06-12T14:56:10.682461Z", "updated_at": "2025-06-12T14:56:10.682461Z" }

Request

Update an existing extract schema by its ID.

Security
tokenAuth
Path
idstringrequired

The UUID of the extract schema.

Bodyrequired
namestring<= 200 charactersrequired
Example: "Invoice schema"
descriptionstringrequired
Example: "Schema used for extracting data from customs invoices"
additional_informationsstring or null

Free-form context to help the AI interpret the document (business jargon, abbreviations, locale/date/currency formats, vendor aliases, layout quirks). Use this when relevant details are missing from the file itself.

Example: "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n"
schemaobject or nullrequired

Schema definition in OpenAPI JSON format

curl -i -X PUT \
  'https://api.anesya.app/schema/{id}/' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Invoice schema",
    "description": "Schema used for extracting data from customs invoices",
    "additional_informations": "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n",
    "schema": {}
  }'

Responses

Extract schema successfully updated.

Bodyapplication/json
idstring(uuid)read-onlyrequired
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
namestring<= 200 charactersrequired
Example: "Invoice schema"
descriptionstringrequired
Example: "Schema used for extracting data from customs invoices"
additional_informationsstring or null

Free-form context to help the AI interpret the document (business jargon, abbreviations, locale/date/currency formats, vendor aliases, layout quirks). Use this when relevant details are missing from the file itself.

Example: "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n"
schemaobject or nullrequired

Schema definition in OpenAPI JSON format

created_atstring(date-time)read-only
Example: "2025-06-12T14:56:10.682461Z"
updated_atstring(date-time)read-only
Example: "2025-06-12T14:56:10.682461Z"
Response
application/json
{ "id": "300f339f-da71-4f9f-80f6-c25a63baae75", "name": "Invoice schema", "description": "Schema used for extracting data from customs invoices", "additional_informations": "Common abbreviations: \"CB\" = credit card, \"TVA\" = VAT. Amounts use a comma as the decimal separator.\n", "schema": {}, "created_at": "2025-06-12T14:56:10.682461Z", "updated_at": "2025-06-12T14:56:10.682461Z" }

Request

Permanently delete an extract schema by its ID.

Security
tokenAuth
Path
idstringrequired

The UUID of the extract schema.

curl -i -X DELETE \
  'https://api.anesya.app/schema/{id}/' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Schema successfully deleted. No content returned.

Response
No content

Workflows

Groups all endpoints related to workflow management:

Operations