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

# Create connection manually

> Connect an Official API (Cloud API) number by providing the Meta WABA, number and token.

Creates a **WhatsApp Official API** connection from credentials generated in
Meta Business Manager: the WhatsApp Business Account id (`wabaId`), the
phone number id (`phoneNumberId`) and an `accessToken`.

The backend validates the (number, token) pair against the Graph API, tries to subscribe the
app's webhooks (best-effort) and then provisions the connection and syncs billing for the
Scale plan.

* `webhookMode` — `normalized` (canonical D-API events) or `meta_passthrough`
  (raw Meta payloads). Default: `normalized`.
* `data.webhookSubscribed` — when `false`, show the user the instructions
  for subscribing the webhook manually in the Meta dashboard.

> [!WARNING]
>
> Requires an active subscription. Without a subscription, the response is `402` with
> `code: "TRIAL_REQUIRED"` — send the user to the Scale plan checkout.

> [!TIP]
>
> For the guided Embedded Signup (SDK) flow, use the integration assistant
> instead of registering the token manually.


## OpenAPI

````yaml api-reference/openapi.en.json POST /api/v1/connections/cloud-api/manual
openapi: 3.1.0
info:
  title: D-API - Complete WhatsApp Infrastructure
  description: >-
    A scalable, robust solution for automation managers, SaaS products and end
    users who need a reliable WhatsApp integration. It offers multiple
    simultaneous instances, real-time webhooks, an intuitive dashboard and a
    documented REST API with 99.9% uptime and latency under 30ms.
  version: 1.2.1
  contact:
    name: Suporte D-API
    email: suporte@d-api.cloud
    url: https://d-api.cloud
servers:
  - url: https://api.d-api.cloud
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Home
    description: Base endpoints
  - name: Sessions
    description: Endpoints for managing sessions
  - name: Messages
    description: Endpoints for sending messages
  - name: Cloud API
    description: >-
      WhatsApp Official API (Meta Cloud API): manual connection, template
      management (list/create/delete) and template sending.
  - name: IVR Calls
    description: 'Voice call dispatch (IVR): single or bulk, with audio or an IVR flow.'
  - name: SMS
    description: 'SMS sending: single or bulk.'
  - name: Commands
    description: >-
      Look up asynchronous commands (async: true) by the commandId returned when
      enqueued.
paths:
  /api/v1/connections/cloud-api/manual:
    post:
      tags:
        - Cloud API
      summary: Create cloud_api connection manually
      description: >-
        Creates a WhatsApp Official API connection from a waba id, phone number
        id and access token provided manually (generated in Meta Business
        Manager). Validates the (number, token) pair against the Graph API,
        tries to subscribe the app to webhooks and then provisions the
        connection and syncs Scale billing. `data` is `{ session,
        webhookSubscribed }` — show the manual subscription instructions when
        `webhookSubscribed` is false. Returns 402 (code TRIAL_REQUIRED) when the
        user has no active subscription.
      operationId: postApiV1ConnectionsCloud-apiManual
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                wabaId:
                  minLength: 1
                  type: string
                phoneNumberId:
                  minLength: 1
                  type: string
                accessToken:
                  minLength: 1
                  type: string
                businessId:
                  type: string
                webhookMode:
                  anyOf:
                    - const: normalized
                      type: string
                    - const: meta_passthrough
                      type: string
              required:
                - wabaId
                - phoneNumberId
                - accessToken
          multipart/form-data:
            schema:
              type: object
              properties:
                wabaId:
                  minLength: 1
                  type: string
                phoneNumberId:
                  minLength: 1
                  type: string
                accessToken:
                  minLength: 1
                  type: string
                businessId:
                  type: string
                webhookMode:
                  anyOf:
                    - const: normalized
                      type: string
                    - const: meta_passthrough
                      type: string
              required:
                - wabaId
                - phoneNumberId
                - accessToken
          text/plain:
            schema:
              type: object
              properties:
                wabaId:
                  minLength: 1
                  type: string
                phoneNumberId:
                  minLength: 1
                  type: string
                accessToken:
                  minLength: 1
                  type: string
                businessId:
                  type: string
                webhookMode:
                  anyOf:
                    - const: normalized
                      type: string
                    - const: meta_passthrough
                      type: string
              required:
                - wabaId
                - phoneNumberId
                - accessToken
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data: {}
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - success
            multipart/form-data:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data: {}
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - success
            text/plain:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data: {}
                  error:
                    type: string
                  code:
                    type: string
                required:
                  - success
          description: Successful response
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'API Key for authentication. Format: <API_KEY>'

````

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