POST request with the result to the callbackUrl you gave for that call. This saves you from polling Get outbound call status.
Set the callback URL
SendcallbackUrl in the body of each POST /api/outbound request:
- The URL is set per call. There’s no account-wide setting, and each call can use a different URL.
- Use an HTTPS URL.
- You can’t change the URL once the call has started.
- Without a
callbackUrl, no callback is sent. Use the status endpoint instead.
When it’s sent
AlloMia sends the callback once per call, as soon as the status becomes final:completed, busy, no-answer or failed.
It isn’t sent:
- When the create request already answered
"status": "failed". The call was never placed. - When a call stays
callingand never reaches a final status. This is rare.
The request
AlloMia sendsPOST to your URL with the header Content-Type: application/json and this body:
string
Always
call.completed, whatever the final status.string
The call’s ID, as returned by Create outbound call.
string
The ID of the person called, as returned by Create outbound call.
string
When AlloMia prepared the callback, in ISO 8601 UTC. It’s the same on every retry.
object
How the call ended. The same fields as in Get outbound call status. Any of them can be
null.object | null
The
dynamicVariables you sent when you created the call. null if you sent none, or an empty object.Answered call
Busy line
Delivery and retries
- Answer with any
2xxstatus to confirm you received the callback. AlloMia ignores the response body. - AlloMia waits up to 10 seconds for your answer.
- Any other answer, a timeout, or a connection error counts as a failed try. AlloMia tries again after waiting 1 second, then 5 seconds, then 30 seconds: 4 tries in all.
- After the fourth failed try, AlloMia stops. That callback isn’t sent again. Use the status endpoint to get the result.
- Every try sends exactly the same body.
Handle it safely
1
Answer quickly
Answer with a
2xx as soon as you receive the request, then do the work. If you take longer than 10 seconds, AlloMia counts the try as failed and sends the callback again.2
Make handling idempotent
You can receive the same callback more than once, for example when your server handled it but answered too late. Use
outboundCallId as the key, and skip a callback you’ve already handled.3
Check that the call is yours
Only accept an
outboundCallId that your system started and is still waiting on. Ignore anything else.4
Confirm before you act
Before you change your own records, confirm the result with Get outbound call status, using a clinic key from the clinic that owns the call. Act on what the status endpoint returns.
5
Don't rely on the callback alone
If no callback arrives in the time you expect, check the call with the status endpoint.