https://api.segmnt.cloud
This reference covers 39 public endpoints across 30 paths. Every public
endpoint has an entry in the sidebar, with its request and response shapes.
Authentication
There are two ways to authenticate.
Rules:
- Keep the API key on your server. It can create playback tokens, so anyone with it can play your videos anywhere. Never put a key in a page, a browser or a mobile app.
- A key works only for its own project’s routes. A key from another project
answers
404. - A revoked key answers
401immediately. - Account routes (projects, API keys, domains, billing) accept only the session. An API key cannot manage keys, projects or domains.
- Sign-in is SSO only: Google and GitHub. We never store a password.
Conventions
- IDs are strings with a type prefix:
acc_,usr_,prj_,vid_,upl_,key_,dom_,whe_,evt_. - Times are RFC 3339 in UTC.
- Pagination is by cursor. Pass the
nextCursorfrom an answer back ascursorto get the next page. - Errors are
application/problem+jsonwith a stablecode. See Errors. Idempotency-Keyis scoped to the account and the route. The same key with the same body returns the first result. The same key with a different body gets422.- Money is an integer in the smallest currency unit (halalas for SAR; 1 SAR = 100 halalas).
- Bodies are
application/json. Another content type gets415.
Rate limits
Over a limit you get
429 with Retry-After. See Errors.
The public endpoints
System and auth
Projects, keys and domains
Uploads and videos
Webhooks, usage and billing
Where to go next
- Quickstart — the end-to-end path, from upload to a
403off-domain. - Errors — every code, with the
403and409causes. - Changelog — what changed and when.
- Glossary — the words used here.