ErzyCall API
    ErzyCall API

    Getting Started

    Quick StartAuthentication

    Guides

    Rate LimitingError HandlingWebhooks

    API Reference

    CallsContactsCasesAssistantsPhone NumbersContact GroupsWebhook EndpointsWhatsApp

    Authentication

    How to authenticate with the ErzyCall REST API using API keys.

    Every request to the ErzyCall REST API must include a valid API key in the X-API-Key header.

    Obtaining an API Key

    1. Navigate to Settings > API Keys in the ErzyCall dashboard
    2. Click Create API Key
    3. Give it a name and select the scopes your integration needs
    4. Optionally set an expiration date
    5. Copy the key immediately — it is only displayed once
    # Example: using the key in a request
    curl -X GET "https://app.erzycall.com/api/v1/calls" \
      -H "X-API-Key: ek_live_abc123..."

    Key Format

    API keys follow the format ek_{environment}_{random}:

    PrefixEnvironment
    ek_live_Production
    ek_test_Test / Staging

    Scopes

    Each API key is assigned one or more scopes that control which endpoints it can access. Use the principle of least privilege — only grant the scopes your integration actually needs.

    ScopeAllows
    *Full access to all endpoints
    calls:readList and view calls
    calls:writeCreate and cancel calls
    contacts:readList, view, and search contacts
    contacts:writeCreate, update, and delete contacts
    contact_groups:readList contact groups
    cases:readList and view cases
    assistants:readList and view assistants
    assistants:writeUpdate assistant configuration
    phone_numbers:readList phone numbers
    webhooks:readList webhook endpoints
    webhooks:writeCreate, update, and delete webhooks

    If a key lacks the required scope for an endpoint, the API returns a 403 error:

    {
      "error": {
        "code": "INSUFFICIENT_SCOPE",
        "message": "API key lacks required scope: calls:write"
      }
    }

    Key Lifecycle

    StateDescription
    ActiveKey is valid and can make requests
    ExpiredKey has passed its expiration date — returns 401 KEY_EXPIRED
    RevokedKey was manually revoked by an admin — returns 401 KEY_REVOKED

    You can revoke a key at any time from the API Keys settings page. Revocation is immediate and cannot be undone.

    Security Best Practices

    • Never expose keys in client-side code. API keys should only be used from server-side applications.
    • Use environment-specific keys. Create separate keys for test and production environments.
    • Set expiration dates. Rotate keys periodically to limit the blast radius of a leak.
    • Scope keys narrowly. A read-only integration should not have write scopes.
    • Store keys securely. Use environment variables or a secrets manager — never commit keys to source control.

    Error Responses

    StatusCodeMeaning
    401UNAUTHORIZEDMissing or invalid X-API-Key header
    401KEY_REVOKEDAPI key has been revoked
    401KEY_EXPIREDAPI key has expired
    403INSUFFICIENT_SCOPEKey lacks the required scope

    Quick Start

    Get up and running with the ErzyCall REST API in minutes.

    Rate Limiting

    Understand the ErzyCall API rate limits and how to handle 429 responses.

    On this page

    Obtaining an API KeyKey FormatScopesKey LifecycleSecurity Best PracticesError Responses