Create an automation
Create a saved Assistant automation definition and immutable first version. --- **Related endpoints** - `GET /automations` — List automations - `GET /automations/{id}` — Retrieve an automation - `GET /automations/{id}/runs` — List runs for an automation - `POST /automations/{id}/runs` — Run an automation - `GET /automations/{id}/runs/{runId}` — Retrieve a run - `GET /automations/approvals` — List approvals - `POST /automations/approvals/{approvalId}/approve` — Approve an automation approval - `POST /automations/approvals/{approvalId}/reject` — Reject an automation approval **Common errors** - `400 invalid_request` — malformed payload or failed validation. - `401 authentication_error` — missing, invalid, expired, or revoked credential. Codes: `authentication_failed`, `invalid_api_key`, `expired_api_key`, `api_key_revoked`, `session_invalid`, `merchant_required`. Carries a `WWW-Authenticate: Bearer` challenge. - `409 conflict` — Idempotency-Key collision with a different body, or a concurrent state-transition conflict. **Idempotency** Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
Create a saved Assistant automation definition and immutable first version.
Related endpoints
GET /automations— List automationsGET /automations/{id}— Retrieve an automationGET /automations/{id}/runs— List runs for an automationPOST /automations/{id}/runs— Run an automationGET /automations/{id}/runs/{runId}— Retrieve a runGET /automations/approvals— List approvalsPOST /automations/approvals/{approvalId}/approve— Approve an automation approvalPOST /automations/approvals/{approvalId}/reject— Reject an automation approval
Common errors
400 invalid_request— malformed payload or failed validation.401 authentication_error— missing, invalid, expired, or revoked credential. Codes:authentication_failed,invalid_api_key,expired_api_key,api_key_revoked,session_invalid,merchant_required. Carries aWWW-Authenticate: Bearerchallenge.409 conflict— Idempotency-Key collision with a different body, or a concurrent state-transition conflict.
Idempotency
Pass an Idempotency-Key header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see the idempotency guide.
Your RevKeen merchant API key. Create and manage keys in Dashboard → Settings → Developer. Use rk_sandbox_* for staging/test and rk_live_* for production. The same key may be sent as Authorization: Bearer <key> if that suits your HTTP client better. A missing, invalid, expired, or revoked key returns 401 with a WWW-Authenticate: Bearer challenge; a valid key without the required scope returns 403.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.revkeen.com/v2/automations" \
-H "x-api-key: $REVKEEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"objective": "string"
}'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "object": "automation", "name": "string", "description": "string", "status": "string", "trigger_type": "string", "timezone": "string", "cron_expression": "string", "risk_profile": "string", "current_version": 0, "objective": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "system_prompt": "string", "trigger_config": null, "plan": null, "tool_allowlist": null, "approval_policy": null, "memory_policy": null, "notification_policy": null, "source_thread_id": "b736ec5d-eb67-4368-a52e-4c5c02196509", "source_message_id": "422efc8e-5e68-4d36-8b87-fc5bb43ded95" }}Approve an automation approval POST
Approve a pending automation approval request so the run can proceed. --- **Related endpoints** - `GET /automations` — List automations - `POST /automations` — Create an automation - `GET /automations/{id}` — Retrieve an automation - `GET /automations/{id}/runs` — List runs for an automation - `POST /automations/{id}/runs` — Run an automation - `GET /automations/{id}/runs/{runId}` — Retrieve a run - `GET /automations/approvals` — List approvals - `POST /automations/approvals/{approvalId}/reject` — Reject an automation approval **Common errors** - `404 resource_missing` — the referenced resource does not exist or is not visible to your key. **Idempotency** Pass an `Idempotency-Key` header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see [the idempotency guide](/docs/fundamentals/idempotency).
Retrieve an automation GET
Get a saved automation and its current version details. --- **Related endpoints** - `GET /automations` — List automations - `POST /automations` — Create an automation - `GET /automations/{id}/runs` — List runs for an automation - `POST /automations/{id}/runs` — Run an automation - `GET /automations/{id}/runs/{runId}` — Retrieve a run - `GET /automations/approvals` — List approvals - `POST /automations/approvals/{approvalId}/approve` — Approve an automation approval - `POST /automations/approvals/{approvalId}/reject` — Reject an automation approval **Common errors** - `404 resource_missing` — the referenced resource does not exist or is not visible to your key.