Node.js
import { PeriskopeApi } from '@periskope/periskope-client';

const client = new PeriskopeApi({
  authToken: 'YOUR_API_KEY',
  phone: 'YOUR_PHONE_NUMBER', // e.g., '919876543210'
});

async function fetchNotes() {
  const response = await client.chat.getNotesByChat({
    chat_id: '91987654xxxx@c.us'
  });

  console.log(response);
}
fetchNotes();
{
  "from": 1,
  "start_time": "2025-08-15T00:00:00Z",
  "end_time": "2025-08-15T23:59:59Z",
  "to": 2,
  "count": 2,
  "notes": [
    {
      "message_id": "true_2dc1aa2c-d711-4497-864d-92bb5709xxxx_api",
      "org_id": "2997dd64-89bf-48d3-9a22-b314fca0xxxx",
      "ack": "3",
      "body": "testing with a new note payload",
      "from_me": true,
      "message_type": "audio",
      "chat_id": "91882424xxxx@c.us",
      "timestamp": "2025-08-20T10:58:27.642+00:00",
      "org_phone": "91852718xxxx@c.us",
      "performed_by": "api",
      "prev_body": null,
      "quoted_message_id": null,
      "sender_phone": "91852718xxxx@c.us",
      "sent_message_id": "2dc1aa2c-d711-4497-864d-92bb57092073",
      "updated_at": "2025-08-20T10:58:27.642+00:00",
      "is_private_note": true,
      "media": {
        "path": "https://storage.googleapis.com/periskope-attachments/2997dd64-89bf-48d3-9a22-b314fca017e5%2F918527184400%40c.us%2F2dc1aa2c-d711-4497-864d-92bb57092073%2Fbeep.wav",
        "filename": "beep.wav",
        "mimetype": "audio/wav"
      },
      "unique_id": "2dc1aa2c-d711-4497-864d-92bb57092073",
      "mentioned_ids": [],
      "is_deleted": null
    },
    {
      "message_id": "true_51421242-ec06-4454-bbc0-24249c15xxxx_api",
      "org_id": "2997dd64-89bf-48d3-9a22-b314fca0xxxx",
      "ack": "3",
      "body": "testing with a new note payload",
      "from_me": true,
      "message_type": "audio",
      "chat_id": "91882424xxxx@c.us",
      "timestamp": "2025-08-20T10:26:30.091+00:00",
      "org_phone": "91852718xxxx@c.us",
      "performed_by": "api",
      "prev_body": null,
      "quoted_message_id": "52643136-1573-4011-ad22-b95ca6ea8e0c",
      "sender_phone": "91852718xxxx@c.us",
      "sent_message_id": "51421242-ec06-4454-bbc0-24249c150303",
      "updated_at": "2025-08-20T10:26:30.091+00:00",
      "is_private_note": true,
      "media": {
        "path": "https://storage.googleapis.com/periskope-attachments/2997dd64-89bf-48d3-9a22-b314fca017e5%2F918527184400%40c.us%2F51421242-ec06-4454-bbc0-24249c150303%2Fbeep.wav",
        "filename": "beep.wav",
        "mimetype": "audio/wav"
      },
      "unique_id": "51421242-ec06-4454-bbc0-24249c150303",
      "mentioned_ids": [],
      "is_deleted": null
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-phone
string

Please provide the number of the phone you want to call with this API in the header. The number must be in country code + number format without any characters or spaces, e.g. 919876543210; Alternatively, provide the phone_id (phone-xxxxxxxxxxxx) in the header

Example:

"{{orgPhone}}"

Path Parameters

chat_id
string
required
  • The unique id of a chat
  • For groups, enter the chat_id of the group. This will be a string that ends with @g.us
  • For 1-1 chats, enter the country_code + number of the recipient e.g. 919537851844@c.us (The @c.us is optional)
Example:

"9184090XXXXX@c.us"

Query Parameters

offset
number
  • The offset value for paginating the results
  • Default 0
Example:

"0"

limit
number
  • The maximum number of notes to retrieve
  • Default 500
Example:

"10"

start_time
string
  • Filter for all notes from the start_time timestamp onwards
Example:

"2025-04-25 or 2025-04-25T00:00:00Z"

end_time
string
  • Filter for all notes up to the end_time timestamp
Example:

"2025-04-31 or 2025-04-31T23:59:59Z"

Response

200 - application/json

Note

The response is of type object.