# Introduction to the Anesya API 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 {% admonition type="info" name="Create an API Token" %} To start using the Anesya API, you first need to [create an API token](/tutorials/api_key). {% /admonition %} The API is secured using an **API authentication token**, which must be included in the `Authorization` header of each request. ```http Authorization: ```` > 📌 **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 Code | Description | | --------- | ------------------------------- | | `200` | Everything worked fine | | `201` | Resource successfully created | | `202` | Resource accepted but not ready | | `400` | Missing or invalid fields | | `401` | Missing or invalid token | | `403` | Insufficient credits | | `404` | Resource not found | --- ## Additional resources * [Create an extraction](#operation/extract_create) * [List Schemas](#operation/schema_list) --- Need help? Contact us at [support@anesya.app](mailto:support@anesya.app).
Happy integrating! Version: 0.8.1 ## Servers Serveur Anesya ``` https://api.anesya.app ``` ## Security ### tokenAuth Type: apiKey In: header Name: Authorization ## Download OpenAPI description [Introduction to the Anesya API](https://docs.anesya.app/_spec/API/schema.yaml) ## Extracts Groups all endpoints related to extractions: - Create an extraction - Delete an extraction - Get extraction details - List all existing extractions ### List all extracts - [GET /extract/](https://docs.anesya.app/api/schema/extracts/extract_list.md): Fetch a list of all available extractions. ### Creates a new extraction. - [POST /extract/](https://docs.anesya.app/api/schema/extracts/extract_create.md): Creates a new extraction with or without a theme (extraction schema). ### Extraction details - [GET /extract/{id}/](https://docs.anesya.app/api/schema/extracts/extract_retrieve.md): Extraction details. ### Delete an extraction - [DELETE /extract/{id}/](https://docs.anesya.app/api/schema/extracts/extract_destroy.md): ⚠️ Permanently delete an extraction. ## Schemas Groups all endpoints related to extraction schema management: - List all schemas - Create new schema - Retrieve a schema - Update a schema - Delete a schema ### List all schemas - [GET /schema/](https://docs.anesya.app/api/schema/schemas/schema_list.md): Retrieve a paginated list of all available schemas. ### Create new schema - [POST /schema/](https://docs.anesya.app/api/schema/schemas/schema_create.md): 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. ### Retrieve a schema - [GET /schema/{id}/](https://docs.anesya.app/api/schema/schemas/schema_retrieve.md): Get the details of a specific extract schema by its ID. ### Update a schema - [PUT /schema/{id}/](https://docs.anesya.app/api/schema/schemas/schema_update.md): Update an existing extract schema by its ID. ### Delete a schema - [DELETE /schema/{id}/](https://docs.anesya.app/api/schema/schemas/schema_destroy.md): Permanently delete an extract schema by its ID. ## Workflows Groups all endpoints related to workflow management: - Create a workflow extract ### Create an extract from a workflow - [POST /workflow/{id}/extract/](https://docs.anesya.app/api/schema/workflows/workflow_extract_create.md): Upload a document to create a new extract associated with a specific workflow.