curl --request POST \
  --url https://api.periskope.app/v1/message/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-phone: <x-phone>' \
  --data '{
  "message": "Hello, World!",
  "chat_id": "12042354354XXX@g.us"
}'
{
  "12042354354XXX@g.us": "f7ab866c-81cb-4c43-9e10-8e1e71x7c5x3"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your apiKey generated in Periskope API settings.

Headers

x-phone
string
required

Organisation phone number(with country code) and without any spaces or special characters.

e.g. 9190043XXXXX

Body

application/json
reply_to
string

Message ID of the quoted message which is attached to this reply

e.g. true_120363280319442422@g.us_3EB041BB2CBB36D5E1A934_9190043XXXXX@c.us

message
string | null
required

Text message to be sent.

chat_id
string
required

The chat_id for an individual chat is of the following format: (country_code + phone_number + @c.us). e.g. The chat_id for +91 90043 89567 is 919004389372@c.us

For a group chat, you need to fetch the chat_id (it will end in @g.us). You can fetch this in the settings sidepanel on Periskope (or by right-clicking on any chat and copying the id)

Response

200 - application/json
12042354354XXX@g.us
string

Sent message ID for the message