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 — manage the agent programmatically, or send outbound WhatsApp messages. Billed against the same credits as WhatsApp. Examples in cURL, JavaScript & Python.

Three 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.

Messaging

POST /v1/messages

Send outbound WhatsApp messages + verify contacts from a connected agent. Needs a key with the messages 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), manage (configure agents), and messages (send outbound) — the last two are server-side only.

Authorization: Bearer dz_live_a1b2c3d4...

Find your agent ID

Every call takes an agentId. Two ways to get it:

Run an agent — chat completions

Send the conversation so far, get the agent's reply with its persona, knowledge base, and tools. Billed by token-weighted credits.

curl https://www.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
}

Send a WhatsApp message

Once your agent's WhatsApp is connected, send outbound messages programmatically. Sends go through the same anti-ban pacing as the dashboard and are billed per message. Want pure outbound with no AI auto-replies? Turn AI replies off for the agent in its settings.

curl https://www.dailzero.com/api/v1/messages \
  -H "Authorization: Bearer dz_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "<your-agent-id>",
    "to": "2348012345678",
    "text": "Hi! Your order #1234 has shipped"
  }'

Response

{
  "message_id": "a1b2c3",
  "status": "queued",
  "usage": { "credits": 5 },
  "remaining_credits": 11195
}

Send an image, video or document

The same endpoint sends media. Set type to image, video or document and pass a publicly reachable mediaUrl. Your agent fetches the file at send time, so the URL must still resolve then — a signed URL needs to outlive the send queue. text becomes the caption.

Documents require fileName, because that is the name WhatsApp shows the recipient. Passing mimeType is optional but recommended. Media costs more than text — see Limits & safety.

# A video, with an optional caption
curl https://www.dailzero.com/api/v1/messages \
  -H "Authorization: Bearer dz_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "<your-agent-id>",
    "to": "2348012345678",
    "type": "video",
    "mediaUrl": "https://cdn.example.com/demo.mp4",
    "text": "Here is the 30-second demo"
  }'

# A document — fileName is required, it is what the recipient sees
curl https://www.dailzero.com/api/v1/messages \
  -H "Authorization: Bearer dz_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "<your-agent-id>",
    "to": "2348012345678",
    "type": "document",
    "mediaUrl": "https://cdn.example.com/price-list.pdf",
    "fileName": "price-list.pdf",
    "mimeType": "application/pdf"
  }'

Response

{
  "message_id": "d4e5f6",
  "status": "queued",
  "usage": { "credits": 12 },
  "remaining_credits": 11183
}

Verify a contact

Check a number is reachable on WhatsApp before sending. Free (no credits).

curl https://www.dailzero.com/api/v1/contacts/check \
  -H "Authorization: Bearer dz_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "agentId": "<your-agent-id>", "phone": "2348012345678" }'

List your agents

Find an agent's id to use in the calls above.

curl https://www.dailzero.com/api/v1/agents \
  -H "Authorization: Bearer dz_live_..."

Manage an agent's tools

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

curl -X PUT https://www.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.
AGENT_NOT_CONNECTED409The agent's WhatsApp isn't connected — connect it before sending.
RATE_LIMITED429Too many requests — retry after the Retry-After header.
INTERNAL500Something went wrong on our side.

Ready to build?

Create an API key →