Ricky logorickyDocs

Pagination

Walk lists with page_size, cursor and next_cursor.

Every list answers with the same shape:

{
  "data": [],
  "next_cursor": "eyJ0IjoiMjAyNi0xMC0xNFQxNTo0MjoxMC41MTJaIn0"
}

next_cursor is null on the last page.

Parameters

ParameterDescription
page_sizeItems per page, from 1 to 100. Defaults to 50.
cursorThe next_cursor of the previous page, unchanged. It is opaque: do not build or parse it.

On conversations and messages, a cursor Ricky did not issue gets 400 invalid_input with param: "cursor". Keep the same filters on every page of a walk.

Walk a list

  1. Request the first page without cursor.
  2. If next_cursor is not null, request the next page with cursor=<next_cursor>.
  3. Stop when next_cursor is null.

A page may hold fewer items than page_size. Decide the end only by next_cursor.

curl "https://getricky.ai/api/v1/conversations?status=open&page_size=100" \
  -H "Authorization: Bearer $RICKY_API_KEY"

curl "https://getricky.ai/api/v1/conversations?status=open&page_size=100&cursor=eyJ0IjoiMjAyNi0xMC0xNFQxNTo0MjoxMC41MTJaIn0" \
  -H "Authorization: Bearer $RICKY_API_KEY"

Paginated lists

OperationParametersOrder
GET /contactspage_size, cursor, query, tag_id, owner_user_id, lifecycle_stage, channelLatest updated_at first
GET /conversationspage_size, cursor, status, assigned_user_idLatest activity first
GET /conversations/{conversation_id}/messagescursorNewest message first

The message list does not take page_size: Ricky sets the size of each page.

Complete lists

These lists return everything in one response. Their next_cursor is always null.

OperationContents
GET /channelsEvery connected channel.
GET /contact-fieldsEvery custom contact field.
GET /membersEvery member of the organization.
GET /tagsEvery contact tag.
GET /templatesEvery WhatsApp template, read live from Meta.
GET /webhooksThe 100 most recent webhooks.
GET /webhooks/{webhook_id}/deliveriesThe 100 most recent deliveries of a webhook.

On this page