Skip to content
← Back to guides

External API: upload and search documents

External API ›Upload & search via API
April 7, 2026Updated: April 7, 20265 min read20 views
How to integrate your ERP with Theka via REST API

API for external systems

Theka offers a complete REST API for external systems (ERP, CRM, e-commerce) to interact with the DAM.

Authentication

Authentication uses the tenant API key:

Authorization: Api-Key sk_tenant_abc123...
X-Tenant: my-tenant

Upload document

POST /api/v1/dam/external/assets/

Send the file with metadata (category, type, title, external_id). If a document with the same external_id already exists, a new version is created automatically.

Search

GET /api/v1/dam/external/assets/?q=...&category=...&status=...

Search documents by text, category, status, tags, entities, projects. Also supports custom field filters:

?custom_data.counterpart=Rossi
?custom_data.value__gte=50000
?custom_data.expiry_date__lt=2026-06-01

Detail

GET /api/v1/dam/external/assets/{id}/ — full detail with versions, metadata, AI, image variants.

GET /api/v1/dam/external/assets/by-external-id/{code}/ — lookup by external code.

Permission impersonation

By default the API key has admin access. To restrict:

X-Dam-User-Id: 42     # user 42's permissions
X-Dam-Role-Slug: viewer  # viewer role's permissions