> ## Documentation Index
> Fetch the complete documentation index at: https://docs.matil.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Deployments

> A stable entry point to process documents — linking your API calls to a specific structure version.

A **deployment** connects a structure to a stable ID that you use in API calls. Instead of passing configuration in every request, you point to a deployment and Matil knows exactly what to do.

## Why deployments?

Deployments give you a layer of indirection that makes your integration more robust:

* **Update without code changes.** Publish a new structure version and assign it to the deployment. Your API calls don't change.
* **Separate environments.** Use different deployments for development, staging, and production — each pointing to the right structure version.
* **Track history.** Every time you change which structure version a deployment uses, it's recorded.

## What's inside a deployment?

| Component         | Description                                                           |
| ----------------- | --------------------------------------------------------------------- |
| **Deployment ID** | A unique UUID you use in API calls.                                   |
| **Structure**     | The structure (and version) that this deployment uses for processing. |
| **Name**          | A human-readable label for your reference.                            |

<Note>
  Deployments are created and managed in the [Matil Dashboard](https://admin.matil.ai). The API is used to process documents through them.
</Note>

## Using a deployment

Once you have a deployment ID, processing a document is a single API call:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api.matil.ai/v3/deployments/{deployment_id}" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"documents": [{"type": "url", "url": "https://example.com/invoice.pdf"}]}'
```

The deployment determines which structure and version to apply. You also have async and batch variants:

| Mode      | Endpoint                          | Description                                                     |
| --------- | --------------------------------- | --------------------------------------------------------------- |
| **Sync**  | `POST /v3/deployments/{id}`       | Blocks until processing completes. Returns the result directly. |
| **Async** | `POST /v3/deployments/{id}/async` | Returns immediately. Result delivered via webhook.              |
| **Batch** | `POST /v3/deployments/{id}/batch` | Submit up to 100 items. Results delivered via webhook.          |

## Next steps

<CardGroup cols={2}>
  <Card title="Structures" href="/en/guides/structures">
    Learn how to define what data you want to extract.
  </Card>

  <Card title="Processing modes" href="/en/api-reference/processing">
    Learn the details of sync, async, and batch processing.
  </Card>
</CardGroup>
