The docs state: ‘Use the cursor parameter for pagination.’ I’m fetching conversation details and the first call works fine. Passing the nextPageCursor from the response in the second request returns a 400 Bad Request. The docs also mention page-based pagination, but that endpoint seems deprecated. Here’s the curl snippet I’m using. Why is the cursor invalid?
You’re likely sending the cursor as a query parameter in the URL. That endpoint requires the pagination params in the JSON body, not the query string. The 400 is the API rejecting the malformed request.
Check your payload structure. It needs to look like this:
curl -X POST "https://api.mypurecloud.com/api/v2/analytics/conversations/details/query" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"view": "default",
"dateRange": {
"from": "2023-10-01T00:00:00.000Z",
"to": "2023-10-02T00:00:00.000Z"
},
"cursor": "<nextPageCursor_value_from_previous_response>"
}'
The page param is indeed capped and deprecated for high-volume pulls. Stick with cursor in the body. If you’re using a Python SDK, make sure you’re passing the cursor to the request object, not appending it to the URL builder.
Also, watch out for timezone shifts. If your dateRange spans across midnight UTC, the cursor might expire or become invalid if the underlying data partition changes. Keep your ranges tight.