Improved
REST API v2: examples on every endpoint, documented errors, and fixes
about 2 hours ago by ReadMe API
The REST API v2 reference is more complete: every endpoint now has examples, its errors are documented, and so are the fields and webhook events that had no description.
Reference
- Examples everywhere. Every JSON request body and every JSON response has an example (54 examples on 42 endpoints), taken from real API responses. The scenario examples are valid Callr Actions scripts.
- Errors.
402(insufficient credit) when reserving or buying numbers,409when creating a webhook that already exists,403when deleting a scenario that still has numbers attached. Every shared error response has an example. - Warnings on bulk operations.
DELETE /recordingsandPATCH /recordingswithoutsidapply to all your recordings.POST /numbers/store/{token}buys the numbers and bills them. - Descriptions. Webhook events (tasks, audio files, recordings, inbound and outbound SMS), webhook logs, SMS filters (
direction,createdAfter,createdBefore), SMS length and parts, accepted audio formats, CDR durations, status,hangupSourceand billing fields, number pricing and reservation, tasks (result,error,percent), the CSV format of the calls export. - Amounts are decimal strings in cents of your account currency (
"550.00"= 5.50 EUR). - Audio file upload. The content of an audio file is uploaded with
PUT /audio-files/{sid}/file, afterPOST /audio-files. - Empty values.
callerNumberandcalleeof a CDR, andcalleeof a recording, can be empty (hidden caller ID, offline branch). Thecallidof a recording is0when the recording started before any call. The API already returned these values; the reference now says so.
Fixes
- Task progress.
percentof a task showed100as soon as the task passed 1%. It now goes from 0 to 100. - Bulk recordings result. The result of a bulk recordings task (
GET /tasks/{taskid}and thev2.task.updatedwebhook) now uses the v2 format: lowercaseaction(read,unread,delete) anderrors[].sidinstead of the uppercase hash. hangupSource. A call ended by the Callr platform was exported asgateway, a value outside the documentedcaller | callee | system. It is nowsystem, in the call webhooks and the CSV export.
