Skip to main content
TypeScript

Authorizations

Authorization
string
header
required

Your Periskope API token, sent as Authorization: Bearer <token>. Generate one from the Periskope dashboard under Settings → API & Webhooks. API access requires an active Pro or Enterprise plan.

Headers

x-phone
string

Optional. Phone to act with: country code + number without symbols or spaces (e.g. 911111111111), or a phone_id (phone-xxxxxxxxxxxx). Omit to let the API select an eligible phone automatically — within the token's phone scopes and connected; chat actions use a phone that has the chat (a group admin where required), message actions use the phone the message belongs to.

Example:

"919876543210"

Path Parameters

message_id
string
required

The message_id (true_... / false..._) of the message, or the unique_id returned when the message was sent via the API. The lookup is scoped to the phone in the x-phone header.

Minimum string length: 1
Example:

"true_911111111111@c.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"

Body

application/json
pin
boolean
required

Whether to pin (true) or unpin (false) the message

Example:

true

time

How long the message stays pinned, in days: 1, 7 or 30. Defaults to 30. Only meaningful when pin is true.

Available options:
1
Example:

7

Response

The message was pinned or unpinned