import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: 'YOUR_PHONE_NUMBER', // Optional for this endpoint — omit to return notes in this chat across all phones your token can access
});
async function fetchNotes() {
const response = await client.chat.getNotesByChat({
chat_id: '91987654xxxx@c.us'
});
console.log(response);
}
fetchNotes();# x-phone is optional for this endpoint — omit it to return notes in this chat across all phones your token can access
curl -X GET \
https://api.periskope.app/v1/chats/{chat_id}/notes \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'x-phone: YOUR_PHONE_NUMBER' \
-d '{
"chat_id": "919537851844@c.us",
"start_time": "2025-08-10 10:00:00",
"end_time": "2025-08-15 10:00:00",
"offset": "0",
"limit": "1000"
}'{
"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
}
]
}Get Private Notes in a Chat
This endpoint retrieves a paginated list of all private notes from a specific chat (in descending order of timestamp).
Response
The response is an array of JSON note objects. Refer to the note object here
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
phone: 'YOUR_PHONE_NUMBER', // Optional for this endpoint — omit to return notes in this chat across all phones your token can access
});
async function fetchNotes() {
const response = await client.chat.getNotesByChat({
chat_id: '91987654xxxx@c.us'
});
console.log(response);
}
fetchNotes();# x-phone is optional for this endpoint — omit it to return notes in this chat across all phones your token can access
curl -X GET \
https://api.periskope.app/v1/chats/{chat_id}/notes \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-H 'x-phone: YOUR_PHONE_NUMBER' \
-d '{
"chat_id": "919537851844@c.us",
"start_time": "2025-08-10 10:00:00",
"end_time": "2025-08-15 10:00:00",
"offset": "0",
"limit": "1000"
}'{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional. The phone to scope this request to — in country code + number format with no spaces or special characters (e.g. 919876543210), or the phone_id (phone-xxxxxxxxxxxx). When set, only notes in this chat for that phone are returned. When omitted, notes in this chat are returned — across all phones your token can access (the phones in your token's scope, or every phone in your organization if the token is unscoped). Passing a phone that is outside your token's scope returns a 401.
"{{orgPhone}}"
Path Parameters
- 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)
"9184090XXXXX@c.us"
Query Parameters
- The offset value for paginating the results
- Default
0
"0"
- The maximum number of notes to retrieve
- Default
500
"10"
- Filter for all notes from the start_time timestamp onwards
"2025-04-25 or 2025-04-25T00:00:00Z"
- Filter for all notes up to the end_time timestamp
"2025-04-31 or 2025-04-31T23:59:59Z"
Response
Note
The starting index of the notes returned
1
The ending index of the notes returned
10
The start_time of the notes returned. The format should be YYYY-MM-DDTHH:MM:SSZ
"2025-08-15T00:00:00Z"
The end_time of the notes returned. The format should be YYYY-MM-DDTHH:MM:SSZ
"2025-08-15T23:59:59Z"
The total number of notes returned
10
An array of note objects. Refer to the note object here
Was this page helpful?