Getting a 400 Bad Request when trying to trigger an outbound call via the Personal Connection API. The goal is to inject an OTel trace ID into the call metadata so we can correlate the voice interaction with upstream Data Action spans in Jaeger.
The endpoint is POST /api/v2/outbound/campaigns/{campaignId}/connections. I’m using the personalConnection type.
Here’s the JSON payload:
{
"campaignId": "8b2c4d1e-3f5a-6789-0123-456789abcdef",
"connectionType": "personalConnection",
"contactId": "c9d0e1f2-a3b4-5c6d-7e8f-901234567890",
"callData": {
"traceId": "00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"
}
}
The response body says:
{
"message": "Invalid request body",
"errors": [
"Unknown property 'traceId' in callData"
]
}
I’ve checked the CXone API reference for the ConnectionRequest schema. It doesn’t seem to allow arbitrary custom fields in callData for personal connections. The standard callData object expects specific fields like queueName or agentEmail, but nothing for custom metadata.
We’ve tried putting the trace ID in the contactId as a suffix, but that breaks the contact lookup. Is there a supported way to attach custom headers or metadata to a Personal Connection API call? Or do I need to use the Campaign API with a custom contact attribute instead?
The timezone is Asia/Manila, so the call times are tricky, but the 400 error is immediate on request validation. Not sure if I’m missing a specific field or if this API just doesn’t support custom metadata injection.