Welcome to Nextra
Hello, world!
Example using cursors
In this example, we request the page that starts after the conversation with id s4WycXedwhQrEFuM
. As a result, we get a list of three conversations and can tell by the has_more
attribute that we have reached the end of the resultset.
- Name
starting_after
- Type
- string
- Description
The last ID on the page you're currently on when you want to fetch the next page.
- Name
ending_before
- Type
- string
- Description
The first ID on the page you're currently on when you want to fetch the previous page.
- Name
limit
- Type
- integer
- Description
Limit the number of items returned.
curl -G https://api.protocol.chat/v1/conversations \
-H "Authorization: Bearer {token}" \
-d starting_after="s4WycXedwhQrEFuM" \
-d limit=10
{
"has_more": false,
"data": [
{
"id": "WAz8eIbvDR60rouK",
// ...
},
{
"id": "hSIhXBhNe8X1d8Et"
// ...
},
{
"id": "fbwYwpi9C2ybt6Yb"
// ...
}
]
}
Example using cursors
In this example, we request the page that starts after the conversation with id s4WycXedwhQrEFuM
. As a result, we get a list of three conversations and can tell by the has_more
attribute that we have reached the end of the resultset.
- Name
starting_after
- Type
- string
- Description
The last ID on the page you're currently on when you want to fetch the next page.
- Name
ending_before
- Type
- string
- Description
The first ID on the page you're currently on when you want to fetch the previous page.
- Name
limit
- Type
- integer
- Description
Limit the number of items returned.
curl -G https://api.protocol.chat/v1/conversations \
-H "Authorization: Bearer {token}" \
-d starting_after="s4WycXedwhQrEFuM" \
-d limit=10
{
"has_more": false,
"data": [
{
"id": "WAz8eIbvDR60rouK",
// ...
},
{
"id": "hSIhXBhNe8X1d8Et"
// ...
},
{
"id": "fbwYwpi9C2ybt6Yb"
// ...
}
]
}