Content Actions
Content Actions let you trigger external HTTP calls (webhooks, n8n workflows, Zapier, etc.) directly from a content item. Actions are configured on the Content Type and can operate in two modes: synchronous and asynchronous with callback.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET |
/actions/{contentTypeKey}/{contentId}/{actionId}/execute |
Execute an action |
GET |
/actions/{contentTypeKey}/{contentId}/{actionId}/navigate |
Execute a navigate action (returns URL) |
GET |
/actions/{contentTypeKey}/{contentId}/{actionId}/status |
Get execution status (callback mode only) |
POST |
/actions/callback/{workspaceId}/{operationId} |
Callback endpoint for external services |
Synchronous mode (default)
When UseCallback is disabled on the action, execution is synchronous: Contit calls the external service, waits for the response, and returns the result immediately.
Client --> GET /actions/{type}/{id}/{actionId}/execute
--> Contit calls external service
<-- External service responds
<-- Response with result
Example
curl -H "Authorization: Bearer {token}" \
"https://api.contit.cloud/actions/orders/abc123/send-email/execute"
Response:
"OK"
Asynchronous mode with callback
When UseCallback is enabled on the action, execution becomes asynchronous: Contit creates a tracking record, calls the external service passing a callbackUrl, and returns immediately with a Running status. The external service processes the request and then calls the callbackUrl to report the result.
Client --> GET /actions/{type}/{id}/{actionId}/execute
--> Contit creates execution record (Running)
--> Contit calls external service (with callbackUrl in payload)
<-- External service responds 2xx (accepted)
<-- Response: { operationId, callbackUrl }
Client --> GET /actions/{type}/{id}/{actionId}/status (polling)
<-- Response: { status: "Running", progress: 50, message: "Processing..." }
External service --> POST /actions/callback/{workspaceId}/{operationId}
{ "success": true, "result": "done" }
<-- 200 OK
Client --> GET /actions/{type}/{id}/{actionId}/status (polling)
<-- Response: { status: "Succeeded", result: "done" }
Execute response (callback mode)
{
"operationId": "d4f5a6b7-...",
"callbackUrl": "https://api.contit.cloud/actions/callback/ws-123/d4f5a6b7-..."
}
Status response
curl -H "Authorization: Bearer {token}" \
"https://api.contit.cloud/actions/orders/abc123/send-email/status"
{
"operationId": "d4f5a6b7-...",
"status": "Running",
"progress": 50,
"message": "Processing order...",
"result": null,
"error": null,
"updatedAt": "2026-04-02T10:30:00Z"
}
Status values: Running (0), Succeeded (1), Failed (-1)
Duplicate prevention
If an action with UseCallback is already running for the same content and action, the execute endpoint returns 409 Conflict.
Callback endpoint
The callback endpoint is called by the external service (n8n, Zapier, etc.) to report the result. It does not require authentication — security is based on the unguessable operation ID (GUID).
`POST /actions/callback/
Complete the action (success):
{
"success": true,
"result": "Order processed successfully",
"message": "Completed"
}
Complete the action (failure):
{
"success": false,
"error": "Payment gateway timeout",
"message": "Payment failed"
}
Report intermediate progress:
{
"success": true,
"progress": 50,
"message": "Processing items..."
}
When progress is less than 100, the execution stays in Running status and only progress and message are updated. This allows the external service to send multiple progress updates before the final completion.
Callback request fields
| Field | Type | Description |
|---|---|---|
success |
bool |
true for success, false for failure |
result |
string |
Result data (returned to the client on success) |
error |
string |
Error message (returned to the client on failure) |
message |
string |
Status message displayed in the UI |
progress |
int? |
Progress percentage (0-100). Values < 100 trigger a progress update without completing |
How callbackUrl is delivered
The callbackUrl is included in the request to the external service based on the action's payload mode:
| Payload Mode | How callbackUrl is delivered |
|---|---|
| None (GET) | Appended as query parameter: ?callbackUrl=... |
| IdOnly | JSON body field: { "id": "...", "callbackUrl": "..." } |
| FullEntity | JSON body field: { "id": "...", "fields": {...}, "callbackUrl": "..." } |
| CustomTemplate | Available in template as {{callbackUrl}} |
Payload example (IdOnly)
{
"id": "abc123",
"contentType": "orders",
"workspaceId": "ws-xyz",
"callbackUrl": "https://api.contit.cloud/actions/callback/ws-xyz/d4f5a6b7-..."
}
n8n integration example
Configure the action on the Content Type:
- Set the URL template to your n8n webhook URL
- Set payload mode to
IdOnlyorFullEntity - Enable
UseCallback
n8n workflow:
- Webhook trigger node receives the payload (including
callbackUrl) - Process your workflow steps
- Final HTTP Request node:
POSTto{{ $json.callbackUrl }}with body:{ "success": true, "result": "Done" }
- Webhook trigger node receives the payload (including
Optional progress updates:
- Add intermediate HTTP Request nodes during long workflows:
{ "success": true, "progress": 30, "message": "Step 1 completed" }
- Add intermediate HTTP Request nodes during long workflows:
Execution lifecycle
Execution records expire automatically after 1 hour. If the external service fails to call the callback within this time, the record is removed and the action can be re-executed.