curl --request POST \
--url https://api.tela.com/task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"name": "Invoice-2025-001.pdf",
"rawInput": {
"variables": {
"document": {
"file_url": "https://example.com/invoice.pdf",
"file_name": "Invoice-2025-001.pdf",
"mime_type": "application/pdf"
}
},
"webhook_url": "https://example.com/webhook"
},
"tags": [
"priority"
]
}
'[
{
"id": "8b6d2c9a-1f4e-4c1b-9a1e-3c2d5e6f7a80",
"reference": 43,
"name": "Invoice-2025-001.pdf",
"status": "running",
"rawInput": {
"application_id": "95cec438-6080-44fe-8275-28b16bd40178",
"variables": {
"document": {
"files": [
{
"file_url": "https://example.com/invoice.pdf",
"file_name": "Invoice-2025-001.pdf",
"mime_type": "application/pdf"
}
]
}
},
"webhook_url": "https://example.com/webhook"
},
"inputContent": null,
"outputContent": null,
"originalOutputContent": null,
"createdBy": "api@company.com",
"approvedBy": null,
"approvedAt": null,
"completionRunId": "b83b1558-de5b-4e45-b517-7bececbdd154",
"workflowRunId": null,
"sourceType": "prompt",
"agentId": null,
"agentRef": null,
"agentSessionId": null,
"promptVersionId": "76065caa-c519-441a-8fe2-cc43e29664ab",
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"workspaceId": "3f55cfd9-4427-4887-a181-d9ad39967802",
"metadata": null,
"tags": [
"priority"
],
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z",
"deletedAt": null
}
]Tasks
Create tasks
Creates one or more tasks. The body may be a single task object, an array of up to 100 task objects (all must share the same promptApplicationId), or an agent batch object (sourceType: "agent").
POST
/
task
curl --request POST \
--url https://api.tela.com/task \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"name": "Invoice-2025-001.pdf",
"rawInput": {
"variables": {
"document": {
"file_url": "https://example.com/invoice.pdf",
"file_name": "Invoice-2025-001.pdf",
"mime_type": "application/pdf"
}
},
"webhook_url": "https://example.com/webhook"
},
"tags": [
"priority"
]
}
'[
{
"id": "8b6d2c9a-1f4e-4c1b-9a1e-3c2d5e6f7a80",
"reference": 43,
"name": "Invoice-2025-001.pdf",
"status": "running",
"rawInput": {
"application_id": "95cec438-6080-44fe-8275-28b16bd40178",
"variables": {
"document": {
"files": [
{
"file_url": "https://example.com/invoice.pdf",
"file_name": "Invoice-2025-001.pdf",
"mime_type": "application/pdf"
}
]
}
},
"webhook_url": "https://example.com/webhook"
},
"inputContent": null,
"outputContent": null,
"originalOutputContent": null,
"createdBy": "api@company.com",
"approvedBy": null,
"approvedAt": null,
"completionRunId": "b83b1558-de5b-4e45-b517-7bececbdd154",
"workflowRunId": null,
"sourceType": "prompt",
"agentId": null,
"agentRef": null,
"agentSessionId": null,
"promptVersionId": "76065caa-c519-441a-8fe2-cc43e29664ab",
"promptApplicationId": "95cec438-6080-44fe-8275-28b16bd40178",
"workspaceId": "3f55cfd9-4427-4887-a181-d9ad39967802",
"metadata": null,
"tags": [
"priority"
],
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z",
"deletedAt": null
}
]Authorizations
Body
application/json
- Workstation/App task · object
- Workstation/App task · object[]
- Agent tasks · object
Response
The created tasks (always an array, even for a single-object body)