> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sendora.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Start widget call

> Mint a browser WebRTC call for this widget's agent.

Order: resolve + origin-check the widget, validate the pre-call form,
upsert a lead if phone/email was collected, check tenant budget + daily
cap, atomically reserve a concurrency slot, THEN mint the voice service call -
never spend vendor minutes before every guard has passed. This operation can change workspace data or trigger an external side effect; review the request before sending it and do not retry blindly after a timeout.



## OpenAPI

````yaml /openapi.json post /api/v1/public/widget/{widget_public_id}/calls
openapi: 3.1.0
info:
  description: >-
    Customer-facing API for managing outreach, leads, conversations, voice
    agents, knowledge bases, analytics, and webhooks.
  title: Sendora Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.sendora.ai
security: []
tags:
  - description: Build, launch, pause and stop campaigns, and enroll leads.
    name: Campaigns
  - description: Create, update, tag, enrich and import leads.
    name: Leads
  - description: Group leads into reusable lists.
    name: Lead lists
  - description: Find new prospects and research existing leads.
    name: Prospecting
  - description: Read conversations and send messages to leads.
    name: Inbox
  - description: Manage workspace-wide suppressions.
    name: Do not contact
  - description: Manage the content your agents answer from.
    name: Knowledge bases
  - description: Create, configure, test and publish voice agents.
    name: Voice agents
  - description: Give agents actions such as booking, lookups and transfers.
    name: Agent tools
  - description: Embed a voice agent on your website.
    name: Voice widgets
  - description: Start voice calls and read call results.
    name: Calls
  - description: Browse and preview the voices an agent can use.
    name: Voices
  - description: List numbers, bring your own, and route calls.
    name: Phone numbers
  - description: List the channel accounts connected to the workspace.
    name: Connected accounts
  - description: Register endpoints and review deliveries.
    name: Webhooks
  - description: Drive the workspace assistant programmatically.
    name: Copilot
  - description: Read workspace and campaign performance.
    name: Analytics
  - description: Track asynchronous operations.
    name: Jobs
  - description: Manage client workspaces, plans and branding.
    name: Agency
paths:
  /api/v1/public/widget/{widget_public_id}/calls:
    post:
      tags:
        - Voice widgets
      summary: Start widget call
      description: >-
        Mint a browser WebRTC call for this widget's agent.


        Order: resolve + origin-check the widget, validate the pre-call form,

        upsert a lead if phone/email was collected, check tenant budget + daily

        cap, atomically reserve a concurrency slot, THEN mint the voice service
        call -

        never spend vendor minutes before every guard has passed. This operation
        can change workspace data or trigger an external side effect; review the
        request before sending it and do not retry blindly after a timeout.
      operationId: start_widget_call_api_v1_public_widget__widget_public_id__calls_post
      parameters:
        - description: >-
            The widget's public id, taken from its embed code (Get widget embed
            code).
          in: path
          name: widget_public_id
          required: true
          schema:
            title: Widget Public Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreCallFormPayload'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartCallOut'
          description: Successful Response
        '402':
          description: The workspace is not currently eligible for this billable operation.
        '403':
          description: >-
            The key is valid but the workspace lacks the required entitlement,
            or a widget origin is not allowed.
        '404':
          description: >-
            The resource does not exist or is not owned by the authenticated
            workspace.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '429':
          description: The operation is rate limited. Respect Retry-After before retrying.
        '500':
          description: >-
            An unexpected Sendora error occurred. Retry only if the operation is
            safe to repeat.
        '503':
          description: >-
            The operation is temporarily unavailable. Retry with backoff when
            safe.
      security: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >-
            curl -X POST
            'https://api.sendora.ai/api/v1/public/widget/YOUR_ID/calls' -H
            "Content-Type: application/json" \
              -d '{"consent_accepted":true,"fields":{},"metadata":{}}'
        - label: Python
          lang: python
          source: >-
            import requests


            url = 'https://api.sendora.ai/api/v1/public/widget/YOUR_ID/calls'

            headers = {}

            response = requests.post(url, headers=headers,
            json={'consent_accepted': True, 'fields': {}, 'metadata': {}})

            response.raise_for_status()

            print(response.json())
        - label: JavaScript
          lang: javascript
          source: >-
            const response = await
            fetch("https://api.sendora.ai/api/v1/public/widget/YOUR_ID/calls", {
              method: "POST",
              headers: { 'Content-Type': 'application/json' },
              body: JSON.stringify({"consent_accepted": true, "fields": {}, "metadata": {}}),
            });

            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
        - label: Go
          lang: go
          source: >-
            req, err := http.NewRequest("POST",
            "https://api.sendora.ai/api/v1/public/widget/YOUR_ID/calls",
            bytes.NewBufferString(`{"consent_accepted": true, "fields": {},
            "metadata": {}}`))

            if err != nil { log.Fatal(err) }

            req.Header.Set("Content-Type", "application/json")

            resp, err := http.DefaultClient.Do(req)

            if err != nil { log.Fatal(err) }

            defer resp.Body.Close()
components:
  schemas:
    PreCallFormPayload:
      properties:
        consent_accepted:
          default: false
          description: Consent accepted returned by the Sendora API.
          title: Consent Accepted
          type: boolean
        fields:
          additionalProperties:
            type: string
          description: Fields returned by the Sendora API.
          title: Fields
          type: object
        metadata:
          additionalProperties:
            type: string
          description: Metadata returned by the Sendora API.
          title: Metadata
          type: object
      required: []
      title: PreCallFormPayload
      type: object
    StartCallOut:
      properties:
        call_id:
          description: The id of the call that was started, used by the widget to join it.
          title: Call Id
          type: string
        join_url:
          description: Join url returned by the Sendora API.
          title: Join Url
          type: string
        lead_capture_status:
          default: not_captured
          description: Lead capture status returned by the Sendora API.
          enum:
            - captured
            - not_captured
            - failed
          title: Lead Capture Status
          type: string
      required:
        - join_url
        - call_id
      title: StartCallOut
      type: object
    HTTPValidationError:
      properties:
        detail:
          description: Detail returned by the Sendora API.
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      required: []
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          description: Loc returned by the Sendora API.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          description: Msg returned by the Sendora API.
          title: Message
          type: string
        type:
          description: Type returned by the Sendora API.
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.