# `bird whatsapp groups pins create`

## Usage

```bash
bird whatsapp groups pins create <group-id> [flags]
```

## Description

Pin a message in a WhatsApp group

Pin one of the group's messages at the top of its chat for 1 to 30 days. A group holds 3 pinned messages; pinning a fourth unpins the oldest. The group's pinned\_messages carries what is pinned.

Build the request from flags, a JSON WhatsAppGroupPinnedMessageCreate body via --body-file ("-" reads
stdin), or both — a flag overrides the matching body field. Run --example to
print a ready-to-edit body, or --dry-run to print the resolved request without
sending it.

## Examples

```bash
# print the body shape (no credentials needed)
bird whatsapp groups pins create --example

# the body it prints:
```

```json
{
  "duration_days": 7,
  "message_id": "wam_01krdgeqcxet5s7t44vh8rt9mg"
}
```

## Options

#### Request

| Name                | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `--body-file`       | Read the JSON request body from this file; "-" reads stdin   |
| `--example`         | Print a complete example request body, then exit             |
| `--dry-run`         | Print the resolved request without sending it, then exit     |
| `--idempotency-key` | Deduplication key; a retry with the same key won't act twice |

#### Options

| Name                  | Description                                                                                                                                                                          |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--message-id`        | The message to pin. It has to be one this group carries: a message in another group, or a one-to-one message, returns a 422 WhatsAppMessageNotInGroup. (required; or in --body-file) |
| `--duration-days <n>` | How many days the message stays pinned before WhatsApp unpins it, from 1 to 30.                                                                                                      |
| `--response-schema`   | Print the fields this command returns, then exit                                                                                                                                     |

## Related

| Name                                                                                  | Description                         |
| ------------------------------------------------------------------------------------- | ----------------------------------- |
| [`bird whatsapp groups pins delete`](/docs/cli/reference/whatsapp-groups-pins-delete) | Unpin a message in a WhatsApp group |

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
