HTTP API¶
The web interface uses this API, and so can you.
- Endpoints under
/apitake and return JSON, except the three upload endpoints (…/blob,…/parts/{n},…/thumbnail), which take the raw bytes. - Authentication is the
vistilla_sessioncookie set byPOST /api/auth/login(or by finishing sign-up). X-Vistilla-Lang: ar(oren), sent by the site and the app with every request, picks the language of the emails a request sends (invitations, shared videos, sign-up codes, password resets); their links then carry?lang=ar.- Errors look like
{"error": "message"}, with the status codes listed in Backend → Errors.
Legend:
- 🔓 public: no session needed;
- ◐ optional: works with or without a session;
- everything else needs a session.
Accounts¶
| Method | Path | Notes |
|---|---|---|
| POST | /api/auth/register 🔓 |
{email, name, password, org_name?, invite_token?}. Without an invite this emails a 6-digit code and answers {verify: true, email}. With a valid invite it creates the account and signs in. |
| POST | /api/auth/register/verify 🔓 |
{email, code}. Creates the account and workspace, and signs in. |
| POST | /api/auth/login 🔓 |
{email, password}. |
| POST | /api/auth/logout 🔓 |
Ends the current session. |
| POST | /api/auth/forgot 🔓 |
{email}. Emails a reset link. Answers {ok, found, email_configured, message}. |
| GET | /api/auth/reset/{token} 🔓 |
Is this reset link still valid? |
| POST | /api/auth/reset 🔓 |
{token, password}. |
| GET | /api/me |
Me, my workspaces and teams with roles; each workspace also has accent, member_count and unread (unread activity about its recordings). |
| PATCH | /api/me |
{name?, current_password?, new_password?}. |
| POST | /api/me/email |
{email, current_password}: mails a 6-digit code to the new address (15 minutes). |
| POST | /api/me/email/confirm |
{code}: makes the new address the account's. |
| GET | /api/me/sessions |
Where the account is signed in: {sessions: [{current, created_at, user_agent}]}. |
| DELETE | /api/me/sessions/others |
Signs out every session but this one; answers {signed_out}. |
| PUT, DELETE | /api/me/avatar |
Set (JPEG, PNG or WebP body, up to 512 KB) or remove my photo. |
| GET | /api/users/{id}/avatar?v=… 🔓 |
A person's photo, cached for a year; the v changes with each new photo. Wherever a person appears next to their avatar_hue, their photo's address (or null) comes too: avatar_url on /api/me's user, members, comment authors and a video's uploader; actor_avatar_url on notifications; viewer_avatar_url in insights. |
| GET | /api/workspace-name?name= 🔓 |
Is a workspace name free? |
| GET | /api/team-name?name= |
Can a workspace (a team on screen) be given this name? {available, reason}: one word, not used anywhere on Vistilla. |
Workspaces, teams and members¶
A workspace (orgs) is a team on screen. Underneath, each workspace has
exactly one teams row, never shown, whose id is the team_id the other
routes take. Teams used to hold several of these as channels; migration
0050_one_channel_per_team.sql merged them into one per workspace, and
creating another is refused.
| Method | Path | Notes |
|---|---|---|
| GET, POST | /api/orgs |
List, or create a workspace (a team on screen) {name?, team_name?} (when sign-up is open, or for anyone who can record in a workspace). It is made with its one teams row (named team_name, else "General"; the name is not shown). |
| GET | /api/orgs/{org_id}/storage |
Space used: {workspace_bytes, workspace_videos, total_bytes, quota_bytes} (any member). |
| DELETE | /api/orgs/{org_id} |
Deletes the workspace (a team on screen) with its teams row, recordings and their files. Its owner only; 409 when it is the last workspace they are in. |
| PATCH | /api/orgs/{org_id} |
{accent}: the team's color, one of teal, blue, indigo, violet, pink, red, orange, green, slate (teal clears it). Owners and admins. GET /api/me gives each workspace's accent. |
| GET, POST | /api/videos/{id}/dubs |
The recording's dubs {available, source_lang, dubs: [{lang, status, progress, error, track_url}]}; POST {lang: "ar" | "en"} asks for one (members and up). Ready tracks play from /media/dubs/{id}/{lang}. The GPU job uses /api/dub-jobs/{pass}/job, ref/{n}, progress, fail and track. |
| GET | /media/dubs/{id}/{lang}/chunk/{k} |
Minute k of a voice still being made (the listing's chunks, chunk_ms and chunk_url say how many are here); the GPU job sends them to /api/dub-jobs/{pass}/chunk/{k}. |
| GET | /api/share/{token}/dubs |
On a shared link, the ready dubs only (same shape, available: false), each played from /media/share/{token}/dubs/{lang}; a password-protected link must be unlocked first. |
| GET, PUT, DELETE | /api/orgs/{org_id}/image |
The team's photo: get it (any member), set it (owners and admins; the body is a JPEG, PNG or WebP of at most 1 MB) or remove it. GET /api/me gives each workspace's image_url, or null. |
| GET, POST | /api/orgs/{org_id}/teams |
List the workspace's one teams row. POST always answers 400 ("teams have no channels any more"). |
| GET, PATCH, DELETE | /api/teams/{team_id} |
Read, rename or delete a teams row. Its name is not shown anywhere. DELETE is refused (409) for a workspace's last one, which every one now is: delete the workspace instead. |
| GET | /api/teams/{team_id}/members |
Members and roles. |
| PATCH, DELETE | /api/teams/{team_id}/members/{user_id} |
Change a role, or remove someone. |
| GET, POST | /api/teams/{team_id}/invites |
List, or send an invitation (admin+): {email, role?}. |
| GET | /api/invites/{token} 🔓 |
Look at an invitation. Its team_name is the workspace's name. |
| POST | /api/invites/{token} |
Accept it. |
| POST | /api/invites/{token}/decline 🔓 |
Decline it. |
| POST | /api/invites/{invite_id}/revoke |
Revoke a pending invitation. |
Collections¶
| Method | Path | Notes |
|---|---|---|
| GET, POST | /api/teams/{team_id}/collections |
List (with can_add, and on each can_manage, total_ms, updated_at and latest: its newest four recordings you may see, as {id, title, thumbnail_url}) or create. Creating, renaming and deleting are for the team's owners. |
| PATCH, DELETE | /api/collections/{collection_id} |
Rename or delete (owners). Videos stay. |
| GET, PUT, DELETE | /api/collections/{collection_id}/image |
The collection's picture, shown on its folder: get it (anyone in the team), set it (owners; the body is a JPEG, PNG or WebP of at most 1 MB) or remove it (owners). The list gives each collection's image_url, or null. |
Videos¶
| Method | Path | Notes |
|---|---|---|
| GET | /api/videos?team_id=&collection_id=&q=&tag=&mine=&loose=&sort=&limit=&offset= |
The library, with search. sort is new (the default), old, az, za (by title; a title starting with a number goes by that number), long, short or views. loose=true (without collection_id) leaves out videos that are in a collection, as All recordings does. limit defaults to 40, at most 100. Each video has uploaded_bytes: while status is uploading, the size of the parts that have arrived; after, the whole size. The first page (offset 0) also has total: how many match in all. |
| POST | /api/videos |
Reserve a video: {team_id, title?, content_type?, size_bytes?, visibility?, collection_id?, live?, reply_to_comment_id?}. Returns the upload URLs: proxy_put_url (through the server), direct_put_url (presigned, straight to the bucket; S3 only), and part_url (uploads in parts, live: true), plus video_id, complete_url, content_type, and the limits max_upload_bytes (one request) and max_recording_bytes (in parts). |
| PUT | /api/videos/{id}/blob |
Upload the whole file. |
| PUT | /api/videos/{id}/parts/{n} |
Upload part n of a live upload. |
| POST | /api/videos/{id}/cut |
{start_ms?, end_ms?}: cuts a published recording (editors only) down to that part, for good. The video is processing until the worker has cut it; comments, chapters, reactions and transcript lines then move to the new timeline. 409 while it is not ready or its transcript or summary is being written; 400 for a cut that keeps everything or under a second, or a recording too large to cut. |
| POST | /api/videos/{id}/complete |
{duration_ms?, width?, height?, size_bytes?, title?, trim_start_ms?, trim_end_ms?, partial?}; partial: true publishes the parts that arrived, up to the first missing one. |
| PUT | /api/videos/{id}/thumbnail |
Poster image. |
| GET, PATCH, DELETE | /api/videos/{id} |
Read, edit (title, description, tags, collection_id, team_id (another teams row of the same workspace; with one per workspace, there is nowhere to move to), visibility (once the video is ready, only a team owner may change it: 403 otherwise), ctas: up to 5 link buttons [{label, url, icon?}], icon a picked logo as a small PNG/JPEG/WebP/GIF data: URL, an empty list removes them; the older single cta_label + cta_url still works), or delete. A video carries ctas (every button) and cta (the first). |
| POST | /api/videos/bulk-delete |
{ids: [...]}, up to 200. |
| GET, POST | /api/videos/{id}/chapters |
List or add chapters. |
| DELETE | /api/chapters/{chapter_id} |
Remove a chapter. |
Comments, reactions and moments¶
| Method | Path | Notes |
|---|---|---|
| GET, POST | /api/videos/{id}/comments |
{body, timecode_ms?, parent_id?, mentions?, images?}. images: up to 4 pictures as data:image/…;base64, URLs (JPEG, PNG, WebP or GIF, 4 MB each; the request may be 24 MB); body may then be empty. Each comment lists its images as addresses. |
| PATCH, DELETE | /api/comments/{id} |
Edit (author) or delete. |
| POST | /api/comments/{id}/resolve |
{value: true\|false}. |
| POST | /api/comments/{id}/pin |
{value: true\|false}: pinned to the top of the thread. |
| DELETE | /api/comments/{id}/moment |
Takes the comment off its moment (timecode_ms becomes null). Author, the video's owner or an admin. |
| PUT | /api/comments/{id}/moment |
{timecode_ms}: pins the comment to that moment, or moves it there (clamped to the video). Not for replies. Author, the video's owner or an admin. |
| POST | /api/comments/{id}/reactions |
{emoji}. Same emoji again removes it. |
| GET, POST | /api/videos/{id}/moments |
Emoji on the timeline: {emoji, timecode_ms}. One per person per video: a new one replaces theirs, and the same emoji again removes it (answers emoji: null). |
Sharing¶
| Method | Path | Notes |
|---|---|---|
| GET, POST | /api/videos/{id}/shares |
List or create links: {password?, expires_in_days?, allow_download?, allow_comments?}. |
| POST | /api/videos/{id}/invites |
{emails: [...], message?}: personal links by email (up to 20). |
| PATCH, DELETE | /api/shares/{share_id} |
Change options {allow_download?, allow_comments?, expires_in_days?, password?}, or revoke. |
| GET | /api/share/{token} ◐ |
The shared video, or {locked: true}. |
| POST | /api/share/{token}/unlock 🔓 |
{password}. Sets a 12-hour unlock cookie. |
| GET, POST | /api/share/{token}/comments ◐ |
Guest comments: {body, timecode_ms?, parent_id?, guest_name?}. |
| POST | /api/share/{token}/comments/{comment_id}/reactions ◐ |
Guest reactions. |
| GET, POST | /api/share/{token}/moments ◐ |
Guest moments. |
| POST | /api/share/{token}/views ◐ |
Report viewing progress: {session_key, watched_ms?, completed?, guest_name?}. |
Video calls¶
| Method | Path | Notes |
|---|---|---|
| GET | /api/calls |
The Meetings page: {upcoming: [{id, title, scheduled_at, created_at, host_name, host, invites}], recent: [{id, call_id, title, started_at, ended_at, live, people, photos, video_id, host_name, host, personal}], room}; room is your own room's call id (or null) and personal marks a meeting held in someone's room; photos[i] is the profile photo of people[i] (or null), from the account they were in the call with. Upcoming: planned calls you host or were invited to (scheduled from two hours ago on, or kept for later in the last 30 days and not used yet). Recent: the last 30 meetings (sessions of 15 s or more) you hosted, were invited to or joined signed in. |
| POST | /api/calls |
Start a call, with the caller as its host (kept in calls). Body optional: {planned?, title?, scheduled_at?, when_text?, invites?: [emails], team_id?, agenda?: [{title, min}]} (agenda: up to 20 topics, kept in calls.agenda, given back by GET /api/calls and, to whoever may come in, GET /api/calls/{id}); scheduled_at needs a title (400 otherwise), and invitations name the team of team_id (by its workspace's name); a time or planned puts it on the Meetings page, and each address is invited as by /invites (the email names the title and when_text). Answers {id, max_people, invites}. The id is ten random characters and a MAC of them under the server's key, so a link survives a restart and nobody can make one up. |
| GET | /api/calls/{id}?invite= 🔓 |
{id, people: [names], full, max_people, host, open, let_in, invite_for, signed_in}, for the waiting room: host when the caller started it, open for a call from before hosts were kept (the link alone lets in), let_in when the caller goes straight in (host, invited by their signed-in address, or open) rather than asking. An invite token alone lets no one in: when it is one of the call's and the caller is not let in, invite_for is the address it was sent to, half hidden, so the page can ask them to sign in with it. 404 for an id the server did not give out. |
| PATCH | /api/calls/{id}/schedule |
Host only: {title, scheduled_at, when_text?, invites: [emails], team_id?, agenda?} changes a scheduled meeting (its agenda only when agenda is sent). New addresses are invited, ones left out lose their invitation, and when the title or time changed the others are emailed the change: {id, invites}. |
| POST | /api/calls/{id}/invites |
Host only: {email, team_id?} invites one address (at most 30 a call); the email is from the team of team_id (else the host's first team). Sends an email with a personal link /call/{id}?invite=<token> when mail is set up: {email, url, emailed}. |
| GET | /api/calls/{id}/invites |
Host only: {invites: [emails]}. |
| POST | /api/calls/room |
Your own room: a call whose link never changes, made the first time it is asked for (one per person, calls.personal). Not planned, so not on Upcoming; in no team, so anyone with the link knocks and the host lets them in. Answers {id}. |
| POST | /api/calls/hidden |
{id}: a recent meeting (cse_…) or an upcoming one (a call id) taken off the caller's own Meetings page; nobody else's list, no recording. |
| DELETE | /api/calls/{id}/schedule |
Host only: takes a planned meeting off the Meetings page; its link keeps working. |
| PUT | /api/calls/{id}/recording |
{video_id} (your own video): the recording made of this call, kept with its latest meeting. |
| POST | /api/calls/catchup |
{text, lang?}: a few points on what was said before someone joined, from the call's captions, by the summary model of one of the caller's workspaces: {items: [...]}. 400 when none has one. |
| POST | /api/calls/translate |
{texts: [1–20 caption lines], to: "en"|"ar"} → {texts} one for one, by the caller's workspace AI for summaries (for browsers without their own translator); {texts: [], busy: true} when a free AI plan says wait or it takes over 12 s. |
| POST | /api/calls/live-token |
A short-lived pass ({provider, token, model, url}) from one of the caller's workspaces with a captions provider. Deepgram: a 30-second token; the browser opens wss://api.deepgram.com/v1/listen with it (subprotocol bearer), streams WebM/Opus and reads interim and final words. Speechmatics: a 60-second temporary key (POST mp.speechmatics.com/v1/jwts?type=rt); the browser opens wss://eu.rt.speechmatics.com/v2?jwt=…, sends StartRecognition (model is the language pack, e.g. ar_en), streams 16 kHz 16-bit samples from an audio worklet (assets/pcm-worklet.js) and reads AddPartialTranscript / AddTranscript. 400 when none is set up. |
| POST | /api/calls/speech?lang= |
A few seconds of the caller's voice (WebM/Opus body, up to 2 MiB): {text}, or {text: "", busy: true} when the model does not answer within 12 s or is over its rate limit (the piece is dropped, not retried), by the transcription model of one of the caller's workspaces. Live captions for browsers whose own speech service does not work. 400 when no workspace has one. |
| PUT | /api/videos/{id}/speakers |
{spans: [{name, start_ms, end_ms}]} (up to 20 000; uploader or moderators): who was talking when in a recorded call. GET /api/videos/{id}/transcript then gives each segment a speaker, whoever talked most during it. |
| GET | /api/calls/{id}/ws?name=&invite= ◐ |
WebSocket for the call's messages (JSON). Signed-in people are named by their account, guests by name. The host and invited people are let in at once; anyone else gets waiting {id} and the host(s) in the call get knock {id, name, photo} (photo: their account photo, or null; and knock-gone {id} when it is answered or they leave); the host sends admit {id} or deny {id}, and the one at the door then gets welcome or denied (at most 10 waiting). The server sends welcome {id, people, ice, host, relay, max_people, relay_token}, joined, left, state, signal {from, data}, full, pong; the browser sends signal {to, data} (an SDP offer or answer, or an ICE candidate), state {mic, cam, screen, hand, rec} (kept, and given to whoever joins next), say {kind: chat|file|react|mark|cc|agenda|poll|vote|poll-close|action|board|stroke|stroke-del|board-clear|ink|rec-link|sync-req, …} (passed to everyone else and not kept; arrives as say {from, data}); a file comes in parts of 36 KB ({id, name, type, size, part, parts, data}, data in base64, at most 10 MB), sent one after another and ping every 25 s. At most 4 people; picture and sound go browser to browser, never through the server. With relay (the server has a LiveKit relay, VISTILLA_LIVEKIT_*, that answered when the call opened): at most 12; welcome carries relay_token, a LiveKit pass (JWT, six hours) into the room named after the call as the person's number in it, and the browser connects to the relay through /api/lk. |
| GET | /api/lk/rtc… ◐ |
The LiveKit relay's signaling, passed through to it (WebSocket, or a plain request for …/validate); only rtc paths. 404 without a relay. |
Transcripts, summaries and AI settings¶
| Method | Path | Notes |
|---|---|---|
| GET, POST | /api/videos/{id}/transcript |
Read it (with segments and captions_url), or queue it again. ?lang=en or ?lang=ar reads it in that language: see Translation in the AI pipeline. |
| GET, POST | /api/videos/{id}/summary |
Read it, or queue it again. Takes ?lang= as the transcript does. |
GET /api/videos/{id}/chapters?lang= names the AI's chapters in that language, from the summary's translated topics (translation: "pending" while it is made).
| GET | /api/search/transcripts?team_id=&q= | Search spoken words (at least 2 characters, 50 results). |
| GET | /api/orgs/{org_id}/ai | Providers on offer and the workspace's settings (admin+). |
| PUT, DELETE | /api/orgs/{org_id}/ai/{purpose} | purpose is transcription, summary or captions (live captions, Deepgram only), each its own provider. Body: {vendor, model, api_key?, base_url?}; no api_key reuses the key kept for this job, else the same vendor's key for the other job. A vendor that cannot do the job is refused. |
| POST | /api/orgs/{org_id}/ai/{purpose}/test | Check the key works: a second of sound for transcription, a short text prompt for summary. |
Notifications and insights¶
| Method | Path | Notes |
|---|---|---|
| GET | /api/notifications?unread_only=&limit=&before= |
Activity, newest first, default 30; before (ms) gives those older than it. Each has video_thumbnail_url and, for a comment, comment_parent_id (its thread). |
| POST | /api/notifications/read |
{ids?} or {video_id}. No ids means everything; video_id marks the notices about that video's comments (not watched). Answers the new unread count. |
| GET | /api/videos/{id}/analytics |
Insights (uploader or admin+). |
| POST | /api/videos/{id}/views |
{session_key, watched_ms?, completed?}. |
| GET | /api/healthz 🔓 |
{"status": "ok"}. |
Media (outside /api)¶
| Method | Path | Notes |
|---|---|---|
| GET | /media/videos/{id} |
Stream, with Range support or a 307 to the bucket. |
| GET | /media/videos/{id}/download |
Download with a file name. |
| GET | /media/comment-images/{team}/{file} |
A comment's picture. Its name has a long random part and is only given out with the comment, so it needs no session (a shared link's guests see them). |
| GET | /media/thumbs/{id} |
Poster image. thumbnail_url adds ?v= naming the picture, so a new one (PUT /api/videos/{id}/thumbnail, the owner) is fetched afresh; each picture is stored under a name of its own and the one it replaces is deleted. &w=480 or &w=960 returns a WebP at most that wide (made with ffmpeg and kept on the server's disk; the poster itself if it cannot be made), as the library's cards ask for. |
| GET | /media/favicon/{host} |
A website's small logo, for its link button: a logo remembered for the site (site_logos) first, then the icon its home page names (<link rel="icon">), else /favicon.ico, else Google's favicon service. The server fetches it, public addresses only, so viewers' browsers do not; cached for a week. Signed-in callers may ask for any site; others only for one a recording links to. |
| GET | /media/videos/{id}/captions.vtt |
Captions. |
| GET | /media/share/{token} ◐ |
Stream through a share link (the token, and the unlock cookie for a password-protected link, grant access). |
| GET | /media/share/{token}/download ◐ |
Only if the link allows downloads. |
| GET | /media/share/{token}/captions.vtt 🔓 |
Captions through a share link. |
Pages and files¶
| Path | Serves |
|---|---|
/, /app, /record, /settings, /tour |
Pages. |
/call, /call/{id} |
Video call page. |
/v/{id}, /s/{token} |
Video and share pages, with link-preview tags. |
/join/{token}, /reset/{token} |
Invitation and password-reset pages. |
/preview/v/{id}, /preview/s/{token} |
Poster image for link previews. |
/assets/* |
Scripts, styles, icons. |
/docs, /docs/* |
This documentation (/docs redirects to /docs/). |
/sw.js, /favicon.svg |
Service worker, icon. |
Example: upload a file with curl¶
B=https://vistilla.example.com
# Sign in and keep the cookie.
curl -c jar -H 'content-type: application/json' \
-d '{"email":"me@example.com","password":"…"}' $B/api/auth/login
# Find your team id.
curl -b jar $B/api/me
# Reserve, upload, complete.
curl -b jar -H 'content-type: application/json' \
-d '{"team_id":"tm_…","title":"Demo","content_type":"video/mp4","size_bytes":1234567}' \
$B/api/videos # → {"video_id": "vid_…", "proxy_put_url": …}
curl -b jar -X PUT -H 'content-type: video/mp4' --data-binary @demo.mp4 \
$B/api/videos/vid_…/blob
curl -b jar -H 'content-type: application/json' \
-d '{"duration_ms":30000,"width":1920,"height":1080}' \
$B/api/videos/vid_…/complete