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

# Connect WhatsApp Business Account

> Connect a WhatsApp Business Account and one of its phone numbers to Bolna using a business access token or an Embedded Signup code.

Bolna reads the phone number from Meta using `phone_number_id` and the token, so the number must belong to the WhatsApp Business Account the token can access.

## Next steps

After connecting the number, [enable calling on it](https://www.bolna.ai/docs/api-reference/whatsapp/provision.md) with the returned `number_id`.


## OpenAPI

````yaml POST /whatsapp/integrations
openapi: 3.1.0
info:
  title: Bolna API
  description: >-
    Use and leverage Bolna Voice AI using APIs through HTTP requests from any
    language in your applications and workflows.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.bolna.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: >-
      Bring-your-own-carrier SIP trunks, their gateways, carrier IPs and
      numbers.
paths:
  /whatsapp/integrations:
    post:
      description: >-
        Connect a WhatsApp Business Account to Bolna and add one of its phone
        numbers. Provide exactly one of `token_code` (from Meta's Embedded
        Signup) or `business_token`. Bolna reads the phone number from Meta
        using `phone_number_id` and the token. Connecting a WhatsApp Business
        Account that is already connected to your account refreshes its stored
        token.
      requestBody:
        description: WhatsApp Business Account and phone number to connect
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsappIntegrationCreateRequest'
            examples:
              business-token-example:
                summary: Connect with a business access token
                value:
                  waba_id: '1624864819249082'
                  phone_number_id: '1286951411170717'
                  business_token: <your-system-user-access-token>
              token-code-example:
                summary: Connect with an Embedded Signup code
                value:
                  waba_id: '1624864819249082'
                  phone_number_id: '1286951411170717'
                  token_code: <code-from-embedded-signup>
        required: true
      responses:
        '200':
          description: WhatsApp Business Account and phone number connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappIntegrationCreateResponse'
        '400':
          description: >-
            validation error, for example both or neither of `token_code` and
            `business_token`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            the WhatsApp Business Account or the phone number is already
            connected to a different account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            Meta rejected the request, for example an invalid or expired token,
            or a `phone_number_id` the token cannot access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WhatsappIntegrationCreateRequest:
      type: object
      required:
        - waba_id
        - phone_number_id
      description: Provide exactly one of `token_code` or `business_token`.
      properties:
        waba_id:
          type: string
          description: Your WhatsApp Business Account ID.
          example: '1624864819249082'
        phone_number_id:
          type: string
          description: Meta's phone number ID for the number to connect.
          example: '1286951411170717'
        business_token:
          type: string
          description: >-
            A system user access token for the WhatsApp Business Account, with
            the `whatsapp_business_management` and `whatsapp_business_messaging`
            permissions.
        token_code:
          type: string
          description: >-
            The code returned by Meta's Embedded Signup. Bolna exchanges it for
            an access token.
    WhatsappIntegrationCreateResponse:
      type: object
      properties:
        integration_id:
          type: string
          description: The `id` of the connected WhatsApp Business Account on Bolna.
          example: 6f1c2a7e-3b4d-4e5f-9a8b-7c6d5e4f3a2b
        number_id:
          type: string
          description: >-
            The `id` of the connected phone number on Bolna. Use it with the
            provision, map-agent, unlink-agent and delete number APIs.
          example: 9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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