Authentication
Sailor public API requests use a one-workspace API key. An owner or admin creates the key in Settings → Integrations → API access. Sailor shows the secret once; store it before closing the dialog.
Production keys begin with sl_live_. Send the key only from a trusted backend. Do not put it in browser code, mobile clients, extensions, public repositories, analytics, or support screenshots.
Every request should include Authorization: Bearer $SAILOR_API_TOKEN.
Request Shape
Workspace And Permission Scope
Every key is permanently attached to the workspace where it was created. A request cannot select or override another organization or workspace. Choose the minimum required scopes when creating the key:
Sailor returns RFC 9457 problem details as application/problem+json when authentication or authorization fails.
Treat the API key as a workspace-scoped secret. A public key leak is a workspace incident: revoke or rotate it immediately.
Write Requests
Create and update requests require an Idempotency-Key header. Use an opaque 8–255 character value that is stable for one logical operation. Retrying the same operation with the same key returns the stored response; using that key with different request data returns 422 idempotency_key_reused.
Header Checklist
Idempotency Keys
If Sailor returns 409 request_in_progress, wait for the Retry-After delay, then retry the same logical operation with the same key. A replayed response includes Idempotent-Replayed: true.
Common Auth Errors
Problem responses have this stable shape:
Security Checklist
- Store keys in server-side secret storage.
- Rotate keys if they appear in logs, screenshots, or client bundles.
- Use an IP allowlist when your outbound addresses are stable.
- Set an expiration for temporary integrations.
- Use HTTPS for webhook URLs and API calls.
- Treat webhook payloads as operational events, not as an authentication mechanism.