---
title: "Rotate a WhatsApp group's invite link"
method: POST
path: "/v1/whatsapp/groups/{group_id}/invite-link/rotate"
tags: ["whatsapp-groups"]
---

# Rotate a WhatsApp group's invite link

`POST /v1/whatsapp/groups/{group_id}/invite-link/rotate`

## Request

- Base URL: `https://us1.platform.bird.com`
- URL: `https://us1.platform.bird.com/v1/whatsapp/groups/{group_id}/invite-link/rotate`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `bird_session`

Issues a new invite link for the group. Every link issued before stops
working, so anyone still holding one cannot join. Rotate the link when a
link has spread further than you intended, or after removing someone you do
not want back.

Rotating is not how you read the current link: the group carries its
`invite_link`, so
`GET /v1/whatsapp/groups/{group_id}` is the read.
Only an `active` group has a link to rotate; any other status returns a `409`
`WhatsAppGroupNotActive`.

Like pinning and unpinning, this answers `200` rather than `202`.
WhatsApp issues the new link in its own reply and sends no webhook for a
rotation, so the link in the response is the rotation itself having
happened, not an acknowledgement that it will.

## Path parameters

- `group_id` string, required

## Headers

- `Idempotency-Key` string
- `X-Workspace-Id` string
- `X-Organization-Id` string

## Response `200`

The group's new invite link.

- WhatsAppGroupInviteLink: A group's invite link.
  - `invite_link` string, required: The group's one invite link. Every link the group had before this one stops working.

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Insufficient permissions
- `404`: Resource not found
- `409`: Resource conflict
- `422`: The request has invalid field values, violates a business rule, or carries a query parameter the endpoint does not declare. Field validation errors use `type: validation_error` and include the affected fields in `details`. Business-rule errors identify the failed rule in `type`.
- `429`: Rate limit exceeded
- `500`: Internal server error
- `503`: The service is temporarily unavailable. If `Retry-After` is present, wait for that delay before retrying; otherwise, retry with exponential backoff. Reuse the same idempotency key and request when retrying a mutation.

---

[API](https://skmtc.dev/messagebird/apis/bird-api.md) · [All operations](https://skmtc.dev/messagebird/apis/bird-api/llms.txt) · [OpenAPI document](https://skmtc.dev/messagebird/apis/bird-api/revisions/3e2a50466454?raw)
