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. Scope results to a single phone: country code + number without symbols or spaces (e.g. 911111111111), or a phone_id (phone-xxxxxxxxxxxx). Omit to return data across all phones the API token can access.

Example:

"919876543210"

Query Parameters

offset
integer | null

Number of records to skip before the first returned record. Use together with limit to paginate: page N is offset = N * limit. Defaults to 0.

Required range: x >= 0
Example:

0

limit
integer

Maximum number of records to return in one page. Cannot exceed 2000. Defaults to 1000.

Required range: 1 <= x <= 2000
Example:

1000

start_time
string

Only return records at or after this time. Accepts ISO 8601 (e.g. 2026-01-01T00:00:00Z) and common date formats (YYYY-MM-DD, YYYY-MM-DD HH:mm, DD/MM/YYYY). Epoch timestamps are not supported. Compared at minute precision.

Example:

"2026-01-01T00:00:00Z"

end_time
string

Only return records at or before this time. Accepts ISO 8601 (e.g. 2026-01-01T00:00:00Z) and common date formats (YYYY-MM-DD, YYYY-MM-DD HH:mm, DD/MM/YYYY). Epoch timestamps are not supported. Compared at minute precision.

Example:

"2026-01-31T23:59:00Z"

q
string

Case-insensitive substring search across chat_id, chat_name, chat_type, label ids and custom property values. Composes with the other filters.

Example:

"Example Group"

chat_id
string

Return only chats with these exact chat_ids (including the @c.us / @g.us suffix). A single id or a comma-separated list — chats matching any listed id are returned.

Example:

"120363000000000000@g.us"

chat_type
string

Return only chats of these types: 'group', 'user' (1-1 with a regular account) or 'business' (1-1 with a business account). A single type or a comma-separated list — chats matching any listed type are returned.

Example:

"group"

label
string

Return only chats carrying these labels. Each entry is a label name (matched exactly, case-sensitive) or a label_id (label-xxxxxxxxxxxxxxxx); a single value or a comma-separated list — chats carrying any listed label are returned. A single unknown label name is ignored and returns unfiltered results; with multiple entries, every entry must exist or the request fails with a 422.

Example:

"priority"

sort_by
enum<string>

Field to sort by: 'created_at' or 'latest_message_timestamp'. Defaults to 'created_at'.

Available options:
created_at,
latest_message_timestamp
Example:

"latest_message_timestamp"

sort_order
string

Sort direction: 'asc' or 'desc' (case-insensitive). Defaults to 'desc'.

Example:

"desc"

Response

Paginated list of chats

from
integer

1-based index of the first record in this page (offset + 1).

Example:

1

to
integer

1-based index of the last record in this page.

Example:

20

count
integer

Number of records in this page — the length of the chats array, not the total across all pages.

Example:

20

start_time
string

Echo of the start_time filter, present only when it was sent.

Example:

"2026-01-01T00:00:00Z"

end_time
string

Echo of the end_time filter, present only when it was sent.

chats
object[]

The chats in this page.