List rules

Returns the rules on a channel. Filter by is_active or by trigger kind.

Authentication

AuthorizationBearer

Your API key, issued by ParsChat sales. One key per account, spanning every robot you own. Send it as Authorization: Bearer pk_live_….

Path parameters

robot_idstringRequired
The robot's id, as returned by the create call.
channel_idstringRequired
The channel's id.

Query parameters

is_activebooleanOptional
Return only active, or only inactive, rules.
onenumOptional
Return only DM rules or only comment rules.
Allowed values:
limitintegerOptional1-100Defaults to 50
How many items to return per page.
offsetintegerOptional>=0Defaults to 0

How many records to skip. Use offset = page * limit, and total_count from the response to know when to stop.

Response

A page of rules.
datalist of objectsOptional
paginationobjectOptional

Offset pagination. total_count tells you how many records match, so you know how many pages to fetch before you start.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error