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

# Call Through A Trigger

> Place an outbound phone call through an agent's API trigger node; `trigger_id` is the trigger node's ID in the agent's flow. Existing integrations keep working; new ones should use `POST /agents/{agent_id}/calls`, which needs no trigger node and takes the agent's ID. Body: `phone_number` (E.164) and optional `initial_context`, side by side. The response's `workflow_run_id` is the conversation to read afterwards with `GET /agents/{agent_id}/conversations/{conversation_id}`.

Errors: 401 bad key, 402 no credits, 403 key from another organization, outbound calling blocked or the number on the do-not-call list (`do_not_call: ...`), 404 trigger missing or inactive, 409 outside calling hours (08:00-21:00 recipient's time; `Retry-After` and `detail.retry_at` say when), 429 all outbound channels busy (`Retry-After` in seconds).



## OpenAPI

````yaml /api-reference/openapi.en.json post /api/v1/triggers/{trigger_id}/calls
openapi: 3.1.0
info:
  title: Brosbots API
  description: >
    The public Brosbots REST API. Build and manage voice agents, run outbound

    campaigns, read calls and usage, and manage phone numbers, tools,

    knowledge bases and integrations.


    ## Authentication


    Every request must include your organization's API key in the

    `X-API-Key` header:


    ```

    X-API-Key: bb_live_...

    ```


    You create and revoke keys in the dashboard:

    click your account in the bottom-left corner of the sidebar, then **Brosbots
    API**.


    ## Base URL


    ```

    https://app.brosbots.com/api/v1

    ```


    ## Conventions


    - Request and response bodies are JSON (`Content-Type: application/json`).

    - Timestamps are ISO 8601 with a timezone.

    - Lists are paginated with `page` / `limit` parameters; responses include
      `total_count` / `total_pages`.
    - Errors use standard HTTP status codes with a JSON body:
      `{"detail": "a human-readable reason"}`.
    - `{agent_id}` accepts the agent's public ID (`agent_...`) or its number.


    ## Limits


    There is no fixed per-key request-rate limit today. `429` comes from the

    calling endpoints (`POST /agents/{agent_id}/calls` and

    `POST /triggers/{trigger_id}/calls`) when every outbound channel is busy;
    its `Retry-After` header says how many seconds to wait. Handle `429`

    generally: wait as long as `Retry-After` says, or back off exponentially
    when

    it is absent. A request-rate limit may be introduced.
  version: 1.0.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /api/v1/triggers/{trigger_id}/calls:
    post:
      tags:
        - Agents & Calls
      summary: Call Through A Trigger
      description: >-
        Place an outbound phone call through an agent's API trigger node;
        `trigger_id` is the trigger node's ID in the agent's flow. Existing
        integrations keep working; new ones should use `POST
        /agents/{agent_id}/calls`, which needs no trigger node and takes the
        agent's ID. Body: `phone_number` (E.164) and optional `initial_context`,
        side by side. The response's `workflow_run_id` is the conversation to
        read afterwards with `GET
        /agents/{agent_id}/conversations/{conversation_id}`.


        Errors: 401 bad key, 402 no credits, 403 key from another organization,
        outbound calling blocked or the number on the do-not-call list
        (`do_not_call: ...`), 404 trigger missing or inactive, 409 outside
        calling hours (08:00-21:00 recipient's time; `Retry-After` and
        `detail.retry_at` say when), 429 all outbound channels busy
        (`Retry-After` in seconds).
      operationId: post_triggers_trigger_id_calls
      parameters:
        - name: trigger_id
          in: path
          required: true
          schema:
            type: string
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerCallRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerCallResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TriggerCallRequest:
      properties:
        phone_number:
          type: string
          description: Number to call, in E.164 format.
          examples:
            - '+48123456789'
        initial_context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: >-
            Variables the agent can use as {{initial_context.<key>}} in its
            prompts. A sibling of phone_number, not a wrapper around it.
          examples:
            - first_name: Anna
      type: object
      required:
        - phone_number
      title: TriggerCallRequest
      description: Request model for triggering a call via API
    TriggerCallResponse:
      properties:
        status:
          type: string
        workflow_run_id:
          type: integer
        workflow_run_name:
          type: string
      type: object
      required:
        - status
        - workflow_run_id
        - workflow_run_name
      title: TriggerCallResponse
      description: Response model for successful call initiation
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your organization's API key (account in the bottom-left of the dashboard
        → Brosbots API).

````

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