https://api.surge.app and all responses are JSON.
The API is organized around accounts. Your project can have many accounts, one per customer is the recommended pattern. Most endpoints take an account ID in the path, for example:
Authentication
Every request requires an API key. Pass it as a bearer token:Format
- Request bodies must be JSON with
Content-Type: application/json - Timestamps are ISO 8601 in UTC (
2024-10-21T23:29:43Z) - IDs use TypeID, prefixed UUIDs like
msg_01jav968...,acct_01jrz... - Phone numbers are with a leading
+, for example+18015551234
Errors
All errors return a JSON body with atype slug and a human-readable message. Validation errors include a detail map with per-field errors. See Error Reference for the full list.