Skip to content

API reference

Every endpoint of the Agentim public API (220 operations), generated from the API itself.

Agentim (formerly Officely). New integrations use https://api.agentim.ai and the x-agentim-token header. Existing integrations on https://api.officely.ai with x-officely-token, ofl_live_ keys, the website widget script and your webhooks keep working exactly as they are.

Basics#

Chatbots, AI flows, customers, conversations, messages and webhooks of your Agentim account. Base URL https://api.officely.ai/v1/public; send your API key in the x-officely-token header. Errors are problem+json; personal data is masked unless the key has conversations:read_pii and the request says redact=false.

  • Base URL: https://api.agentim.ai/v1/public
  • Authentication: send your API key in the x-agentim-token header. Create a key in Developers › API keys and give it only the scopes listed on the endpoints you call.
  • Errors: application/problem+json with a stable code and a detail that says what to do. Quote X-Request-ID when you contact support.
  • Rate limits: every answer carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. On 429, wait Retry-After seconds.
  • Lists: answers are {data, next_cursor}; pass next_cursor as cursor for the next page.
  • Machine-readable spec: openapi.json (OpenAPI 3.1), for Postman, code generators and AI assistants.

Account#

Me#

GET/me

  • Scopes: none
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/me" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Update profile#

PATCH/me

Every change is recorded in the account's audit log. Body {business_name?, logo_url?}: only the fields sent change. logo_url is a public https image URL or null (no logo). The email and the phone (the account id) can't change here: sending them is a 400 email-change-in-dashboard / phone-change-in-dashboard (they need verification in the dashboard). GET /me keeps describing the key; read the profile with GET /me/profile. Owner only inside a workspace.

  • Scopes: account:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/me" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Get profile#

GET/me/profile

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/me/profile" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Plan#

Plan#

GET/plan

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/plan" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Team#

Team#

GET/team

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/team" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Team invite#

POST/team/invites

Every change is recorded in the account's audit log. Invites a person by email or WhatsApp number (body {email | phone, role, confirm_charge}). When the invite would add a paid user it answers 402 seat-confirmation-required (field seat: amount, currency, interval, timing) and nothing is sent or charged; send again with {"confirm_charge": true} to agree. The charge starts only when the person accepts. 402 upgrade-required on Free (1 user). 503 seat-check-unavailable when the plan can't be checked: retry later. Returns the invite and its link.

  • Scopes: account:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/team/invites" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Team seats#

GET/team/seats

Per-user pricing of the account. plan: free (1 user; limit), pro (3 users included, then a paid extra user each; price is per extra user and interval) or other (legacy and custom plans: no seat limit or charge). users = owner + members; pending_invites hold a seat. grandfathered: users the account had before per-user pricing, never charged. next_invite.charge says whether the next invite needs confirm_charge; timing next_invoice (monthly: prorated on the next invoice) or now (yearly).

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/team/seats" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

API keys#

Api keys#

GET/api-keys

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/api-keys" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

AI credits#

Ai credits#

GET/ai-credits

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-credits" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Set ai credit bot limit#

PUT/ai-credits/bot-limits/{agent_id}

Every change is recorded in the account's audit log. Body {monthly_cap_credits: whole credits | null}. agent_id is an AI flow of the account (GET /ai-credits/settings lists them under bots); 404 ai-flow-not-found otherwise.

  • Scopes: account:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/ai-credits/bot-limits/{agent_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Get ai credit settings#

GET/ai-credits/settings

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-credits/settings" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Update ai credit settings#

PUT/ai-credits/settings

Every change is recorded in the account's audit log. Body {monthly_cap_credits?, low_balance_credits?, allowed_models?}: fields left out keep their value; null removes that limit (allowed_models null = every model). A reached monthly cap stops AI answers until the month resets or the cap is raised. Auto top-up, packs and cards are not in the API (400 not-in-api).

  • Scopes: account:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/ai-credits/settings" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Ai credits usage#

GET/ai-credits/usage

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-credits/usage" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Ai credits usage csv#

GET/ai-credits/usage.csv

Answers text/csv (not JSON): date, chatbot_id, chatbot, model, ai_calls, credits, usd per day x bot x model for ?month=YYYY-MM (default: this month, UTC).

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-credits/usage.csv" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Features#

Features#

GET/features

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/features" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Onboarding#

Start build#

POST/onboarding/builds

Every change is recorded in the account's audit log.

  • Scopes: builders:write, builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/onboarding/builds" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Job status#

GET/onboarding/jobs/{job_id}

Deprecated fields: bot.share_url and bot.embed_snippet when they point at the AI flow itself (/#/ai-chat/<id>, addAIWidget; the bot has no live chatbot yet). They keep working, but new integrations use the chatbot's link and widget: bot.chatbot (status live) or POST /ai-flows/{agent_id}/chatbots.

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
job_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/onboarding/jobs/{job_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Chatbots (builder)#

List builders#

GET/builders

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Create builder#

POST/builders

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Get builder#

GET/builders/{builder_id}

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Rename#

PATCH/builders/{builder_id}

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/builders/{builder_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete bot#

DELETE/builders/{builder_id}

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 10 requests per 600 s per key (publish)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/builders/{builder_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Get bot messages#

GET/builders/{builder_id}/bot-messages

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}/bot-messages" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Set bot messages#

PUT/builders/{builder_id}/bot-messages

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/builders/{builder_id}/bot-messages" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Create brick#

POST/builders/{builder_id}/bricks

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/bricks" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Update brick#

PATCH/builders/{builder_id}/bricks/{brick_id}

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
brick_id (required)pathstring
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/builders/{builder_id}/bricks/{brick_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete brick#

DELETE/builders/{builder_id}/bricks/{brick_id}

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
brick_id (required)pathstring
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/builders/{builder_id}/bricks/{brick_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Build#

POST/builders/{builder_id}/build

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/build" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Doctor report#

GET/builders/{builder_id}/doctor

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}/doctor" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Doctor copy#

POST/builders/{builder_id}/doctor/copy

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/doctor/copy" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Duplicate bot#

POST/builders/{builder_id}/duplicate

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/duplicate" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Add edge#

POST/builders/{builder_id}/edges

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/edges" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete edge#

DELETE/builders/{builder_id}/edges/{edge_id}

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring
edge_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/builders/{builder_id}/edges/{edge_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Get flow#

GET/builders/{builder_id}/flow

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}/flow" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Auto layout#

POST/builders/{builder_id}/layout

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/layout" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Add node#

POST/builders/{builder_id}/nodes

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/nodes" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Update node#

PATCH/builders/{builder_id}/nodes/{node_id}

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring
node_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/builders/{builder_id}/nodes/{node_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete node#

DELETE/builders/{builder_id}/nodes/{node_id}

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring
node_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/builders/{builder_id}/nodes/{node_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Duplicate node#

POST/builders/{builder_id}/nodes/{node_id}/duplicate

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring
node_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/nodes/{node_id}/duplicate" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Test http step#

POST/builders/{builder_id}/nodes/{node_id}/test-http

Every change is recorded in the account's audit log.

  • Scopes: builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring
node_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/nodes/{node_id}/test-http" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete nodes#

POST/builders/{builder_id}/nodes/delete

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/nodes/delete" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Publish#

POST/builders/{builder_id}/publish

Every change is recorded in the account's audit log. Without channels the chatbot replaces the account's live chatbot (one live chatbot answers every channel). Several live chatbots: channels [{kind, ref}] (GET /channels lists them) makes this chatbot answer those channels while the chatbot that answers today keeps every other channel (the default; make_default true makes this one the default). A chatbot's own widget code alone is not a channel: the publish replaces the live chatbot. 409 multi-bot-unavailable: several live chatbots isn't on for this account yet; nothing changed, publish without channels to replace the live chatbot. 409 no-answering-chatbot: no live chatbot answers customers today; nothing changed. 403 live-chatbot-limit: the plan's live chatbot limit. 422 invalid-channel: not one of the account's channels.

  • Scopes: builders:publish
  • Rate limit: 10 requests per 600 s per key (publish)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/publish" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Publish plan#

GET/builders/{builder_id}/publish-plan

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}/publish-plan" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get settings#

GET/builders/{builder_id}/settings

appearance holds the website chat's look and chat experience; badge {shown, can_hide, rule} says whether visitors see the "Powered by" badge. Free (and legacy Basic) always show it; Pro hides it unless appearance.showBadge is true. appearance.rememberConversations (off|24h|7d|30d, unset = off) is how long a visitor's browser keeps the website conversation across refreshes and pages. whatsapp_formatting (auto|as_written, default auto): auto converts Markdown in the bot's texts and AI answers to WhatsApp formatting on WhatsApp channels ([label](url) -> "label: url", **x** -> *x*, # headings -> *bold*, HTML removed) and tells AI steps to write WhatsApp formatting; as_written sends texts exactly as written. The website chat always renders Markdown. whatsapp_long_menus (list|numbered; unset on bots created before it existed = numbered, new bots start with list): on the WhatsApp Cloud API, list sends an Options step's 1-3 options as reply buttons (titles up to 20 characters) and 4-10 options as a WhatsApp list (row title up to 24 characters, cut at a word, the full text as the row description); more than 10 stay numbered text. A Buttons step with 4-10 buttons is sent as a list too. The automatic Main menu option counts toward the limits. Green API, May-Tapi and the website chat are unchanged.

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}/settings" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Update settings#

PATCH/builders/{builder_id}/settings

Every change is recorded in the account's audit log. appearance is merged (a null value removes a field). appearance.showBadge: true shows the "Powered by" badge on a paid plan; false or null hides it. On Free (and legacy Basic) the badge always shows: the value is kept for later but has no effect, and custom CSS is not applied. whatsapp_formatting: auto (default) or as_written. whatsapp_long_menus: list or numbered.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/builders/{builder_id}/settings" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Run test#

POST/builders/{builder_id}/test

Every change is recorded in the account's audit log. channel (optional) simulates where the conversation runs: website, whatsapp_official, whatsapp_green, whatsapp_maytapi or api (default). It sets the #channel_type variable, decides Filter conditions "Channel is ..." and, on a WhatsApp channel, applies WhatsApp formatting. The response echoes channel.

  • Scopes: builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Rewrite texts#

POST/builders/{builder_id}/texts

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/texts" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Unpublish#

POST/builders/{builder_id}/unpublish

Every change is recorded in the account's audit log.

  • Scopes: builders:publish
  • Rate limit: 10 requests per 600 s per key (publish)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/unpublish" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Get validation#

GET/builders/{builder_id}/validation

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}/validation" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Variables#

GET/builders/{builder_id}/variables

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}/variables" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Set default variables#

PUT/builders/{builder_id}/variables

Every change is recorded in the account's audit log. Replaces the chatbot's default variables (the whole list; [] removes them all). Every new conversation starts with them, used in texts as {{#key}}. They are read without a publish, so on a live chatbot this is a live change: it also needs builders:publish and {"confirm": true}.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/builders/{builder_id}/variables" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

List versions#

GET/builders/{builder_id}/versions

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}/versions" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get version#

GET/builders/{builder_id}/versions/{version}

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring
version (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}/versions/{version}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Duplicate version#

POST/builders/{builder_id}/versions/{version}/duplicate

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring
version (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/versions/{version}/duplicate" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Preview version#

POST/builders/{builder_id}/versions/{version}/preview

Every change is recorded in the account's audit log. Runs a saved version with the preview engine, in memory: nothing is written. HTTP steps call out; AI steps are shown as a note naming the AI flow version and spend no AI credits.

  • Scopes: builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring
version (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/versions/{version}/preview" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Publish version#

POST/builders/{builder_id}/versions/{version}/publish

Every change is recorded in the account's audit log. Publishes a saved version again with the AI flow versions it ran (the same as /rollback). 409 ai-flow-version-missing | ai-flow-missing | ai-flow-versions-off with restore_to_draft: true when it can't go live exactly as it was.

  • Scopes: builders:publish
  • Rate limit: 10 requests per 600 s per key (publish)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring
version (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/versions/{version}/publish" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Restore version#

POST/builders/{builder_id}/versions/{version}/restore

Every change is recorded in the account's audit log. The version becomes the DRAFT; the live chatbot and its AI flows are unchanged. The draft it replaces is kept as a draft backup (draft_backups in the versions list): restore that backup to undo.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring
version (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/versions/{version}/restore" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Rollback version#

POST/builders/{builder_id}/versions/{version}/rollback

Every change is recorded in the account's audit log.

  • Scopes: builders:publish
  • Rate limit: 10 requests per 600 s per key (publish)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring
version (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/versions/{version}/rollback" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Restore version backup#

POST/builders/{builder_id}/versions/backups/{backup_id}/restore

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
backup_id (required)pathstring
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/versions/backups/{backup_id}/restore" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Diff versions#

GET/builders/{builder_id}/versions/diff

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
builder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builders/{builder_id}/versions/diff" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Move builder#

PUT/builders/{builder_id}/folder

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/builders/{builder_id}/folder" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Widget code#

POST/builders/{builder_id}/widget-code

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
builder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builders/{builder_id}/widget-code" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Chatbot templates#

List templates#

GET/builder-templates

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builder-templates" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get template#

GET/builder-templates/{template_id}

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
template_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builder-templates/{template_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Create from template#

POST/builder-templates/{template_id}/create

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
template_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builder-templates/{template_id}/create" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Preview template#

POST/builder-templates/{template_id}/preview

  • Scopes: builders:test
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
template_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builder-templates/{template_id}/preview" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Node types#

Node types#

GET/node-types

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/node-types" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Step types#

Step types#

GET/step-types

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/step-types" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

HTTP steps#

List http secrets#

GET/http-steps/secrets

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/http-steps/secrets" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Save http secret#

PUT/http-steps/secrets/{name}

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
name (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/http-steps/secrets/{name}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete http secret#

DELETE/http-steps/secrets/{name}

Every change is recorded in the account's audit log.

  • Scopes: builders:publish
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
name (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/http-steps/secrets/{name}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Python steps#

Guide#

GET/python-steps

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/python-steps" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

List keys#

GET/python-steps/keys

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/python-steps/keys" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Save key#

PUT/python-steps/keys/{name}

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
name (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/python-steps/keys/{name}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete key#

DELETE/python-steps/keys/{name}

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:publish
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
name (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/python-steps/keys/{name}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Test run#

POST/python-steps/test

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:read, builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/python-steps/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Expressions#

Test expression#

POST/expressions/test

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/expressions/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

AI agents#

List agents#

GET/agents

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/agents" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

AI flows#

List flows#

GET/ai-flows

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-flows" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Create flow#

POST/ai-flows

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Get flow#

GET/ai-flows/{agent_id}

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
agent_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-flows/{agent_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Delete flow#

DELETE/ai-flows/{agent_id}

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:publish
  • Rate limit: 10 requests per 600 s per key (publish)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/ai-flows/{agent_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Build#

POST/ai-flows/{agent_id}/build

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/build" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Create chatbot#

POST/ai-flows/{agent_id}/chatbots

Every change is recorded in the account's audit log. Creates a NEW draft chatbot around the flow (Start -> AI step -> one step per Exit). Nothing is published and no existing chatbot changes. 403 chatbot-limit at the plan's chatbot cap. Undo: DELETE /builders/{builder_id} with {"confirm": true}.

  • Scopes: ai_flows:read, builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/chatbots" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Conversation forget#

DELETE/ai-flows/{agent_id}/conversations/{conversation_id}

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:chat
  • Rate limit: 300 requests per 60 s per key (chat)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring
conversation_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/conversations/{conversation_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Conversation message#

POST/ai-flows/{agent_id}/conversations/{conversation_id}/messages

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:chat
  • Rate limit: 300 requests per 60 s per key (chat)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring
conversation_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/conversations/{conversation_id}/messages" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Duplicate#

POST/ai-flows/{agent_id}/duplicate

Every change is recorded in the account's audit log. Copies the flow (graph, settings, knowledge, picture) under a new id and re-indexes the copy's knowledge (then builders:test is needed too). The copy is a draft that no chatbot uses: customers don't see it until it is put in a chatbot that is published.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/duplicate" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Get answer feedback#

GET/ai-flows/{agent_id}/feedback

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
agent_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/feedback" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get knowledge#

GET/ai-flows/{agent_id}/knowledge

Every source of the flow's knowledge with its state: included (searched), excluded (kept, not searched) or failed (the last re-index couldn't read it; include it again to retry). A website page's id is its URL, a file's id is its loader id. knowledge_steps: searches all (no selection) or only selected_sources. website: the latest scan of a flow built from a website, else null.

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
agent_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Update knowledge#

PATCH/ai-flows/{agent_id}/knowledge

Every change is recorded in the account's audit log. Excludes (keeps, stops searching), includes again or removes sources by id, then re-indexes. Removing needs {"confirm": true}: a removed uploaded file is deleted. Applies to live chatbots too, so it needs ai_flows:publish (with ai_flows:write and builders:test).

  • Scopes: ai_flows:write, ai_flows:publish, builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Discover pages#

POST/ai-flows/{agent_id}/knowledge/discover

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:read, builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge/discover" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Upload knowledge file#

POST/ai-flows/{agent_id}/knowledge/files

Every change is recorded in the account's audit log. Form fields: file (PDF / TXT / CSV / XLSX, up to 100 MB), node_id? (a Knowledge step that must search it), confirm?, expected_revision?. Adds the file to the flow's knowledge and reads the knowledge again (same ingestion as the dashboard; returns when done). Knowledge has no draft, so this always needs ai_flows:publish (founder decision 2026-10-22); when a live chatbot uses the flow, or the flow has no drafts, it also needs confirm=true. 409 file-exists: rename the file. 403 knowledge-limit: over the plan's knowledge size. Upload: multipart/form-data, the file in file, up to 100 MB per request (413).

  • Scopes: ai_flows:write, ai_flows:publish
  • Rate limit: 30 requests per 60 s per key (upload)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 411, 413, 415, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge/files" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Knowledge pages#

GET/ai-flows/{agent_id}/knowledge/pages

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
agent_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge/pages" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Rescan website#

POST/ai-flows/{agent_id}/knowledge/rescan

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write, ai_flows:publish, builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge/rescan" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Get knowledge sync#

GET/ai-flows/{agent_id}/knowledge/sync

Keep knowledge up to date: schedule is when the flow re-reads its website pages - {mode: off | hourly | every_n_hours (n 2-23) | daily | weekly (weekday 0=Monday) | monthly (day 1-28), time HH:MM and tz (IANA) for the clock modes}; only pages that changed (ETag / Last-Modified / content hash) are re-indexed. last_update {status: done | held | failed, note, checked_at, changed_at}: note is the owner's line, e.g. "3 pages updated, 1 removed, 12 unchanged."; held means more than half of the pages were missing or moved, so nothing was applied. Free: allowed_modes is [off] and upgrade says why. 503 knowledge-sync-off while the feature is off.

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
agent_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge/sync" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Set knowledge sync#

PATCH/ai-flows/{agent_id}/knowledge/sync

Every change is recorded in the account's audit log. Body {schedule} or the short form {interval: off | hourly | daily | weekly | monthly, tz?} (the clock time is then picked for you in the early morning). Clock times are wall-clock times in tz, so 08:00 stays 08:00 across daylight saving. Every scheduled update changes live answers (knowledge has no draft), so it needs ai_flows:publish. 400 invalid-schedule | invalid-timezone | schedule-too-frequent (min_hours); 403 plan-required: Free has Update now only. A run that is still going is never started twice.

  • Scopes: ai_flows:write, ai_flows:publish
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge/sync" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Run knowledge sync#

POST/ai-flows/{agent_id}/knowledge/sync/run

Every change is recorded in the account's audit log. Update now: queues a re-check in the background (202) or returns the update already running (already_running: true). Poll GET .../knowledge/sync. Changes apply to live chatbots at once, so it needs ai_flows:publish and builders:test (it reads websites and spends AI on changed pages). 409 no-website-knowledge; 429 update-limit (per flow and per account per 24 hours; available_at).

  • Scopes: ai_flows:write, ai_flows:publish, builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge/sync/run" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Add knowledge urls#

POST/ai-flows/{agent_id}/knowledge/urls

Every change is recorded in the account's audit log. Adds website pages and re-indexes the flow's knowledge (reads every included page again, embeds, replaces the vectors). Knowledge has no draft: live chatbots search the new pages as soon as this answers, so it needs ai_flows:publish (with ai_flows:write and builders:test). Every URL passes the SSRF guard first (400 url-blocked: private, loopback, link-local, IP literal or blocked host). 409 knowledge-too-large over 50 included pages: exclude pages or use /knowledge/rescan. A Knowledge step with selected_sources searches the new pages only after you add them to its filter (update_ai_node).

  • Scopes: ai_flows:write, ai_flows:publish, builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge/urls" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Set website knowledge#

PATCH/ai-flows/{agent_id}/knowledge/website

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/knowledge/website" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Add node#

POST/ai-flows/{agent_id}/nodes

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/nodes" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Update node#

PATCH/ai-flows/{agent_id}/nodes/{node_id}

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring
node_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/nodes/{node_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete node#

DELETE/ai-flows/{agent_id}/nodes/{node_id}

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring
node_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/nodes/{node_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Output schema#

PUT/ai-flows/{agent_id}/nodes/{node_id}/output-schema

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring
node_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/nodes/{node_id}/output-schema" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Set profile#

PATCH/ai-flows/{agent_id}/profile

Every change is recorded in the account's audit log. Flows built from a website only: name, greeting, tone, contact rewrite the answer step's system prompt and start message. Goes live at once and publishes the flow's draft with it, so it needs ai_flows:publish and {"confirm": true}.

  • Scopes: ai_flows:write, ai_flows:publish
  • Rate limit: 10 requests per 600 s per key (publish)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/profile" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Publish#

POST/ai-flows/{agent_id}/publish

Every change is recorded in the account's audit log. Makes the flow's draft its live version: every chatbot whose AI step uses the flow answers with it. An AI flow has no link or widget of its own; put it in a chatbot to reach customers.

  • Scopes: ai_flows:publish
  • Rate limit: 10 requests per 600 s per key (publish)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/publish" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Retrieval preview#

POST/ai-flows/{agent_id}/retrieval-preview

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:read, builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/retrieval-preview" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Rollback#

POST/ai-flows/{agent_id}/rollback

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:publish
  • Rate limit: 10 requests per 600 s per key (publish)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/rollback" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Settings#

PATCH/ai-flows/{agent_id}/settings

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/settings" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Run test#

POST/ai-flows/{agent_id}/test

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:read, builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Get validation#

GET/ai-flows/{agent_id}/validation

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
agent_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/validation" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get versions#

GET/ai-flows/{agent_id}/versions

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
agent_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/versions" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Enable versions#

POST/ai-flows/{agent_id}/versions/enable

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
agent_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-flows/{agent_id}/versions/enable" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Node types#

GET/ai-flows/node-types

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-flows/node-types" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

AI models#

Ai models#

GET/ai-models

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-models" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Channels#

Channels#

GET/channels

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/channels" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Activity#

GET/channels/{kind}/{ref}/activity

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
kind (required)pathstring
ref (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/channels/{kind}/{ref}/activity" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Activity settings#

PUT/channels/{kind}/{ref}/activity/settings

Every change is recorded in the account's audit log.

  • Scopes: channels:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
kind (required)pathstring
ref (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/channels/{kind}/{ref}/activity/settings" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Assign#

PUT/channels/{kind}/{ref}/bot

Every change is recorded in the account's audit log.

  • Scopes: channels:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
kind (required)pathstring
ref (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/channels/{kind}/{ref}/bot" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Unassign#

DELETE/channels/{kind}/{ref}/bot

Every change is recorded in the account's audit log.

  • Scopes: channels:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
kind (required)pathstring
ref (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/channels/{kind}/{ref}/bot" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Set channel replies#

PUT/channels/{kind}/{ref}/replies

Every change is recorded in the account's audit log. Body {enabled: bool}: false turns the bot's replies on this channel off, true turns them back on (idempotent). While off, customers' messages are still stored and show in the Inbox as Not answered (unanswered_reason channel_off), with one notice per channel per day. Human mode is never changed: turned back on, every conversation continues where it was. kind and ref as GET /channels/replies lists them; 404 channel-not-found for a channel the account doesn't have.

  • Scopes: channels:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
kind (required)pathstring
ref (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/channels/{kind}/{ref}/replies" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Get green api health#

GET/channels/green-api/health

The Green API instance: {connected, owner, id_instance, state, live, broken, broken_reason, replace_allowed, replacement}. Never the token or the QR code; reconnect and replace are in the dashboard.

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/channels/green-api/health" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get green api state#

GET/channels/green-api/state

Green API's live authorization state: {id_instance, state} (authorized | notAuthorized | blocked | starting | ...). 404 no-instance; 409 instance-invalid; 503 green-unavailable.

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/channels/green-api/state" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

List channel replies#

GET/channels/replies

The account's connected channels: {channels: [{kind (meta | green_api | maytapi | web), ref, label, provider, enabled, changed_at}], available}. enabled false: the bot doesn't answer on that channel. Every channel is on until its owner turns it off.

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/channels/replies" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

WhatsApp templates#

Whatsapp templates#

GET/whatsapp-templates

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/whatsapp-templates" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Messages#

Send message#

POST/messages

Every change is recorded in the account's audit log.

  • Scopes: messages:send
  • Rate limit: 60 requests per 60 s per key (send)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/messages" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Bot messages#

Get account messages#

GET/bot-messages/account

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/bot-messages/account" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Put account messages#

PUT/bot-messages/account

Every change is recorded in the account's audit log.

  • Scopes: account:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/bot-messages/account" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Bot messages catalog#

GET/bot-messages/catalog

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/bot-messages/catalog" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Chats#

List chats#

GET/chats

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/chats" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get chat#

GET/chats/{chat_id}

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
chat_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/chats/{chat_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get chat delivery#

GET/chats/{chat_id}/delivery

Sent / delivered / read / failed of the bot's messages in one chat over the last 7 days: {chat_id, channel, enabled, days, data: [{message_id, sent_time, status, status_time, reason_key}]}. Only WhatsApp Cloud API (meta) chats have ticks. enabled false: ticks aren't recorded for this account.

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
chat_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/chats/{chat_id}/delivery" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

List chat flows#

GET/chats/{chat_id}/flows

Send a flow: {chat_id, channel, bot_id, can_start, blocked: null | {code, detail}, human_mode, window: {applies, open}, flows: [{id, kind: catch_hook | step, name, ques_name, first_message_preview, first_is_template, variables: [{name, label, prefill}]}]}. The steps are the live chatbot's that answers this chat (Catch Hooks first). Website chats too (no window, every plan).

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
chat_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/chats/{chat_id}/flows" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Start chat flow#

POST/chats/{chat_id}/flows

Every change is recorded in the account's audit log. Body {step: <ques_name> | catch_hook: <name>, data?: {variable: text}, return_to_bot?: bool, visitor_id? (website chats)}. 201 {started, chat_id, kind, step, released} (website chats add visitor_id, flow_id, delivery; the visitor's widget picks the flow up with its poll; 409 web-visitor-unknown / -inactive / -ambiguous as for website replies). A paused customer: 409 human-mode with nothing sent or changed unless return_to_bot is true (needs conversations:write too): then the customer is returned to the bot (recorded) and the flow starts. 409 outside-window: Meta, window closed and the first message isn't a template. 404 step-not-found, 409 channel-not-connected, 403 plan-no-api-send, 422 channel-not-supported (legacy channels).

  • Scopes: messages:send
  • Rate limit: 60 requests per 60 s per key (send)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
chat_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/chats/{chat_id}/flows" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Pause chat#

POST/chats/{chat_id}/pause

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
chat_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/chats/{chat_id}/pause" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Resume chat#

POST/chats/{chat_id}/resume

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
chat_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/chats/{chat_id}/resume" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Resume all chats#

POST/chats/resume-all

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/chats/resume-all" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

List waiting chats#

GET/chats/waiting

The chats that are with a person now (the dashboard's Waiting for you), newest activity first: {count (first page), data: [{chat_id, channel, customer, last_updated, message_count, human_mode {active, since, source, until}}], next_cursor, redacted}. source owner_phone | handoff | api | dashboard | keyword; until null = until someone gives it back. Read only: nothing is released.

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/chats/waiting" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Conversations#

List conversations#

GET/conversations

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/conversations" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get conversation#

GET/conversations/{conversation_id}

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
conversation_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/conversations/{conversation_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Conversation activity#

GET/conversations/activity

Every conversation active since since (default 30 days ago, at most 800), newest first, at most limit (1-200, default 50): {data: [{chat_id, channel, customer, last_updated, messages: [{role, time, is_error, step_type, has_buttons}]}], since, truncated, redacted}. No message texts; role notice is an owner notice (read it with GET /conversations/{conversation_id}).

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/conversations/activity" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Customers#

List customers#

GET/customers

  • Scopes: customers:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/customers" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get customer#

GET/customers/{phone}

  • Scopes: customers:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
phone (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/customers/{phone}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Update customer#

PATCH/customers/{phone}

Every change is recorded in the account's audit log.

  • Scopes: customers:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
phone (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/customers/{phone}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Erase customer#

DELETE/customers/{phone}

Every change is recorded in the account's audit log. Body {"confirm": true}. Permanently deletes the customer's data on THIS account: conversations, tags, attributes, human mode, opt-out, block and the live bot session. Other accounts' data for the same number is never touched; the shared contact is removed only when no account uses it. Kept: usage and billing counters, logs, and webhook deliveries already queued or sent. 400 confirm-required without confirm (nothing deleted). Export first if you need a copy.

  • Scopes: customers:erase
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
phone (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/customers/{phone}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Export customer#

GET/customers/{phone}/export

Everything this account stores about the customer, unmasked (a data-subject access request): the contact, the account's link (first seen, human mode, opt-out, block), tags, attributes, every conversation with all its messages, and the live bot sessions (variables, answers, current step). 404 customer-not-found when the account has nothing for this number.

  • Scopes: customers:read, conversations:read_pii
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
phone (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/customers/{phone}/export" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Webhooks#

List webhooks#

GET/webhooks

  • Scopes: webhooks:manage
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/webhooks" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Create webhook#

POST/webhooks

Every change is recorded in the account's audit log.

  • Scopes: webhooks:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/webhooks" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Get webhook#

GET/webhooks/{webhook_id}

  • Scopes: webhooks:manage
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
webhook_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/webhooks/{webhook_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Update webhook#

PATCH/webhooks/{webhook_id}

Every change is recorded in the account's audit log.

  • Scopes: webhooks:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
webhook_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/webhooks/{webhook_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete webhook#

DELETE/webhooks/{webhook_id}

Every change is recorded in the account's audit log.

  • Scopes: webhooks:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
webhook_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/webhooks/{webhook_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

List webhook deliveries#

GET/webhooks/{webhook_id}/deliveries

  • Scopes: webhooks:manage
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
webhook_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/webhooks/{webhook_id}/deliveries" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Redeliver webhook#

POST/webhooks/{webhook_id}/deliveries/{delivery_id}/redeliver

Every change is recorded in the account's audit log.

  • Scopes: webhooks:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
delivery_id (required)pathstring
webhook_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/webhooks/{webhook_id}/deliveries/{delivery_id}/redeliver" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Rotate webhook secret#

POST/webhooks/{webhook_id}/rotate-secret

Every change is recorded in the account's audit log.

  • Scopes: webhooks:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
webhook_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/webhooks/{webhook_id}/rotate-secret" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Send webhook test#

POST/webhooks/{webhook_id}/test

Every change is recorded in the account's audit log.

  • Scopes: webhooks:manage
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
webhook_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/webhooks/{webhook_id}/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Webhook event types#

GET/webhooks/event-types

  • Scopes: webhooks:manage
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/webhooks/event-types" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Catch Hook events#

List catch hook events#

GET/catch-hook-events

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/catch-hook-events" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get catch hook event#

GET/catch-hook-events/{hook_key}/{event_id}

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
event_id (required)pathstring
hook_key (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/catch-hook-events/{hook_key}/{event_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Test catch hook#

POST/catch-hook-events/test

Every change is recorded in the account's audit log. Body {hook_key, channel?, customer_phone?, data?, builder_id?}. Sends the dashboard's test request into your own Catch Hook (POST /sendMessage) so it shows in GET /catch-hook-events. channel preview (the only channel) runs the step's draft and messages only your own number (the default customer_phone). A live channel (meta, greenAPI, mayTapi) is refused with 400 preview-only: the test never messages a real customer; a live run is a real POST /sendMessage from your system. data defaults to a sample order. The Catch Hook's own errors are the answer: {started: false, status, response}.

  • Scopes: builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/catch-hook-events/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Google#

Google audit#

GET/google/audit

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/google/audit" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Google connections#

GET/google/connections

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/google/connections" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Disconnect google connection#

DELETE/google/connections/{connection_id}

Every change is recorded in the account's audit log. Body {confirm: true}. Removes the Google account from this account (Google's grant is revoked when no other account uses it). Without confirm: 400 confirm-required with steps_using and nothing changes. The answer lists steps_using [{version (draft | live), builder_id, builder_name, step_id, step_name, type}]: those steps fail (their Error output runs) until another Google account is chosen in them. Reconnecting is only possible in the dashboard. Workspace members need the owner or admin role.

  • Scopes: integrations:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
connection_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/google/connections/{connection_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Google calendars#

GET/google/connections/{connection_id}/calendars

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
connection_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/google/connections/{connection_id}/calendars" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Check google connection#

POST/google/connections/{connection_id}/check

Health check of one connected Google account: gets a fresh access token and reads the profile. status becomes active, or needs_reauth when Google asks the owner to sign in again (reconnect in the dashboard). Changes no setting; no token is ever returned.

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
connection_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/google/connections/{connection_id}/check" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Google spreadsheet#

GET/google/connections/{connection_id}/spreadsheets/{spreadsheet_id}

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
connection_id (required)pathstring
spreadsheet_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/google/connections/{connection_id}/spreadsheets/{spreadsheet_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Test google step#

POST/google/steps/test

Every change is recorded in the account's audit log. Body {type: GOOGLE_SHEETS | GOOGLE_CALENDAR | GMAIL, google: the step's settings, sample?: {answers, data}, step_id?}. REALLY runs the action once against the connected Google account. Write actions change real data: append_row / update_row / clear_range / add_tab write to the spreadsheet, create_event / update_event / delete_event change the calendar (guests may be emailed, per sendUpdates), send_email / reply_email send the email. find_rows, get_rows, find_events, list_day, free_busy, suggest_slots and search_emails only read. Google's failures are the answer: {ok: false, error: {code, message}}.

  • Scopes: builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/google/steps/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Google trigger runs#

GET/google/triggers/runs

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/google/triggers/runs" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Test google trigger#

POST/google/triggers/test

Every change is recorded in the account's audit log. Body {trigger: the TRIGGER step's settings, step_id?}. Reads only: a sample of what would start the flow (the latest changed calendar event, the last sheet row, a sample form submission, the next schedule runs) with the phone it would message and the fields it saves. Nothing is sent.

  • Scopes: builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/google/triggers/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Make#

Make audit#

GET/make/audit

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/make/audit" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Make connection#

GET/make/connection

Connection status only: the Make API token is never returned (token_hint shows its last four characters). Connecting and disconnecting Make happen in the dashboard.

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/make/connection" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Make hooks#

GET/make/hooks

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/make/hooks" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Create make hook#

POST/make/hooks

Every change is recorded in the account's audit log. Body {name} (up to 128 characters). Creates a webhook in the chosen Make team; its URL is never returned (it is a bearer secret). Use the hook id in a MAKE_RUN step (action send_webhook).

  • Scopes: integrations:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/make/hooks" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Make scenarios#

GET/make/scenarios

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/make/scenarios" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Make scenario#

GET/make/scenarios/{scenario_id}

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
scenario_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/make/scenarios/{scenario_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Test make step#

POST/make/steps/test

Every change is recorded in the account's audit log. Body {make: the MAKE_RUN step's settings, sample?: {answers, data}, step_id?}. REALLY runs the Make scenario once (run_scenario) or posts the mapped data to the Make webhook (send_webhook): whatever the scenario does (write to a sheet, a CRM, send an email) happens. Make's failures are the answer: {ok: false, error: {code, message}}.

  • Scopes: builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/make/steps/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Choose make target#

PUT/make/target

Every change is recorded in the account's audit log. Body {organization_id, team_id} from GET /make/targets. Every Make call uses that team from then on; Make steps set to scenarios or webhooks of the previous team stop working (make-other-team) until they are set again. Nothing created in the previous team is changed. Workspace members need the owner or admin role.

  • Scopes: integrations:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/make/target" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Make targets#

GET/make/targets

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/make/targets" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Account#

List account alerts#

GET/account/alerts

Open account incidents, as the dashboard banner shows them: {enabled, checks, auto_repair, alerts: [{id, kind, severity, ...}]} (Green API watchdog: green_disconnected, green_webhook_conflict, ...; blocking notices). Fixing them is done in Dashboard > Channels.

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/account/alerts" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Agent tools#

List tools#

GET/agent-tools

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/agent-tools" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get tool#

GET/agent-tools/{name}

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
name (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/agent-tools/{name}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Save tool#

PUT/agent-tools/{name}

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
name (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/agent-tools/{name}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete tool#

DELETE/agent-tools/{name}

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:publish
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
name (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/agent-tools/{name}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Test tool#

POST/agent-tools/{name}/test

Every change is recorded in the account's audit log.

  • Scopes: ai_flows:read, builders:test
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
name (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/agent-tools/{name}/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Guide#

GET/agent-tools/guide

  • Scopes: ai_flows:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/agent-tools/guide" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Ai keys#

List ai keys#

GET/ai-keys

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/ai-keys" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Save ai key#

PUT/ai-keys/{provider}

Every change is recorded in the account's audit log. Body {api_key}. The key is checked with the provider (a free list-models call), sealed and stored; 201 when new, 200 when it replaced a key. Write-only: answers carry the provider, set, last4, status and dates, never the key. 422 key-rejected: the provider refused it. Pro only (403 upgrade-required).

  • Scopes: ai_keys:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
provider (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/ai-keys/{provider}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete ai key#

DELETE/ai-keys/{provider}

Every change is recorded in the account's audit log. Removes the key: AI calls to this provider use AI credits again. Allowed on every plan.

  • Scopes: ai_keys:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
provider (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/ai-keys/{provider}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Test ai key#

POST/ai-keys/{provider}/test

Every change is recorded in the account's audit log. Checks the saved key with the provider again and records the result: {provider, ok, detail}.

  • Scopes: ai_keys:manage
  • Rate limit: 30 requests per 600 s per key (test)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
provider (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/ai-keys/{provider}/test" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Blocked numbers#

List blocked numbers#

GET/blocked-numbers

Numbers the bot doesn't answer: {data: [{phone, customer_id, blocked_at}], next_cursor, redacted}, most recently blocked first. Phones are masked unless redact=false (needs conversations:read_pii).

  • Scopes: customers:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/blocked-numbers" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Block number#

PUT/blocked-numbers/{phone}

Every change is recorded in the account's audit log. No body. The bot stops answering this number on every WhatsApp channel of the account (the website chat has no number) and never sends it anything; its messages still show in the Inbox as Not answered: blocked number (one owner notice per customer per day, saying how to unblock). Needs customers:block (customers:write alone can't block). Human mode, opt-out and the conversation don't change, and messages you send yourself still go (use opted_out on PATCH /customers to stop API sends). Works for a number that never wrote. Idempotent: already blocked keeps its blocked_at. 409 block-list-full at 5000 numbers. Not the legacy POST /insert_black_list (a legacy transaction marker).

  • Scopes: customers:block
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
phone (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/blocked-numbers/{phone}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Unblock number#

DELETE/blocked-numbers/{phone}

Every change is recorded in the account's audit log. No body. The bot answers this number's next message, continuing where the conversation was. previously_blocked false: it wasn't blocked (nothing changed).

  • Scopes: customers:block
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
phone (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/blocked-numbers/{phone}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Builder folders#

List folders#

GET/builder-folders

  • Scopes: builders:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/builder-folders" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Create folder#

POST/builder-folders

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/builder-folders" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Rename folder#

PATCH/builder-folders/{folder_id}

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
folder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PATCH "https://api.agentim.ai/v1/public/builder-folders/{folder_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete folder#

DELETE/builder-folders/{folder_id}

Every change is recorded in the account's audit log.

  • Scopes: builders:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
folder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/builder-folders/{folder_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Channel bots#

Overview#

GET/channel-bots

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/channel-bots" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Default bot#

Default bot#

PUT/default-bot

Every change is recorded in the account's audit log.

  • Scopes: channels:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/default-bot" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Inbox#

Inbox changes#

GET/inbox/changes

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/inbox/changes" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Get inbox chat#

GET/inbox/chats/{chat_id}

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)
ParameterInTypeDescription
chat_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/inbox/chats/{chat_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Set inbox chat assignee#

PUT/inbox/chats/{chat_id}/assignee

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
chat_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/inbox/chats/{chat_id}/assignee" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Set inbox chat labels#

PUT/inbox/chats/{chat_id}/labels

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
chat_id (required)pathstring

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/inbox/chats/{chat_id}/labels" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Mark inbox chat read#

POST/inbox/chats/{chat_id}/read

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
chat_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/inbox/chats/{chat_id}/read" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Add inbox reminder#

POST/inbox/chats/{chat_id}/reminders

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
chat_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/inbox/chats/{chat_id}/reminders" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

List inbox labels#

GET/inbox/labels

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/inbox/labels" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

List inbox members#

GET/inbox/members

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/inbox/members" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

List inbox quick replies#

GET/inbox/quick-replies

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/inbox/quick-replies" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Add inbox quick reply#

POST/inbox/quick-replies

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/inbox/quick-replies" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Delete inbox quick reply#

DELETE/inbox/quick-replies/{reply_id}

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
reply_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/inbox/quick-replies/{reply_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

List inbox reminders#

GET/inbox/reminders

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/inbox/reminders" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Cancel inbox reminder#

DELETE/inbox/reminders/{reminder_id}

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
reminder_id (required)pathstring

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X DELETE "https://api.agentim.ai/v1/public/inbox/reminders/{reminder_id}" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Finish inbox reminder#

POST/inbox/reminders/{reminder_id}/done

Every change is recorded in the account's audit log.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
reminder_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/inbox/reminders/{reminder_id}/done" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Media#

Upload media#

POST/media

Every change is recorded in the account's audit log. Form fields: file, kind? (image|video|audio|document|sticker). Same limits as the dashboard upload (WhatsApp's: images 5 MB, video / audio 16 MB, documents 100 MB, WEBP stickers 500 KB; the content must match the extension). Answers 201 {url, file_name, kind, content_type, size}: use url as the media URL of a MEDIA step, a media header or a message. A retry with the same Idempotency-Key and file stores nothing twice. Upload: multipart/form-data, the file in file, up to 100 MB per request (413).

  • Scopes: builders:write
  • Rate limit: 30 requests per 60 s per key (upload)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 411, 413, 415, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/media" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Notifications#

List notifications#

GET/notifications

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/notifications" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Mark notifications read#

POST/notifications/read

Every change is recorded in the account's audit log.

  • Scopes: account:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/notifications/read" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Mark all notifications read#

POST/notifications/read-all

Every change is recorded in the account's audit log.

  • Scopes: account:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/notifications/read-all" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Settings#

Get owner replies#

GET/settings/owner-replies

"When I reply from my phone": {mode, hours, is_default, updated_at, available}. mode until_thanks (default): the owner's reply from their phone pauses the bot for that customer until they send #thanks; hours: pauses it for hours hours (1-72, each further reply extends it); off: the owner's replies never pause the bot.

  • Scopes: conversations:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/settings/owner-replies" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Set owner replies#

PUT/settings/owner-replies

Every change is recorded in the account's audit log. Body {mode: until_thanks | hours | off, hours: 1-72 (mode hours only)}. Changes the setting only: no conversation is paused or released, and a conversation already with a person keeps its pause (the setting applies to the owner's replies from then on). Hand a chat back with POST /chats/{chat_id}/resume. 422 invalid-setting; 503 not-migrated.

  • Scopes: conversations:write
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.

Request body: a JSON object.

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X PUT "https://api.agentim.ai/v1/public/settings/owner-replies" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Stats#

Stats#

GET/stats

The dashboard home numbers for whole UTC days ?from=YYYY-MM-DD&to=YYYY-MM-DD (default the last 30 days, at most 366): conversations, messages, inbound / outbound, errors and error_rate, ai_replies, median_first_response_seconds, avg_response_seconds, new / returning customers, by_day, channels, previous_period, ai_usage (tokens per model per month) and recent chatbots / AI flows.

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/stats" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Whatsapp#

List whatsapp alerts#

GET/whatsapp/alerts

Open Meta alerts, worst first: {enabled, data: [{id, kind, severity, state, template_name, opened_at, expires_at, action_url, copy: {en, he}}]}. kind meta_template | meta_template_quality | meta_template_category | meta_phone_quality | meta_messaging_limit | meta_account | meta_note.

  • Scopes: account:read
  • Rate limit: 300 requests per 60 s per key (read)

Responses:

  • 200 Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X GET "https://api.agentim.ai/v1/public/whatsapp/alerts" \
  -H "x-agentim-token: $AGENTIM_API_KEY"

Dismiss whatsapp alert#

POST/whatsapp/alerts/{alert_id}/dismiss

Every change is recorded in the account's audit log. Hides one banner in the dashboard (it comes back on the next state change). Doesn't fix the cause. 404 alert-not-found: already closed or not this account's.

  • Scopes: account:manage
  • Rate limit: 120 requests per 60 s per key (write)
  • Idempotency: send an Idempotency-Key header. A retry with the same key and body gets the first answer and changes nothing.
ParameterInTypeDescription
alert_id (required)pathstring

Request body: a JSON object.

Responses:

  • 2XX Success (JSON). Lists: {data, next_cursor}; pass next_cursor as cursor.
  • 429 Too many requests: wait Retry-After seconds.
  • 400, 401, 403, 404, 409, 503 Error as application/problem+json: code is stable, detail says what to do.
curl
curl -X POST "https://api.agentim.ai/v1/public/whatsapp/alerts/{alert_id}/dismiss" \
  -H "x-agentim-token: $AGENTIM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'