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

# Approve Pairing

> Approve a DM pairing request for a channel.

Approves a DM pairing request by submitting a pairing code. This is used when a channel requires explicit approval before the bot can interact with a user in direct messages.

## Authentication

Requires an **org-level API key** or a **scoped token** with the `channels` permission.

## Path Parameters

<ParamField path="instance_id" type="string" required>
  The ID of the instance.
</ParamField>

<ParamField path="channel" type="string" required>
  The channel identifier.
</ParamField>

## Body Parameters

<ParamField body="code" type="string" required>
  The pairing code to approve.
</ParamField>

## Response

<ResponseField name="channel" type="string">
  The channel identifier.
</ResponseField>

<ResponseField name="code" type="string">
  The pairing code that was submitted.
</ResponseField>

<ResponseField name="status" type="string">
  The result of the pairing attempt.
</ResponseField>

<ResponseField name="output" type="string">
  Additional output from the pairing process, if any.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  curl -X POST https://api.chowder.dev/v1/instances/ins_abc123/channels/whatsapp/pair \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "code": "ABC-1234"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  {
    "channel": "whatsapp",
    "code": "ABC-1234",
    "status": "paired",
    "output": "Pairing approved successfully."
  }
  ```
</ResponseExample>
