Developers

    PersonaDesk.ai API

    Programmatic access to calls, conversations, routing decisions, and AI receptionist configuration. Use the API to integrate PersonaDesk.ai with your existing tools and workflows.

    Overview

    Base URLs, versioning, and where the API fits into the overall architecture.

    The PersonaDesk.ai API exposes resources for tenants, agents, conversations, messages, and routing decisions. It's designed to be predictable, secure, and composable with your existing stack.

    Base URL

    https://api.personadesk.ai/v1

    Architecture

    JSON over HTTPS, with REST-style resources and webhooks for realtime event delivery.

    All requests must be made over HTTPS. Unencrypted HTTP is not supported.

    Authentication

    Use bearer tokens scoped to your tenant to access API resources.

    The API uses bearer tokens for authentication. Include your key in the Authorization header:

    curl https://api.personadesk.ai/v1/tenants \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json"

    Keep your API keys secret. Never embed them in client-side code or share them publicly. Rotate credentials immediately if you suspect exposure.

    Core resources

    Common resources you'll interact with when integrating PersonaDesk.ai.

    • Tenants – represents a single customer account and configuration.
    • Agents – AI reception agents or human endpoints that handle conversations.
    • Conversations – calls, chats, or sessions with callers and visitors.
    • Messages – individual turns within a conversation, including AI and human messages.

    Example request

    GET /v1/conversations?tenant_id=TENANT_ID
    Host: api.personadesk.ai
    Authorization: Bearer YOUR_API_KEY

    Example response

    {
      "data": [
        {
          "id": "conv_123",
          "tenant_id": "TENANT_ID",
          "status": "completed",
          "channel": "voice",
          "started_at": "2025-01-15T10:24:00Z",
          "ended_at": "2025-01-15T10:26:45Z"
        }
      ],
      "next_cursor": null
    }

    Webhooks & events

    Receive realtime notifications when key events happen in PersonaDesk.ai.

    Configure webhooks to receive POST requests when important events occur, such as a new call starting, a conversation being routed, or a human handoff being requested.

    • call.started – a new inbound call has started.
    • conversation.routed – a conversation has been routed to an agent or queue.
    • handoff.requested – AI has requested a human join or take over.
    • conversation.completed – a call or session has ended and metadata is finalized.

    Example webhook payload

    {
      "type": "conversation.routed",
      "id": "evt_123",
      "created_at": "2025-01-15T10:25:12Z",
      "data": {
        "conversation_id": "conv_123",
        "tenant_id": "TENANT_ID",
        "from_number": "+15551234567",
        "to_agent_id": "agent_abc",
        "route_reason": "lead_high_intent"
      }
    }

    Errors & rate limits

    Standardized HTTP status codes and rate limit behavior.

    The API uses conventional HTTP response codes. 2xx for success, 4xx for client errors, and 5xx for server errors.

    • 400 – validation error or malformed request.
    • 401 – missing or invalid authentication.
    • 403 – not authorized for this resource.
    • 404 – resource not found.
    • 429 – too many requests; slow down and retry later.

    SDKs & examples

    Use official SDKs or copy-pasteable snippets to get started.

    We provide examples for common use cases like syncing conversations to your CRM, triggering workflows on webhooks, and generating analytics dashboards.

    View developer quickstarts

    Need help? Visit the Help Center or Community.