WhatsApp Gateway
API referenceChannels

Unfollow a channel

Unsubscribe this session from the channel identified by `jid` so its posts stop arriving on this account. **Not implemented in v1.** This endpoint is wired but **always responds `501` with `not_implemented`** — no unfollow is performed and no state changes. **Authorization:** requires the `send` capability (`403` `forbidden` otherwise; `401` without a valid principal). **When implemented**, this will be an **idempotent** write: unfollowing a channel that is not followed is a no-op and still returns `204` (no content). The action takes no request body. **Errors:** `403` `forbidden` (missing `send`), `404` `not_found` (session or channel unknown), `501` `not_implemented` (current behavior).

POST
/api/v1/sessions/{session}/channels/{jid}:unfollow

Authorization

AuthorizationBearer <token>

Send Authorization: Bearer <token>. The router accepts two kinds of token and tries each in turn: a frontend-minted login JWT (verified against the frontend JWKS; the person's org + role are read from it), or an api-key for a script/service (carrying a fixed set of gateway permissions). The bearerFormat: JWT label describes the person-login case.

In: header

Path Parameters

session*string

The WhatsApp session id (one attached WhatsApp number) performing the follow/unfollow.

jid*string

The channel's WhatsApp JID (a newsletter address, e.g. "120363012345678901@newsletter"). Percent-encode reserved characters such as "@" ("%40") in the path — the gateway URL-decodes it before use.

Response Body

application/json

curl -X POST "https://example.com/api/v1/sessions/01HX.../channels/120363012345678901@newsletter:unfollow"
Empty
{  "error": {    "code": "not_found",    "details": {      "property1": null,      "property2": null    },    "message": "session not found"  }}