---
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 the explicit-takeover routes: POST /connections/{phoneNumber}, /import-session and /restart.

## Changes

- **2026-08-15** `533b3360e2e4` — 2 breaking, 3 info
  - removed the media type `application/json` for the response with the status `200`
  - removed the success response with the status `202`
  - removed the non-success response with the status `404`
  - removed the non-success response with the status `422`
  - …1 more
- **2026-08-15** `80b5396ef493` — 2 info
  - added the non-success response with the status `422`
  - added the success response with the status `202`
- **2026-06-16** `da89554d2e38` — 16 info
  - added the new optional request property `autoPresenceSubscribe` (media type: application/json)
  - added the new optional request property `autoPresenceSubscribe` (media type: multipart/form-data)
  - added the new optional request property `autoPresenceSubscribe` (media type: text/plain)
  - added the non-success response with the status `409`
  - …12 more
- **2026-03-20** `8632adf0286b` — 7 info
  - added the new optional request property `groupsEnabled` (media type: application/json)
  - added the new optional request property `groupsEnabled` (media type: multipart/form-data)
  - added the new optional request property `groupsEnabled` (media type: text/plain)
  - added the media type `application/json` for the response with the status `200`
  - …3 more
- …earlier changes not shown

[Full history](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api/changes/connections/:phoneNumber/post.md)

---

[API](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api.md) · [All operations](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fazer-ai/apis/fazer-ai-baileys-api/revisions/5299037901a9?raw)
