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

# Start Browser Call Request

> Authorized by the request's `start_capability`. The same start as POST /call-requests/{id}/start - a fresh SDP offer for a request that reports `ready`, answered `201` with the SDP answer, `pc_id`, `ice_candidate_url` and `call_id` - with the same refusals.


The **browser data plane**: the `start_url` a browser call request answered with,
authorized by the request's `start_capability` as `x-yappr-call-request-key`. Once the
[poll](https://docs.goyappr.com/api-reference/web-call/request-get.md) reads `ready`, the browser sends a fresh SDP
offer here, takes a line and gets the answer it completes the connection with.

```bash theme={null}
curl -X POST https://api.goyappr.com/web-call/call-requests/REQUEST_ID/start \
  -H "x-yappr-call-request-key: START_CAPABILITY" \
  -H "Content-Type: application/json" \
  -d '{ "sdp": "v=0…", "type": "offer" }'
```

```json theme={null}
{
  "sdp": "v=0…",
  "type": "answer",
  "pc_id": "…",
  "ice_candidate_url": "https://voice.goyappr.com/api/web-call/offer",
  "call_id": "7c4d…",
  "request_id": "9f1c…",
  "run_id": "4ab2…",
  "replayed": false
}
```

It is the same start as [`POST /call-requests/{id}/start`](https://docs.goyappr.com/api-reference/calls/request-start),
with the same rules: build the peer connection **now**, not before the steps ran, and a
start is one offer - the same offer again returns the same peer with `replayed: true`, and
a different one is `409 WORKFLOW_START_ALREADY_CLAIMED`. `call_id` is the call record.

To skip the wait for `ready`, send the offer as soon as you have it with `"wait_for_ready_ms": 15000`
(at most 15000): the start waits up to that long for the steps to finish, then takes the line. If they have not
finished by then, or they failed, the answer is `409 WORKFLOW_START_NOT_READY` and you poll the request
(it says why) and start again as usual.

| Status | Code | What to do |
| - | - | - |
| `400` | `INVALID_START_WAIT` | `wait_for_ready_ms` must be a whole number of milliseconds, 0 or more. |
| `401` | `CALL_REQUEST_KEY_REQUIRED` | Send the `start_capability` as `x-yappr-call-request-key`. |
| `403` | `WORKFLOW_START_DENIED` | The capability does not belong to that request. |
| `409` | `WORKFLOW_START_NOT_READY` | The steps have not finished. Poll until the request reads `ready`. |
| `409` | `WORKFLOW_START_ALREADY_CLAIMED` | Already started with a different offer. Create a new request. |
| `409` | `WORKFLOW_REQUEST_CANCELLED` | Cancelled. Create a new request. |
| `410` | `WORKFLOW_START_EXPIRED` | The request outlived `expires_at`. Create a new one. |
| `502` | `WEB_START_REFUSED` | The voice server refused the offer. The request is finished; create a new one. |
| `503` | `AT_CAPACITY` | Every line is busy and nothing was claimed. Poll and start again. |
| `503` | `AUTH_UNAVAILABLE` | A start aimed at the testing server could not check its sign-in just now. Nothing was claimed; retry. |
| `503` | `WEB_START_UNAVAILABLE` | The voice server never answered. The request is finished; create a new one. |


## OpenAPI

````yaml POST /web-call/call-requests/{id}/start
openapi: 3.1.0
info:
  title: Yappr API
  description: >
    Create and manage AI voice agents, purchase phone numbers, configure tools,
    and initiate calls — all via REST.
  version: 1.0.0
  contact:
    url: https://goyappr.com
servers:
  - url: https://api.goyappr.com
    description: Production
security:
  - apiKey: []
paths:
  /web-call/call-requests/{id}/start:
    servers:
      - url: https://api.goyappr.com
        description: >-
          Browser data plane, on the API host (the web mint's connection.host).
          Takes a session token, a call request's capability or a shared link -
          never the secret key.
    post:
      tags:
        - Calls
      summary: Start a browser call request (data plane)
      description: >
        Authorized by the request's `start_capability`. The same start as POST
        /call-requests/{id}/start - a fresh SDP offer for a request that reports
        `ready`, answered `201` with the SDP answer, `pc_id`,
        `ice_candidate_url` and `call_id` - with the same refusals.
      operationId: startBrowserCallRequest
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
        - in: header
          name: x-yappr-call-request-key
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - sdp
                - type
              properties:
                sdp:
                  type: string
                type:
                  type: string
                  enum:
                    - offer
                wait_for_ready_ms:
                  type: integer
                  minimum: 0
                  description: >
                    Optional. Send the offer while the request is still
                    preparing and let the start wait up to this many
                    milliseconds (at most 15000) for it to read `ready`, instead
                    of polling first. Absent or 0, a request that is not ready
                    is refused at once with WORKFLOW_START_NOT_READY. A request
                    whose steps failed is refused the same way once the wait
                    runs out; poll it to read why.
      responses:
        '201':
          description: The call is live. Complete the WebRTC connection with this answer.
          content:
            application/json:
              schema:
                type: object
                required:
                  - sdp
                  - type
                  - pc_id
                  - call_id
                  - request_id
                properties:
                  sdp:
                    type: string
                  type:
                    type: string
                    enum:
                      - answer
                  pc_id:
                    type: string
                  ice_candidate_url:
                    type: string
                    format: uri
                  call_id:
                    type: string
                    format: uuid
                  request_id:
                    type: string
                    format: uuid
                  run_id:
                    type: string
                    format: uuid
                  replayed:
                    type: boolean
        '400':
          description: >-
            INVALID_START_WAIT — wait_for_ready_ms is not a non-negative number
            of milliseconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            CALL_REQUEST_KEY_REQUIRED — no x-yappr-call-request-key header was
            sent. A capability that is sent and is not this request's is the
            403.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            WORKFLOW_START_DENIED — the capability does not belong to that
            request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            WORKFLOW_START_NOT_READY, WORKFLOW_START_ALREADY_CLAIMED or
            WORKFLOW_REQUEST_CANCELLED, as on POST /call-requests/{id}/start.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          description: >-
            WORKFLOW_START_EXPIRED — the request outlived its expiry. Create a
            new one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            WEB_START_REFUSED — the voice server refused the offer; the request
            is finished.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            AT_CAPACITY (nothing claimed; poll and start again),
            WEB_START_UNAVAILABLE (the voice server never answered; the request
            is finished) or AUTH_UNAVAILABLE (a start aimed at the testing
            server could not check its sign-in just now; nothing was claimed;
            retry).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    Error:
      type: object
      required:
        - error
        - code
      description: >
        Every error response - the secret-key API and the browser data plane
        alike - carries a

        human-readable `error` and a stable machine `code`, and a refusal that
        names what is

        wrong with the request carries `issues[]` too. Branch on `code`, never
        on the `error`

        text. A refusal that names nothing more specific carries the code its
        status means:

        `BAD_REQUEST` (400), `UNAUTHORIZED` (401, the browser data plane; the
        secret-key API

        answers `MISSING_KEY`, `INVALID_KEY` or `EXPIRED_KEY`), `BILLING_ERROR`
        (402),

        `FORBIDDEN` (403), `NOT_FOUND` (404), `METHOD_NOT_ALLOWED` (405),
        `CONFLICT` (409),

        `GONE` (410), `PAYLOAD_TOO_LARGE` (413), `UNSUPPORTED_MEDIA_TYPE` (415),

        `UNPROCESSABLE_REQUEST` (422), `RATE_LIMIT` (429), `INTERNAL_ERROR`
        (500),

        `UPSTREAM_ERROR` (502), `SERVICE_UNAVAILABLE` (503), `UPSTREAM_TIMEOUT`
        (504). Some

        refusals add members of their own beside these (a call request's
        `status`, a workflow's

        `current_version`); the operation says which.
      properties:
        error:
          type: string
          description: The refusal, in one sentence for a person. Its wording may change.
        code:
          type: string
          description: The stable code to branch on.
        issues:
          type: array
          description: >
            Each thing at fault, on a 400 or 422 that names them: every query
            parameter or body field, not just the first. `path` is the
            parameter's name or the field's location.
          items:
            type: object
            required:
              - code
              - message
            properties:
              code:
                type: string
                description: >-
                  query_param_unknown, query_param_repeated, query_param_blank,
                  query_param_invalid, field_unknown, field_required,
                  field_invalid, or the route's own word.
              path:
                type: string
              message:
                type: string
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Your Yappr API key (e.g. `ypr_live_...`). Generate one in the dashboard
        under **Settings → API Keys**. No key is `401 MISSING_KEY`; a key that
        is not one of ours, or is revoked, is `401 INVALID_KEY`; an expired one
        is `401 EXPIRED_KEY`. A valid key without the scope an operation needs
        is `403 INSUFFICIENT_SCOPE` on every operation, and the message names
        the scope. Every response, a 401 included, carries X-RateLimit-Limit,
        X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a
        minute per API key. Every 429, whatever its code, carries Retry-After
        (whole seconds, never zero): the per-key budget's `RATE_LIMIT` asks for
        what is left of the minute, a route's daily cap (`RATE_LIMITED`) for the
        time until that cap resets. All four headers are listed in
        Access-Control-Expose-Headers, so a browser can read them. A path the
        API does not serve (an unknown sub-path, an id left empty) is `404
        ROUTE_NOT_FOUND`, and a method a served path does not take is `405
        METHOD_NOT_ALLOWED` with an `Allow` header; both are answered before any
        scope check, and nothing is read or changed. A trailing slash is ignored
        where it cannot be an id left empty (`POST /calls/` is `POST /calls`)
        and refused where it can (`GET /calls/`). A doubled slash inside a path
        is merged into one before the request reaches the API (`GET //calls` is
        `GET /calls`).

````

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