Authentication
Sailor public API requests use bearer authentication. Send the token from your backend. Do not put it in browser code, mobile clients, extensions, public repositories, or support screenshots.
Every request should include Authorization: Bearer $SAILOR_API_TOKEN.
Request Shape
Token Scope
Requests act on the workspace attached to the token. If the token is missing, invalid, or not allowed to manage phone-system outcomes, Sailor returns an error body with an error string.
Treat the token as a workspace-scoped secret. A public token leak is a workspace incident.
Write Requests
Create and update requests require an Idempotency-Key header. Use a stable unique value for the operation you are attempting so retries do not create duplicate outcomes.
Header Checklist
Idempotency Keys
If Sailor returns idempotency_key_in_use, the first request with that key is still processing. Wait, then retry the same logical operation with the same key.
Common Auth Errors
Security Checklist
- Store tokens in server-side secret storage.
- Rotate tokens if they appear in logs, screenshots, or client bundles.
- Use HTTPS for webhook URLs and API calls.
- Treat webhook payloads as operational events, not as an authentication mechanism.