403. It takes about 10 minutes.
You need one thing first: a website or test page whose domain you control, for
example courses.example.com.
Want the reference instead of a lesson? See Set up your first project and Direct upload.
Step 1: Sign in
- Open https://app.segmnt.cloud.
- Pick Google or GitHub.
Step 2: Create a project
A project is one site, one client or one product. A free account has one project. In the dashboard, open Projects → New project, and give it a name. Keep the project id (prj_...); the next steps use it.
Step 3: Verify your domain
Playback is locked to a domain, so add the host that will show the video.- Open the project → Domains → Add domain.
- Enter the exact host, for example
courses.example.com. A subdomain is its own domain: addwww.courses.example.comseparately if you use it. - Copy the TXT record we show you, and add it at your DNS provider.
- Click Verify. The status becomes Verified when the record is found.
Step 4: Create an API key
- Open the project → API keys → Create key.
- Name it, and copy the secret (
sk_...). We show it once.
Step 5: Upload a video
The fastest path is the dashboard: open the project, click Upload, and pick a short MP4. To upload from your own code, use the four calls in Direct upload. They send the file straight to storage with a pre-signed URL, so the file never passes through the API.Step 6: Wait until the video is ready
We encode the video after the upload ends. Poll the video untilstatus is
ready:
status in the answer:
Note — the review hold is Coming soon. When the review hold is on, a free account’s first videos wait for review. Such a video can still reportready, but the playback-token call in Step 7 is refused with409 video_not_ready. If that happens, read Moderation and held videos. The hold is off today, so a new free video is not held.
Step 7: Create a playback token
A playback token is a short, signed pass for one video on one domain. Create it on your server:201 and holds token, expiresAt and embedUrl. Keep the
token value:
Step 8: Embed the video
Put this block on the page that you verified in Step 3. Replacevid_9xR4tL and
the token with your own values:
Step 9: Prove it is locked to your domain
Now try to use the video somewhere else. Ask for the video with a different origin — a site you did not verify:403 with the header X-Segmnt-Error: domain_mismatch. Ask with no
token at all, and you get 403 token_missing:
What you built
- A project with a verified domain and an API key.
- A video that we encoded to HLS.
- A signed playback token for one video and one domain.
- An embed that plays on your domain, and
403off it.
Where to go next
- Embed a video on any website — the iframe and JavaScript embeds.
- Create playback tokens on your server — cURL, Node.js and PHP.
- Add segmnt to WordPress — the plugin path.
- Direct upload — the full upload flow in three languages.
- Errors — what
403and409mean and how to react. - Feature status — what is available, beta and coming soon.
Tested with the current release. The video events, tokens, domain lock and embed are the released API. If a step does not work for you, tell us which step and which answer you got.