What is the reason the Predictive Routing API is throwing a 400 Bad Request when I try to create outbound campaigns via JMeter 5.6.2? I am running this load test from Asia/Singapore to simulate a sudden spike in campaign creation requests. The goal is to see how the platform_api handles concurrent writes to the predictive routing configuration.
I have set up a simple JMeter thread group with 10 concurrent users. Each user sends a POST request to /api/v2/predictrouting/outboundcampaigns. The payload is a minimal valid JSON body based on the Swagger spec. It works fine when I run it with 1 thread. But as soon as I hit 2 or more threads, about 50% of the requests fail with a 400 status code. The error message in the response body is just "message": "Invalid request body". There is no specific field mentioned in the error.
I have double-checked the JSON structure. It includes name, description, contactListId, scriptId, and schedule. All IDs are valid and exist in our Genesys Cloud instance. I am using the application/json content type. The authorization header is a valid OAuth2 access token with the predictive_routing:campaigns:write scope.
I am confused because the same payload works in Postman. It only fails under concurrency in JMeter. Is there a race condition in the API validation logic? Or am I missing some header that is required for concurrent requests? I have tried adding a small delay between requests, but the 400 errors persist.
My environment details:
- JMeter Version: 5.6.2
- Genesys Cloud Region: eu-west-1 (but testing from Asia/Singapore)
- API Endpoint:
https://api.euc1.pure.cloud/api/v2/predictrouting/outboundcampaigns - Load: 10 concurrent threads, loop count 5
I suspect it might be related to how the API handles simultaneous validation of the same campaign name or some internal state lock. But the error message is too vague to debug. Any insights would be appreciated. I need to understand if this is a limitation of the API or a misconfiguration in my JMeter setup.
Thanks for any help.