ErzyCall API
    ErzyCall API

    Getting Started

    Quick StartAuthentication

    Guides

    Rate LimitingError HandlingWebhooks

    MCP

    OverviewChat assistantsCoding toolsAutomation platformsTools & permissionsTroubleshooting

    API Reference

    OrganizationCallsContactsCasesCommitmentsAssistantsPhone NumbersContact GroupsUsageWebhook EndpointsWhatsApp

    Commitments

    Read, update and create Observer Ledger commitments through the public REST API

    Commitments track who owes what to whom. Enable Observer Ledger for your organization and approve commitments:read; this permission includes quoted WhatsApp messages. Existing OAuth connections must reconnect to approve new scopes. whatsapp:read alone does not grant ledger access.

    GET /api/v1/commitments accepts exact status values (repeated or comma-separated), waitingOn (business, customer, unclear), conversationId, contactId, search, origin, chatType, statusSource, createdBy, ISO openedFrom, openedTo, and updatedSince. limit is 1–100, default 25. Test chats and internal steps are hidden unless includeTest=true or includeInternalSteps=true.

    For outstanding work use status=owed,disputed&waitingOn=business. status=owed excludes disputed. Search supports titles, subjects, people names and refs such as CHEN-1.

    Lists return compact data rows and pagination: {cursor, hasMore, pageSize}. Filtering can leave a partial or empty page with more results: continue until hasMore=false. Keep filters identical when reusing a cursor; otherwise start without one.

    GET /api/v1/commitments/{commitmentId} returns evidence, history, manual status and links. Obtain IDs from the list. GET /api/v1/commitments/summary returns eligible counts by status and waiting party; it accepts conversationId, contactId, chatType, includeTest.

    LEDGER_DISABLED means an administrator must enable the ledger. NOT_FOUND includes wrong-tenant IDs and erased or archived sources. INVALID_CURSOR requires restarting pagination; INSUFFICIENT_SCOPE requires reconnecting with the new permission. No API deletes commitments.

    PATCH /api/v1/commitments/{commitmentId} requires commitments:write, the current expectedVersion, and an Idempotency-Key header (8–200 characters). Send at least one of status, note, title, or addContext. Only sent fields change. Title is 1–200 characters; note is 1–1000. Status requires a note explaining why.

    Use owed to reopen, delivered for work done, cancelled when no longer needed, or automatic to return control to the Observer. Only the customer in the chat can confirm or dispute. Hand-set statuses win over later Observer changes until automatic. Notes and title corrections do not change status. History records the API key name or OAuth connection.

    A successful write returns {data: {commitmentId, version}}; read the detail again for the current card. On VERSION_CONFLICT, read again and confirm the new proposed change. On an unknown outcome, retry the identical change with the same key: the write and its retry receipt share one database transaction. Reusing a key with different fields returns IDEMPOTENCY_MISMATCH. Receipts expire after 24 hours. MCP additionally requires confirmed: true after user approval.

    To attach context without changing status, send addContext: [{messageId, note?}] (1–10 items, each note up to 1000 characters). Find message IDs using get_whatsapp_conversation; another chat in the same organization is allowed. All messages are validated before any edit. Foreign, deleted, erased or archived sources are refused. Detail context includes notes and attached messages, with the source chat, sender, time and API actor, also shown in dashboard Details. Dependencies and erasure provenance include these messages; losing access to a context source makes the derived commitment unavailable.

    CONTEXT_LIMIT_EXCEEDED means the combined evidence crosses the privacy budget (32 distinct subjects or 512 provenance sources). Attach fewer messages from fewer chats; the edit was not saved. PRIVACY_LIMIT_EXCEEDED means support must resolve a privacy boundary limit before retrying. API request logs contain action metadata; private titles, notes and context stay inside the Ledger erasure boundary.

    POST /api/v1/commitments requires commitments:write and an Idempotency-Key header. First search for an existing commitment, then provide:

    {
      "conversationId": "ID from list_whatsapp_conversations",
      "title": "Book a make-up lesson",
      "delivery": "Book the lesson agreed by phone for Friday",
      "owedBy": "business",
      "origin": "promise",
      "evidenceMessageIds": [],
      "note": "Agreed by phone"
    }

    Title is 1–200 characters; delivery is 1–500. owedBy is business or customer; the other side is owed. origin is ask (default) or promise. Evidence is optional (up to ten available messages from this chat); attach other-chat context afterward with PATCH. A message-free declaration still retains conversation, contact and subject erasure provenance.

    Creation returns HTTP 201 with {data: {commitmentId, version: 1}}. It starts owed, with createdBy: "api" and manual provenance. The dashboard shows Added by hand and an API actor in History. The Observer sees the existing declaration, including its delivery, on later chat activity and can add evidence without making another copy. Creation leaves status under Observer control; use a versioned status update for a hand-set override. Repeating the same request/key replays the original ID/version. Foreign, erased or archived evidence and unavailable chats are refused; erasure also prevents replaying an unavailable creation. MCP create_commitment additionally requires confirmed: true after explicit user approval.

    Cases

    Create, read, update, and delete case records — reusable call scripts with AI instructions.

    Assistants

    List and manage inbound and outbound AI voice assistants.