Skip to content

Routines API

The Routines API provides endpoints for creating and managing cron schedules and webhook triggers.

Base URL: https://endpoint.acenta.ai/core/api/v1

GET /routines

Query parameters: trigger_type (cron, webhook), enabled, limit, offset

POST /routines
FieldTypeRequiredDescription
namestringyesRoutine name
descriptionstringnoDescription
trigger_typestringyescron or webhook
cron_expressionstringcron onlyStandard cron expression
timezonestringnoTimezone for cron (default UTC)
target_agentstringyesAgent to invoke
payloadobjectnoPayload to send to agent
enabledbooleannoDefault true
Terminal window
# Cron routine
curl -X POST https://endpoint.acenta.ai/core/api/v1/routines \
-H "Authorization: Bearer $ACENTA_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "daily-report",
"trigger_type": "cron",
"cron_expression": "0 8 * * *",
"target_agent": "report-agent"
}'
# Webhook routine
curl -X POST https://endpoint.acenta.ai/core/api/v1/routines \
-H "Authorization: Bearer $ACENTA_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "on-upload",
"trigger_type": "webhook",
"target_agent": "document-agent"
}'

Webhook routines return a webhook_url in the response.

GET /routines/{id}
PATCH /routines/{id}

Accepts any subset of routine fields, including enabled to pause/resume.

DELETE /routines/{id}
POST /routines/{id}/trigger

Executes the routine immediately regardless of schedule.

POST /routines/webhook/{token}

The token is provided in the webhook_token field when a webhook routine is created. The request body is forwarded to the target agent as the payload.

No authentication required — the token itself authenticates the request.

GET /routines/{id}/executions

Query parameters: status (success, failed), limit, offset

GET /routines/executions/{id}
DELETE /routines/executions/{id}
{
"id": "exec-1",
"routine_id": "rtn-123",
"status": "success",
"started_at": "2026-04-30T08:00:00Z",
"completed_at": "2026-04-30T08:00:04Z",
"output": "Report generated successfully."
}