Trying to start and stop recordings programmatically using POST /api/v2/recordings/conversations/{conversationId}/actions. The endpoint exists, but I get a 409 Conflict. Payload is just { "action": "record" }. I checked the interaction status; it’s active. Docs say 409 means the action is invalid, but record seems valid. Am I missing a header? Here’s the cURL. curl -X POST ...
The 409 usually isn’t about the action string itself. It’s almost always a permissions mismatch or a state conflict. If the conversation is already being recorded, trying to start it again throws this error. Same if you try to stop a recording that hasn’t started.
Check your OAuth scopes. You need recordings:conversation:write specifically. read won’t cut it. Also, verify the user making the call has the “Modify recordings” permission in the Genesys Cloud admin console. It’s separate from viewing them.
Here’s a safer curl structure to double-check headers:
curl -X POST "https://api.mypurecloud.com/api/v2/recordings/conversations/{conversationId}/actions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"action": "record"}'
If that still fails, check the response body. It often contains a specific error code like recording_already_active. Don’t just look at the status code. The body tells the real story.