400 Bad Request on Analytics Conversations Aggregates query via Zapier

My configuration keeps failing… I am trying to build a custom interval report using GET /api/v2/analytics/conversations/aggregates from a Zapier custom action but receive a 400 Bad Request. The payload structure seems correct according to the docs but the error response is generic.

  • Endpoint: /api/v2/analytics/conversations/aggregates
  • Method: GET
  • Auth: OAuth2 Client Credentials

Here is the query body I am sending:

{
 "interval": "2023-10-01T00:00:00.000Z/2023-10-02T00:00:00.000Z",
 "viewId": "standard",
 "groupings": [{"type": "metric", "id": "conversationCount"}]
}

The response body says invalid request. Is the groupings object schema different for aggregates vs summary queries?

You need to stop sending the query as a JSON body. The analytics endpoint strictly requires URL query parameters. Zapier’s custom action builder often defaults to a POST-like body structure even for GET requests, which triggers the 400 error because the parser ignores the body entirely.

  1. Switch the request type to GET.
  2. Move all fields from the JSON body into the Query Params section of your Zapier step.
  3. Ensure the dateRange object is flattened or serialized correctly if Zapier supports nested params, otherwise construct the URL string manually.

The documentation implies a body for complex queries, but the actual API spec for aggregates is query-string based. Here is the correct curl equivalent to verify the structure before hardcoding it into Zapier:

curl -X GET "https://api.mypurecloud.com/api/v2/analytics/conversations/aggregates?dateRange.startDate=2023-10-01T00:00:00.000Z&dateRange.endDate=2023-10-02T00:00:00.000Z&groupBy=conversation:direction" \
 -H "Authorization: Bearer <token>"

Check the raw request log in Zapier. If you see a body, it will fail.

This looks like a parameter serialization issue common in low-code integrations.

The analytics aggregates endpoint expects dateRange and groupBy as URL-encoded query strings, not a JSON payload. Zapier often mishandles this encoding for GET requests.

Use this curl structure to validate the correct syntax: curl -X GET "https://api.mypurecloud.com/api/v2/analytics/conversations/aggregates?dateRange=2023-01-01T00:00:00.000Z/2023-01-02T00:00:00.000Z&groupBy=queue" -H "Authorization: Bearer <token>".

Check your Zapier step configuration because the platform strictly rejects JSON bodies for this GET endpoint. The parser ignores the body entirely, causing the 400 error. Move dateRange and groupBy to the Query Params section. This aligns with the previous suggestion and ensures proper URL encoding for the analytics API.

Make sure you verify the token scope includes analytics:conversation:view.

The documentation states, “The access token must contain the required scopes for the requested resource.”

Check your client credentials grant response to confirm the scope is present.