Wfm api 400 on byoc trunk quality scores

I’ve spent hours trying to figure out why the /api/v2/wfm/schedule/api/v2 endpoint returns a 400 bad request when filtering by our ap-se-2 byoc trunk identifiers. the payload matches the schema exactly, yet the response cites an invalid carrier_id format despite the values being pulled directly from the trunk configuration api. has anyone seen this validation error with the latest sdk version?

The carrier_id field in WFM requests expects the internal UUID, not the BYOC trunk name or external ID. Swap the value for the id from the /api/v2/telephony/providers/edges response. Also, double-check the qualityScoreId format; it must match the schema exactly. A simple typo there triggers the 400.

I’d suggest checking out at the specific payload structure when integrating WFM data with BYOC trunk metrics. The previous suggestion about using the internal UUID is correct, but the 400 error often persists if the carrierId object is nested incorrectly within the request body. In my recent load testing with JMeter, I found that the WFM API expects the carrierId to be passed as a direct string parameter in the query string or a specific top-level field, not wrapped inside a complex object unless explicitly defined by the schema version.

Here is the corrected JSON structure that resolved the validation issue in my tests. Ensure the carrierId matches the exact output from /api/v2/telephony/providers/edge/lines and verify there are no trailing spaces.

{
 "dateRange": {
 "startTime": "2023-10-01T00:00:00.000Z",
 "endTime": "2023-10-02T00:00:00.000Z"
 },
 "filters": [
 {
 "type": "carrierId",
 "value": "a1b2c3d4-5678-90ab-cdef-EXAMPLE12345" 
 }
 ]
}

I also noticed that AP-SE-2 has stricter validation rules for concurrent requests compared to US1. If you are sending multiple requests in parallel during your test, try reducing the concurrency to 50 requests per second. The WFM endpoint can throttle aggressively if it detects rapid-fire queries with malformed payloads, which sometimes masks the actual validation error with a generic 400. Check your API logs for any rate-limiting headers like X-RateLimit-Remaining. This helped stabilize our test runs when moving from single-threaded validation to full-scale throughput testing.

How I usually solve this is by using the CLI to fetch the correct ID.

  1. Run genesyscloud telephony providers edge list to get the UUID.
  2. Replace the trunk name with that UUID in the WFM request.