Developer API

Run your AI agents from your own code

Call an Agentis agent over HTTP and get a reply with its full brain — system prompt, knowledge base, and tools — or manage the agent itself programmatically. Billed against the same credits as WhatsApp.

Get an API key →

Two surfaces

Run

POST /v1/chat/completions

Talk to an agent, get a reply + usage. Needs a key with the chat scope.

Manage

/v1/agents/*

List your agents and configure their webhook tools. Needs a key with the manage scope.

Authentication

Every request authenticates with a bearer API key created in your dashboard. The raw key is shown once at creation — store it securely. Keys carry scopes: chat (run agents, safe to embed client-side) and/or manage (configure agents, keep server-side only).

Authorization: Bearer dz_live_a1b2c3d4...

Quick start — run an agent

curl https://app.dailzero.com/api/v1/chat/completions \
  -H "Authorization: Bearer dz_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "<your-agent-id>",
    "messages": [
      { "role": "user", "content": "do you sell ferrari caps?" }
    ]
  }'

Response

{
  "message": { "role": "assistant", "content": "Yes — Ferrari F1 White Cap (₦23,000)..." },
  "usage": { "input_tokens": 1240, "output_tokens": 142, "credits": 2 },
  "remaining_credits": 11218
}

Manage an agent's tools

Define the webhook tools your agent can call — the same tools it uses on WhatsApp.

curl -X PUT https://app.dailzero.com/api/v1/agents/<id>/tools \
  -H "Authorization: Bearer dz_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "tools": [
    { "name": "check_stock", "description": "Check stock for a product",
      "url": "https://your-api.com/stock", "method": "GET",
      "parameters": [
        { "name": "sku", "type": "string", "description": "Product SKU", "required": true }
      ] }
  ] }'

Limits & safety

Errors

Every error returns { "error": { "code", "message", "request_id" } }. Branch on code.

CodeHTTPMeaning
BAD_REQUEST400Malformed request (bad JSON, missing or oversized fields).
UNAUTHORIZED401Missing, malformed, unknown, or revoked key.
INSUFFICIENT_CREDITS402Account balance can't cover the call.
DAILY_CAP_HIT402The key's daily spending cap is exhausted.
FORBIDDEN_SCOPE403The key lacks the scope this endpoint requires.
AGENT_NOT_FOUND404The agent doesn't exist or isn't yours.
RATE_LIMITED429Too many requests — retry after the Retry-After header.
INTERNAL500Something went wrong on our side.

Ready to build?

Create an API key →