Trying to programmatically trigger an outbound call using the Personal Connection logic. The goal is to have a script initiate the call immediately after a specific database lookup succeeds, rather than waiting for the dialer to pick it up. We’ve been using the REST Proxy action to hit the Outbound API directly.
The script builds the JSON payload dynamically. Here is the structure I’m sending to POST /api/v2/outbound/campaigns/{campaignId}/contacts:
{
"campaignId": "8a9b7c6d-1234-5678-90ab-cdef12345678",
"contactId": "9b8c7d6e-4321-8765-09ab-cdef87654321",
"status": "IN_QUEUE",
"attributes": {
"pc_source": "_script"
}
}
The API returns a 400 Bad Request. The error message is vague: “Invalid contact state transition.” I’ve verified the contact exists and is not currently in progress. The campaign is active and configured for Personal Connection.
I tried changing the status to “IN_PROGRESS” but that gives a 409 Conflict. The documentation for Personal Connection is sparse regarding direct API triggers. Most examples show using the Campaign API to update status, but that seems to require the contact to already be in the queue.
Is there a specific endpoint or parameter I’m missing to force the dialer to pick this up immediately? The REST Proxy logs show the request is authenticated correctly. The 400 error persists regardless of whether I include the attributes block.
Here is the code for the REST Proxy setup:
ASSIGN: restProxy = GetRESTProxy();
ASSIGN: headers = {"Content-Type": "application/json", "Authorization": "Bearer {authToken}"};
ASSIGN: response = restProxy.Post("/api/v2/outbound/campaigns/{campaignId}/contacts", payload, headers);
The variable {campaignId} is populated correctly. The payload is valid JSON. The error happens on the Post method execution.
I’ve checked the contact’s history in the admin UI. No recent activity. The campaign settings allow immediate dialing.
Any ideas on what state transition is invalid here?