API reference

Content Actions

API referencehttps://api.contit.cloud

Content Actions

Endpoints for executing custom actions and navigations on content items. Actions can run synchronously or asynchronously with callback support for long-running workflows.

GET /actions/{contentTypeKey}/{contentId}/{actionId}/execute

Execute action

Execute a custom action defined on a content type for a specific content item. If the action has UseCallback enabled, returns an operationId and callbackUrl for async tracking. Otherwise, executes synchronously and returns the result.

Richiede la policy ReadAccess

Parametri del percorso

NomeTipoObbligatorioDescrizione
contentTypeKeystringThe content type key
contentIdstringThe content item ID (GUID)
actionIdstringThe action identifier

Risposte

200Success — action executed (sync) or accepted (async with callback)
operationIdstringExecution tracking ID (callback mode only)
callbackUrlstringURL for the external service to report results (callback mode only)
resultobjectAction-specific result data (sync mode only)
401Unauthorized
404Not Found — content or action does not exist
409Conflict — action is already running (callback mode, duplicate prevention)

Esempi di codice

curl -X GET "https://api.contit.cloud/actions/{contentTypeKey}/{contentId}/{actionId}/execute" \
  -H "X-Api-Key: YOUR_API_KEY"
Esempio di richiesta
GET /actions/Article/a1b2c3d4-e5f6-7890-abcd-ef1234567890/send-notification/execute
Esempio di risposta 200
{
  "operationId": "d4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8",
  "callbackUrl": "https://api.contit.cloud/actions/callback/ws-123/d4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8"
}
Prova Live
GET /actions/{contentTypeKey}/{contentId}/{actionId}/navigate

Get navigation URL

Get a navigation URL for a custom action, typically used to redirect users to an external page or detail view.

Richiede la policy ReadAccess

Parametri del percorso

NomeTipoObbligatorioDescrizione
contentTypeKeystringThe content type key
contentIdstringThe content item ID (GUID)
actionIdstringThe action identifier

Risposte

200Success — returns a navigation URL
urlstringThe navigation URL to redirect to
401Unauthorized
404Not Found

Esempi di codice

curl -X GET "https://api.contit.cloud/actions/{contentTypeKey}/{contentId}/{actionId}/navigate" \
  -H "X-Api-Key: YOUR_API_KEY"
Esempio di richiesta
GET /actions/Product/b2c3d4e5-f6a7-8901-bcde-f12345678901/view-external/navigate
Esempio di risposta 200
{
  "url": "https://shop.example.com/products/b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
Prova Live
GET /actions/{contentTypeKey}/{contentId}/{actionId}/status

Get action execution status

Get the current execution status of a content action. Used to poll for completion when UseCallback is enabled.

Richiede la policy ReadAccess

Parametri del percorso

NomeTipoObbligatorioDescrizione
contentTypeKeystringThe content type key
contentIdstringThe content item ID (GUID)
actionIdstringThe action identifier

Risposte

200Success — returns execution status
operationIdstringExecution tracking ID
statusstringExecution status: Running (0), Succeeded (1), Failed (-1)
resultstringResult data (available when Succeeded)
progressinteger?Progress percentage 0-100 (optional, set by external service)
messagestringStatus message for display
errorstringError details (available when Failed)
updatedAtdatetimeLast update timestamp
401Unauthorized
404Not Found — no execution record exists

Esempi di codice

curl -X GET "https://api.contit.cloud/actions/{contentTypeKey}/{contentId}/{actionId}/status" \
  -H "X-Api-Key: YOUR_API_KEY"
Esempio di richiesta
GET /actions/Article/a1b2c3d4-e5f6-7890-abcd-ef1234567890/send-notification/status
Esempio di risposta 200
{
  "operationId": "d4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8",
  "status": "Running",
  "result": null,
  "progress": 50,
  "message": "Processing order items...",
  "error": null,
  "updatedAt": "2026-04-02T10:30:00Z"
}
Prova Live
POST /actions/callback/{workspaceId}/{operationId}

Action execution callback

Callback endpoint for external services (n8n, Zapier, etc.) to report action execution results. Does not require authentication — security is based on the unguessable operation ID. Send progress < 100 for intermediate updates, or set success to true/false for final completion.

Parametri del percorso

NomeTipoObbligatorioDescrizione
workspaceIdstringThe workspace ID
operationIdstringThe operation ID returned by the execute endpoint

Corpo della richiesta application/json

ProprietàTipoObbligatorioDescrizione
success boolean 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 integer? — Progress percentage (0-100). Values < 100 update progress without completing the action

Risposte

200Success — status updated
404Not Found — operation does not exist or has expired
409Conflict — action has already completed

Esempi di codice

curl -X POST "https://api.contit.cloud/actions/callback/{workspaceId}/{operationId}" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "success": true,
  "result": "result_value",
  "error": "error_value",
  "message": "message_value",
  "progress": "progress_value"
}'
Esempio di richiesta
POST /actions/callback/ws-123/d4f5a6b7-c8d9-4e0f-a1b2-c3d4e5f6a7b8

{
  "success": true,
  "result": "Order processed successfully",
  "message": "Completed"
}
Prova Live