---
title: "POST /connections/{phoneNumber}"
method: POST
path: "/connections/{phoneNumber}"
tags: ["Connections"]
---

# POST /connections/{phoneNumber}

`POST /connections/{phoneNumber}`

## Path parameters

- `phoneNumber` string, required

## Request body

- object
  - `clientName` string — Name of the client to be used on WhatsApp connection
  - `webhookUrl` string, uri, required — URL for receiving updates
  - `webhookVerifyToken` string, required — Token for verifying webhook
  - `includeMedia` boolean — Include media in messages.upsert event payload as base64 string
  - `syncFullHistory` boolean — Sync full history of messages on connection.
  - `groupsEnabled` boolean — Enable full group message processing. When false, group messages are accumulated and sent as activity summaries.
  - `autoPresenceSubscribe` boolean — Automatically subscribe to presence updates when sending/receiving messages or typing status to/from a contact. Subscriptions are ephemeral and re-established automatically.

## Response `200`

Connection initiated

## Other responses

- `403` — Forbidden — the API key does not own this connection. Returned when a connection is bound to a different API key.
- `409` — Conflict — in cluster mode, the connection is owned by another live instance (id in the x-baileys-owner header); a proxy re-routes the takeover there instead of stealing a healthy socket.
- `421` — Misdirected Request — in cluster mode, this instance does not own the connection. The owning instance id is in the x-baileys-owner header; a proxy re-routes the request there. Not returned for POST /connections/{phoneNumber} (explicit takeover).

---

[API](https://skmtc.net/fazer-ai/apis/fazer-ai-baileys-api.md) · [All operations](https://skmtc.net/fazer-ai/apis/fazer-ai-baileys-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fazer-ai/fazer-ai-baileys-api/revisions/533b3360e2e4/schema)
