Scheduled Callback - /api/v2/callbacks POST failing with 400 on `scheduledTime`

The platform’s scheduled callback POST request - /api/v2/callbacks - is hard failing with a 400 on the scheduledTime field. It’s happening intermittently, but enough that customers are missing their scheduled calls, which is… great. We’re on Genesys Cloud v8.5.102.0.

From what I’ve seen, the issue only surfaces when the scheduled time is less than five minutes in the future. The documentation doesn’t explicitly state that restriction, but the API is clearly choking on it. Workaround for now is adding a minimum five minute buffer on the scheduled time, but that impacts the customer experience. Saw a similar issue flagged back in 2021, but the thread got marked as resolved without a fix.

The request body looks like this:

{
 "contactId": "123e4567-e89b-12d3-a456-426614174000",
 "phoneNumber": "+15551234567",
 "scheduledTime": "2024-02-29T14:32:00.000Z"
}

It’s consistently failing with:

{
 "message": "Bad Request - Invalid scheduledTime. Must be greater than current time plus 5 minutes.",
 "code": 400,
 "entityId": "..."
}

The 400 error on scheduledTime-and the intermittent nature of it-stems from an interaction between the API’s validation and the underlying scheduling service (it’s not documented particularly well, which isn’t unusual). The system essentially refuses to queue a callback with a resolution time under five minutes, preventing a potential race condition where the agent isn’t quite ready when the call attempts to connect, or worse, the system tries to route it while still setting up the connection.

You’ll find that pre-validating the scheduledTime against the current time-ensuring it’s at least 300 seconds in the future-resolves the issue, though that does add a slight complexity to the client-side logic (it’s a small price to pay for reliability, really). We’ve encountered similar issues with the data actions endpoint, so it’s worth keeping an eye on these edge cases.

1 Like