Skip to main content
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?

ComponentDescription
Deployment IDA unique UUID you use in API calls.
StructureThe structure (and version) that this deployment uses for processing.
NameA human-readable label for your reference.
Deployments are created and managed in the Matil Dashboard. The API is used to process documents through them.

Using a deployment

Once you have a deployment ID, processing a document is a single API call:
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:
ModeEndpointDescription
SyncPOST /v3/deployments/{id}Blocks until processing completes. Returns the result directly.
AsyncPOST /v3/deployments/{id}/asyncReturns immediately. Result delivered via webhook.
BatchPOST /v3/deployments/{id}/batchSubmit up to 100 items. Results delivered via webhook.

Next steps

Structures

Learn how to define what data you want to extract.

Processing modes

Learn the details of sync, async, and batch processing.