Handle Twilio recording status
Webhooks
Handle Twilio recording status
Recording-completed callback posted by Twilio once a call recording finishes. Downloads the audio from the Twilio recording URL, uploads it to R2, and attaches the storage key + duration to the parent Call record.
POST
Handle Twilio recording status
Body
application/json
Twilio call identifier (CA…) the recording belongs to.
Twilio-assigned recording identifier (RE…).
Twilio-hosted recording URL; downloaded server-side and re-uploaded to R2.
Recording lifecycle state, typically completed once the audio is ready.
Recording length in seconds (as a string).
Response
Plain-text acknowledgement (Twilio only checks 2xx).
The response is of type string.
Example:
"OK"