Skip to main content

API Reference

Videas Public API · v1.0.0

Download OpenAPI

Introduction

The Videas API for third-party integrators.

It reads your organization's library and writes to it, it publishes what the library holds on the organization's channels, and it reads what their audience watched:

  • the library — GET /v1/assets lists its assets and GET /v1/workspaces the workspaces they are in, each counted under the same filters by its …/count, and GET /v1/assets/{asset_id} reads one asset with what a listing leaves out, such as its tags and its custom fields. Every asset is in exactly one workspace, the one its workspace_id names;
  • its collections — GET /v1/collections, the lists of assets it plays one after the other, such as playlists, and what each one plays (« Collections »);
  • adding to it — POST /v1/uploads, a file you send or one we fetch from a link (« Adding a file »), and POST /v1/assets, a video hosted on YouTube, Vimeo or Dailymotion (« Adding a video hosted elsewhere »);
  • editing an asset — its words, its tags, its values of the organization's own fields, which GET /v1/custom-fields lists, and its picture (« Editing an asset », « An asset's picture »);
  • the channels — GET /v1/channels, the categories each one files its videos in, GET /v1/categories, and what they publish, GET /v1/publications, which you create and change (« Publishing on a channel »);
  • what was watched — GET /v1/analytics/sessions, who watched which asset, when, how much and which stretches of it (« Analytics »).

More resources land under /v1 without changing what is already there.

This reference is generated from the OpenAPI contract the API's backend publishes.

Authentication

Every request carries an API key of your organization (ak_…) in the Authorization header. A key is used from a server: /v1 sends no CORS headers, so no web page can call it.

Authorization: Bearer <key>

An API key belonging to your organization, ak_…. An owner or an administrator creates one in the Videas console; the raw value is shown once.

Create a key and make a first call

Base URL & versioning

Base URL
https://api.videas.com
Version
/v1 · 1.0.0

The version is in the path: /v1. A new endpoint, optional parameter, field or value ships without a new version — read what your code does not know yet as exactly that, never as an error. Removing, renaming, changing a type or refusing what used to be accepted would be a /v2.

The contract the API serves is the reference: its interactive documentation is at https://api.videas.com/v1/docs, its OpenAPI file at https://api.videas.com/v1/openapi.json. The file this page downloads is a copy of it, with the same content.

Errors

Every error has the same shape, whatever the status: code, message and, when the server has one, a request_id to quote when you write to us. Branch on code, never on message: it is written for a person and may change.

{
  "code": "not_found",
  "message": "…",
  "request_id": "…"
}
StatusMeaning
400Invalid request — the message names the parameter or the field
401No key, or a key that is unknown, expired or revoked
402
403The key does not carry the permission the endpoint requires
404Nothing of the kind in your organization
409At odds with the resource's state — an upload already completed, for instance
413File too large: over 10 GiB
415Body not sent as application/json
422Body is not the expected request: a field missing, of the wrong type, or unknown
429Too many requests: wait the seconds Retry-After gives, then send again
500A failure on our side — quote the request_id when you write to us
502
503Service unavailable right now — retry after a growing delay
504The server stopped waiting — a GET is safe to send again

Authentication

Send an API key belonging to your organization as Authorization: Bearer <key>. An owner or an administrator creates one in the Videas console, choosing what it may do, and the raw value is shown once. A key may carry any of these, and each opens what it says and nothing else:

  • assets.library.read — read the library: its assets, its collections, its workspaces and its custom fields;
  • assets.library.upload — add files to it with POST /v1/uploads, and follow or give up the uploads it opened;
  • assets.library.edit — change an asset already there: its words, its tags, its custom fields and its picture;
  • assets.third_party_video.import — with assets.library.upload beside it, add a video hosted elsewhere with POST /v1/assets;
  • websites.catalogue.read — read the channels, their categories and what they publish;
  • websites.catalogue.publish — publish assets on the channels, and change what they publish;
  • analytics.sessions.read — read the playback sessions: who watched which asset, when and how much.

None implies another: a key made to publish cannot edit an asset, and one made to edit cannot read the library. A write answers what it wrote whether or not the key may also read it.

Three of them depend on what the organization uses. The channels' two open nothing for an organization that does not publish channels: every channel endpoint answers it 403, as it would a key without them. And assets.third_party_video.import opens nothing until Videas turns on videos hosted elsewhere for the organization: until then POST /v1/assets answers 404. A key may carry either beforehand, and works with no change once the organization has the feature.

A key authenticates the organization, not a person: it keeps working when the person who created it leaves, and everything it can reach is scoped to that one organization. A key belongs on a server: /v1 sends no CORS headers, so no web page can call it — a page sends a file with the token of one upload instead, as « Adding a file » says.

Lists and parameters

Lists are paged with limit, after and order: send the page's next back as after until it is null. A page carries no total and there is no offset; a list that can be counted has a …/count beside it, which takes the list's filters and nothing else.

A parameter that takes several values takes them as one key, separated by commas — ?type=video,audio, which is OpenAPI's style: form with explode: false. A key given twice is refused with a 400, and so is a key the endpoint does not list: a misspelt filter is an error, never a filter ignored. A list of words is the exception, since a word may itself hold a comma: tag is given once per word — ?tag=shared&tag=platform:heliaq, which is style: form with explode: true — and an endpoint lists such a key so.

What may change

Without a new version: a new endpoint, a new optional query parameter, a new field in a response, and a new value in a list of values such as an asset's type or status, or an error's code. Read an unknown field or value as something your code does not know yet, not as an error. Only with one: removing or renaming anything, changing a type or a unit, or refusing a request that used to be accepted — that is a new version, /v2.

Errors

Errors always have the same shape, whatever the status, so one handler on your side can read all of them: code, message, and a request_id to quote when you ask us about one. Branch on code, never on message, which is written for a human and may change at any time. A code keeps its meaning for good and the list may grow: read a code you do not know by the HTTP status it came with.

Every body is JSON but a picture's, which is the picture itself (« Editing an asset »), and a JSON body not sent as application/json is a 415. A body naming a field the request does not list, or a field of the wrong type, is a 422; a value the request's rules refuse is a 400, whose message names the field. An identifier in a body naming nothing your key can reach — a workspace, a channel, an asset, a custom field — is a 404, whether it names nothing at all or something of another organization's.

Any request may be refused with a 429 (rate_limited) when a key, or its organization, sends more than this API accepts: wait the number of seconds Retry-After gives, then send it again. A 500, 503 or 504 is a failure on our side: retry after a growing delay — « Retrying », below, says which requests are safe to send again as they are, and what to look for before sending the others.

Collections

A collection is a list of the library's assets played one after the other — a playlist. GET /v1/assets does not list collections; GET /v1/collections does, with what describes each one: its name, its description as the organization wrote it — Markdown, not rendered —, its workspace_id, how many entries it holds and how long they last, and its picture's thumbnail_url, which follows the collection as an asset's follows the asset. GET /v1/collections/{collection_id} adds its tags.

tag narrows the list to the collections filed under any of the words given, one tag per word: ?tag=shared&tag=platform:heliaq lists those filed under either. A word is matched as PUT /v1/assets/{asset_id}/tags matches one — case, accents and punctuation do not count — and only a tag the collection's read answers counts. GET /v1/collections/count counts under the same words.

GET /v1/collections/{collection_id}/items is what the collection plays: each item is an asset as GET /v1/assets answers it, with its position, where it comes when the collection is played, from 0. The items come in the order of their assets' created_at, like every list here, so that a walk never skips or repeats one: sort them by position to play them. An entry whose asset the library does not show — one hidden from it, say — is not an item, and the positions count only the items listed, so item_count may be larger than what the items answer. A collection set to play in a random order is answered in the order the organization arranged it in, the same on every read, so a copy of its positions holds from one read to the next; its player still shuffles it each time it plays. A collection Videas fills by rules answers what its rules select when it is read, in a new order on every read if it is set to a random one, and its item_count is 0.

Analytics

What is under /v1/analytics/ is measured rather than stored: it is read from our analytics store, it changes while somebody watches, and it is the same population whichever endpoint answers. That population is your organization's playback sessions that played: a page that opened a player nobody pressed play on is not one, a session stays whatever became of its asset — deleted, hidden, moved —, and bots are left out. Every endpoint of the namespace takes the same filters, asset_id and viewer_id, and nothing else narrows what it counts, so two of them never disagree about what they are over.

GET /v1/analytics/sessions lists the sessions, one sitting of one viewer on one asset each: when it started, how long it was played in watch_time_ms, how far it got in completion_percentage, the asset's duration as it was then, and watched, the stretches of the asset that were watched, in milliseconds — each on one of a hundred equal steps of the duration, so a stretch covers a little more than was watched. Add up the stretches of a viewer's sessions on an asset to know how much of it they have seen. A list is a snapshot: a session still playing has more watch time on the next read, so read again a session you need final, and one whose viewer presses play reaches the list about a minute later. GET /v1/analytics/sessions/count counts under the same filters.

viewer_id is what your embed code says it is: send viewer_id=<uuid> in the player's address and it is that viewer's sessions you read back — derive a uuid from an identifier of yours that is not one, a UUIDv5 of it for example. Without one, it identifies one browser on one device, and nobody in particular. Nothing checks the identifier a page sends, so treat it as what the page claimed. asset_id may name an asset GET /v1/assets/{asset_id} no longer answers.

Adding a file

POST /v1/uploads creates the asset at once — uploading, at the root of the workspace you named, its id in asset_id — and its file comes from one of two sources. Send exactly one of size_bytes or source_url:

  • size_bytes: you send the file. The answer carries upload_url and upload_token. Send the file to upload_url with the token in X-Upload-Token: whole with one PUT when it is at most max_put_bytes — Content-Length its exact size, any Content-Type — or with tus 1.0 core, in chunks of at most max_put_bytes and, but for the last, of at least 5 MiB. upload_url is opaque: use it exactly as given, and never build one. The request that completes the file answers X-Checksum-Sha256, the SHA-256 of what was stored. A PUT that breaks off records nothing and is sent again whole; tus resumes from the offset a HEAD answers. A file not complete by the upload's expires_at is given up on.
  • source_url: we fetch the file from that link, in the background. The answer carries no address and no token: there is nothing to send.

From a browser. Your server opens the upload with its key, then hands upload_url and upload_token — never the key — to the page, which sends the file from any origin: one PUT with fetch, or a tus client. The token is answered once, by the request that opened the upload, and admits its holder to that one upload and to nothing else.

What a link must be. http or https on the scheme's own port, 80 or 443, with no user name or password in it, leading to the file itself: a YouTube, Vimeo or Dailymotion page is refused at once — « Adding a video hosted elsewhere » says how to add one —, and a web page where the file should be fails not_a_file. At most 10 GiB. We follow up to five redirects, never from https to http, and resume a broken download with a Range request where the server honours one. Give sha256 and the file must match it. A presigned link to your bucket is the usual case, so a link is treated as a credential: sealed while the download needs it, and never answered back whole — the upload's source_url is the link without its query. Sign it for longer than the download may take, retries included. An organization may have only so many links waiting or downloading at once; past that, the request is a 429 with Retry-After.

Links are fetched from these addresses and from no others — allow them in your firewall or your bucket's policy:

  • IPv4: 193.104.118.42 and 193.104.118.43;
  • IPv6: 2a12:3440:102::3:42 and 2a12:3440:102::3:43.

They fetch every customer's links, so allow them beside the link's signature and never instead of it: an object these addresses may read unsigned is one any of our customers may have us fetch into their library.

Following an upload. Nothing notifies you yet: poll GET /v1/uploads/{upload_id} — its status, its received_bytes, and for a link that failed its failure — or GET /v1/assets/{asset_id} with a key that reads the library. An upload is pending, then receiving, then completed; or it ends cancelled — DELETE /v1/uploads/{upload_id} gives it up —, expired, or for a link failed. UploadStatus says which source reaches which, and UploadFailureCode what each failure means and what to do about it. Once the upload is completed, the asset goes on to processing, then ready; an upload that ends any other way leaves its asset error.

Adding a video hosted elsewhere

POST /v1/assets creates an asset that plays a video from its provider's site — YouTube, Vimeo or Dailymotion —, named in third_party_url by the address of its page or the one its share button gives. Nothing else is taken there: not an embed code, not another site, and not a link to a file, which POST /v1/uploads adds. The key needs assets.third_party_video.import beside assets.library.upload, and the organization must have videos hosted elsewhere turned on (« Authentication »).

The provider is asked about the video while your request waits. Its answer names the asset unless you send name, describes it unless you send description, and says whether the video may be played outside its site: a private, deleted or non-embeddable video is refused with a 400. A provider that does not answer in time, or answers with a failure of its own, is a 502 (upstream_error): send the request again in a moment. Either way nothing is created. The provider's poster becomes the asset's picture when it arrives in time; otherwise the asset is created without one, and PUT /v1/assets/{asset_id}/thumbnail gives it one.

The asset is ready at once — there is no file to receive or process —, at the root of workspace_id. The answer is a 201 with its Location and the asset as GET /v1/assets/{asset_id} answers it, its third_party saying which video it plays; third_party.video_id, on every page of GET /v1/assets, is what to match your own records on.

Editing an asset

Four requests change an asset already in the library, each with assets.library.edit:

  • PATCH /v1/assets/{asset_id}, its words — name, description, excerpt, copyright, language, external_ref, seo_title and seo_description. A field you leave out stays as it is, a value replaces it, and null empties it — but for name, which is never empty.
  • PUT /v1/assets/{asset_id}/tags, the words it is filed under, sent as words rather than ids: {"tags": ["Carbon fibre", "Recycling"]}. Case, accents and punctuation do not count, so carbon-fibre names the same tag. A word is looked for among the tags of the asset's workspace, then among the organization's; one that matches neither becomes a new tag of the organization, as you wrote it. The list replaces the asset's tags, except those Videas attaches itself, which stay whatever you send; an empty list takes yours off. A workspace may file its assets only under the tags it already has: there, a word that matches none is refused with a 400.
  • PATCH /v1/assets/{asset_id}/custom-fields, its values of the organization's own fields. GET /v1/custom-fields lists the fields, each with its type and where it applies. A value is written by its field's id, in the shape the field's type gives it — CustomFieldValue — and null empties it, but for a required field. A choice field's values are its options' ids, and GET /v1/custom-fields/{field_id}/choices lists them apart, since a field may offer thousands. The fields you name take the values you send and the others keep theirs; a request any of whose values is refused writes nothing.
  • PUT /v1/assets/{asset_id}/thumbnail, its picture. The body is the picture itself, not JSON — a JPEG, a PNG or a WebP of at most 10 MiB, with a Content-Type naming which.

Each answers the whole asset, as GET /v1/assets/{asset_id} answers it, so one shape is read whatever was written. A request that changes nothing writes nothing: sending what the asset already holds — its words, its tags, its values, its picture — leaves it as it was, updated_at included. An asset's updated_at moves with its words and its picture, never with its tags or its custom fields. The last request to arrive wins: nothing checks what the asset held when you last read it.

A change a key makes to an asset's name, description, excerpt, copyright or language, to its tags or to its custom fields is recorded in the asset's history in Videas under the key's name, so the people who look after the library see which integration made it.

An asset the organization has validated in its shared pool is read-only here: each of these requests is refused with a 403, whatever the key carries, since only that pool's moderators can change it, and they do so from Videas.

An asset's picture

thumbnail_url, on every asset a listing or a read answers, is the address of the picture the asset is shown with — the one the organization chose, else the one Videas picked —, and null while there is none. It is stable and anonymous: it needs no key, goes as it is in a web page's <img>, and goes on answering the asset's picture when another one is chosen, so store the address rather than the bytes. It is on the domain your organization's Videas application is served on, not on this API's.

It answers a JPEG at the picture's own size, at most 3840 pixels a side; with its last segment changed it answers other formats and sizes — thumbnail.webp, thumbnail.png, or {fit}-{width}x{height}.{ext} for the picture fitted to a box, which thumbnail_url itself describes. Its answers may be held for a few minutes, and carry an ETag. It answers 404 once the asset is deleted or hidden, or no longer has a picture: read the asset again then.

Publishing on a channel

A channel is a public site where the organization publishes videos for an audience. GET /v1/channels lists the organization's channels, online or not: name is the one its audience reads, url its home page — null while no domain of the channel is switched on. Reading them takes websites.catalogue.read, and so does every read below; the two writes take websites.catalogue.publish.

Categories are each channel's tree, read here and arranged from Videas. GET /v1/categories?channel_id= lists them flat, in the order they were created: rebuild the tree from parent_id — null at the root — and sort the categories sharing a parent by position, then by name. A category switched off is listed, and may be filed in; its page answers 404 until it is switched on.

A publication is one asset on one channel, at its own address, filed in that channel's categories. GET /v1/publications lists them, narrowed by channel_id, asset_id and status: ?asset_id= says where an asset is published, and with channel_id beside it whether it is published there.

  • status is draft, published or archived. A publication scheduled for later is published with a published_at still to come: the channel shows it from that instant.
  • access says who it is for, read in five words — public, authenticated, restricted, paid and on_request — and written in two: public, anybody the channel lets in, and authenticated, anybody who signed in to the channel or gave its password. The other three stand for a right or an offer set from Videas: a request may neither set one (400) nor move a publication off one (409). Left out of a creation, the channel decides — on a channel whose visitors open an account themselves and whose site is otherwise open, a new publication asks for that account; on any other, it is open to everyone the channel lets in. Created authenticated, sent so or given so by the channel, a publication is shown locked: the visitors it is not for still see it in the channel's listings when it is listed, and at its page, and playing it asks them to sign in. A PATCH moving a publication's level leaves that as it was. It is the publication's own level: on a channel that asks every visitor to sign in, a public publication is still behind that sign-in.
  • slug is the handle its url is built on. Left out of a creation, it is made from the asset's own handle, else its name, followed by -2, -3 and on where the address is taken; sent, it is taken as it is — a 400 when the channel's own site answers that address, a 409 when another publication or a page of the channel holds it. A new slug leaves the old address answering, sending visitors to the new one.
  • category_ids are the categories it is filed in, and primary_category_id its main one, which must be among them. It is a set: read, its order says only that the main category comes first, the others following in the order GET /v1/categories lists them; sent, the order is ignored. Sent, the list replaces the set: a category it stays in keeps the place and the featuring given to it there in Videas, and one it enters puts it last.

POST /v1/publications publishes an asset on a channel. The asset must be ready — a 409 until it is — and is published at most once on a channel, so a second request for the same pair is a 409 too. It is created a draft unless status says published. PATCH /v1/publications/{publication_id} changes one: what you send is written and what you leave out stays, and its channel and its asset never change. Both answer the whole publication; a PATCH that changes nothing writes nothing, updated_at included, and the last request to arrive wins. Nothing deletes a publication: archived takes it off the channel and keeps it, and a new slug frees its address.

While the organization's channels are still being moved to Videas, every write on them is refused with a 409: they are changed from the platform they are moving from until the move is complete. Reading them answers as usual.

Retrying

A GET is always safe to send again, and so are PATCH and PUT: each says what the resource should hold, so sent twice the second finds it holding that already and writes nothing. DELETE /v1/uploads/{upload_id} is safe too: an upload already given up on is answered 204 again. A POST creates something, so after a timeout or a 5xx, look for what the first one may have created before sending it again:

  • POST /v1/uploads and POST /v1/assets are not idempotent: sent twice, either creates two assets. Set external_ref on every one, and look it up with GET /v1/assets?external_ref= — which takes assets.library.read — before sending it again. An asset POST /v1/assets created is complete when it is found, ready from the moment it exists. A link given to POST /v1/uploads is already being fetched when its asset is found: do not send it again. A file you were sending cannot be resumed — its token was in the answer you lost — so open a new upload: the first asset ends error when its upload expires, and an error asset with no file is such an abandoned attempt.
  • POST /v1/publications publishes an asset once on a channel: sent again, it is refused with a 409, and GET /v1/publications?channel_id=…&asset_id=… finds the publication the first one made.

Schemas

The objects the API takes and returns, with their fields and the values they may hold.

AssetCount

How many assets the listing would answer under the same filter.

FieldTypeRequiredDescription
countintegerRequired

Counted when asked: a listing begun afterwards may meet assets created or deleted since.

AssetStatus

Where an asset is in its processing.

uploading — its bytes are arriving; processing — they have arrived and are being worked on; awaiting_credit — a video whose first month of storage the organization's credit could not pay, so nothing of it is encoded yet: it resumes once the credit covers it, and is deleted after seven days still waiting; ready — it can be played, although work may still go on behind it; error — the work ended with nothing playable. The list may grow, like AssetType's.

One of: uploading, processing, awaiting_credit, ready, error

AssetSummary

One asset of the organization's library.

FieldTypeRequiredDescription
idstring (uuid)Required

The asset's identifier — stable for its whole life, and the one to store.

namestringRequired

Its title, as the organization wrote it. Never empty.

typeAssetTypeRequired

What kind of thing it is.

One of: video, audio, image, document, archive, file, subtitles, third_party, other

statusAssetStatusRequired

Where it is in its processing: only a ready asset can be played.

One of: uploading, processing, awaiting_credit, ready, error

workspace_idstring (uuid)Required

The workspace it is in — the id of one of GET /v1/workspaces. An asset is in exactly one here, whatever else the organization files it under.

descriptionstringnullableRequired

Its description, as the organization wrote it; null when it has none.

external_refstringnullableRequired

Your identifier for this asset, when the organization recorded one — the field that maps an asset of ours to a record of yours. Not unique; null when unset.

languagestringnullableRequired

The language of its content, as a BCP 47 tag (fr, en-GB); null when unknown.

duration_msintegernullableRequired

Its running time in milliseconds, for a video or a sound; null when it has none or it is not known yet.

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When anything about it last changed (RFC 3339) — but for its tags and its custom fields: setting them does not move it.

third_partyThirdPartyVideonullableRequired

For an asset of type third_party, the video it plays from another provider's site; null for every other type.

third_party.providerThirdPartyProviderRequired

Who hosts it.

One of: youtube, vimeo, dailymotion, other

third_party.video_idstringnullableRequired

The provider's own identifier of the video — what the address of its page names, such as the v of a YouTube address — and what to match your own records on. null for other, and when it is not known.

third_party.player_urlstring (uri)nullableRequired

The address of its player, https://, to put in an <iframe>; null when none is known, and the video then plays nowhere.

thumbnail_urlstring (uri)nullableRequired

The address of its picture — the one the organization chose to show it with, else the one Videas picked for it — as a JPEG at its own size, at most 3840 pixels a side; null while it has none.

Stable and anonymous: it needs no key, can be put as it is in a web page's <img>, and goes on answering the asset's picture when another one is chosen, so store the address rather than the bytes. Its answers may be held for a few minutes and carry an ETag.

The same address gives other sizes and formats with its last segment changed: thumbnail.webp or thumbnail.png for the picture at its own size, and {fit}-{width}x{height}.{ext} for one fitted to a box — fit cover (filling the box, cropped to it) or contain (inside it, never cropped), ext jpg, webp or png — such as cover-320x180.jpg or contain-1280x720.webp. A box it does not keep is redirected (308) to the smallest one it keeps that covers it. A picture is never enlarged.

It answers 404 once the asset is deleted or hidden, or no longer has a picture.

AssetType

What kind of thing an asset is.

The list may grow: a client should read a value it does not know as a kind this client does not handle, not as an error.

One of: video, audio, image, document, archive, file, subtitles, third_party, other

AssetView

One asset of the organization's library, read by its id: every field a listing answers about it, under the same names, and the ones a listing leaves out.

FieldTypeRequiredDescription
idstring (uuid)Required

The asset's identifier — stable for its whole life, and the one to store.

namestringRequired

Its title, as the organization wrote it. Never empty.

typeAssetTypeRequired

What kind of thing it is.

One of: video, audio, image, document, archive, file, subtitles, third_party, other

statusAssetStatusRequired

Where it is in its processing: only a ready asset can be played.

One of: uploading, processing, awaiting_credit, ready, error

workspace_idstring (uuid)Required

The workspace it is in — the id of one of GET /v1/workspaces. An asset is in exactly one here, whatever else the organization files it under.

descriptionstringnullableRequired

Its description, as the organization wrote it; null when it has none.

external_refstringnullableRequired

Your identifier for this asset, when the organization recorded one — the field that maps an asset of ours to a record of yours. Not unique; null when unset.

languagestringnullableRequired

The language of its content, as a BCP 47 tag (fr, en-GB); null when unknown.

duration_msintegernullableRequired

Its running time in milliseconds, for a video or a sound; null when it has none or it is not known yet.

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When anything about it last changed (RFC 3339) — but for its tags and its custom fields: setting them does not move it.

third_partyThirdPartyVideonullableRequired

For an asset of type third_party, the video it plays from another provider's site; null for every other type.

third_party.providerThirdPartyProviderRequired

Who hosts it.

One of: youtube, vimeo, dailymotion, other

third_party.video_idstringnullableRequired

The provider's own identifier of the video — what the address of its page names, such as the v of a YouTube address — and what to match your own records on. null for other, and when it is not known.

third_party.player_urlstring (uri)nullableRequired

The address of its player, https://, to put in an <iframe>; null when none is known, and the video then plays nowhere.

thumbnail_urlstring (uri)nullableRequired

The address of its picture — the one the organization chose to show it with, else the one Videas picked for it — as a JPEG at its own size, at most 3840 pixels a side; null while it has none.

Stable and anonymous: it needs no key, can be put as it is in a web page's <img>, and goes on answering the asset's picture when another one is chosen, so store the address rather than the bytes. Its answers may be held for a few minutes and carry an ETag.

The same address gives other sizes and formats with its last segment changed: thumbnail.webp or thumbnail.png for the picture at its own size, and {fit}-{width}x{height}.{ext} for one fitted to a box — fit cover (filling the box, cropped to it) or contain (inside it, never cropped), ext jpg, webp or png — such as cover-320x180.jpg or contain-1280x720.webp. A box it does not keep is redirected (308) to the smallest one it keeps that covers it. A picture is never enlarged.

It answers 404 once the asset is deleted or hidden, or no longer has a picture.

excerptstringnullableRequired

A short summary of it, as the organization wrote it — what a listing shows under its name where the description would not fit; null when it has none.

copyrightstringnullableRequired

The notice a reuser of it has to carry — who holds its rights, under what terms — as the organization wrote it; null when it has none.

seo_titlestringnullableRequired

The title a web page publishing it gives itself — in a browser's tab and a search engine's results — where the organization wrote one; null when it has none, and such a page is then titled with its name.

seo_descriptionstringnullableRequired

The description a web page publishing it gives search engines and link previews, where the organization wrote one; null when it has none, and such a page then describes it with its excerpt, else its description.

tagsarray<TagSummary>Required

The tags the organization files it under, ordered by name; empty when it has none. A tag a machine suggested and nobody confirmed is not one of them.

tags[].idstring (uuid)Required

The tag's identifier — the same on every asset that carries it, and kept when the tag is renamed.

tags[].namestringRequired

The word itself, as the organization wrote it.

custom_fieldsarray<CustomFieldValueEntry>Required

Its values of the organization's custom fields — of those that apply to it, by its workspace and its type (GET /v1/custom-fields says where each applies) — in the order a form lays them out; empty when it has none. A field it holds no value of is not in the list. A field of type record, json or file is not read here yet.

custom_fields[].field_idstring (uuid)Required

The field — the id of one of GET /v1/custom-fields.

custom_fields[].slugstringRequired

The field's handle, as that listing answers it.

custom_fields[].labelstringRequired

The field's label, as that listing answers it.

custom_fields[].typeCustomFieldTypeRequired

The field's type, which decides the shape of value.

One of: text, long_text, number, date, boolean, choice, link, record, json, file

custom_fields[].valueCustomFieldValueRequired

The value, in the shape its type gives it.

CategoryCount

How many categories the listing would answer.

FieldTypeRequiredDescription
countintegerRequired

Counted when asked: a listing begun afterwards may meet categories created or deleted since.

CategorySummary

One category of one of the organization's channels: a node of the tree the channel files its videos in.

FieldTypeRequiredDescription
idstring (uuid)Required

The category's identifier.

channel_idstring (uuid)Required

The channel it belongs to, a GET /v1/channels id.

parent_idstring (uuid)nullableRequired

The category it sits under, of the same channel; null at the root of the channel's tree. It names a category this listing answers too.

namestringRequired

Its name, as the channel's audience reads it.

slugstringRequired

The handle its address is built on — lowercase letters and digits joined by hyphens, unique within its channel.

positionintegerRequired

Its place among the categories sharing its parent, lowest first. Not unique: siblings at one position are shown in the order of their names.

is_activebooleanRequired

Whether the channel's audience sees it. A category switched off is hidden from the channel with everything below it; it keeps what is filed in it, and shows it again once it is switched back on.

urlstringnullableRequired

The address of its page on the channel: the channel's url followed by /categories/{slug}/. null when the channel's url is. The page answers 404 while the category, or one above it, is switched off.

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When anything about it last changed (RFC 3339) — moving it under another parent included.

ChannelCount

How many channels the listing would answer.

FieldTypeRequiredDescription
countintegerRequired

Counted when asked: a listing begun afterwards may meet channels created or deleted since.

ChannelSummary

One channel of the organization: a public site where it publishes videos for an audience.

FieldTypeRequiredDescription
idstring (uuid)Required

The channel's identifier — what a category's channel_id names.

namestringRequired

Its name, as its audience reads it.

urlstringnullableRequired

The address of its home page: its main domain, followed by a language segment such as /fr when that domain serves several channels, one per language. Every address on the channel starts with it. null while no domain of the channel is switched on. It is where the channel answers once it is online — a channel is listed whether it is online or not, and this read does not say which.

languagestringRequired

The language it is written in, a BCP 47 tag such as fr or en.

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When the channel itself last changed (RFC 3339). A change of its domains alone, which moves its url, does not move it.

ChannelView

One channel of the organization, read by its id: every field a listing answers about it, under the same names. A field a listing cannot afford on every row may be added here.

FieldTypeRequiredDescription
idstring (uuid)Required

The channel's identifier — what a category's channel_id names.

namestringRequired

Its name, as its audience reads it.

urlstringnullableRequired

The address of its home page: its main domain, followed by a language segment such as /fr when that domain serves several channels, one per language. Every address on the channel starts with it. null while no domain of the channel is switched on. It is where the channel answers once it is online — a channel is listed whether it is online or not, and this read does not say which.

languagestringRequired

The language it is written in, a BCP 47 tag such as fr or en.

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When the channel itself last changed (RFC 3339). A change of its domains alone, which moves its url, does not move it.

CollectionCount

How many collections the listing would answer under the same filter.

FieldTypeRequiredDescription
countintegerRequired

Counted when asked: a listing begun afterwards may meet collections created or deleted since.

CollectionItem

One item of a collection: an asset, and where it comes when the collection is played.

FieldTypeRequiredDescription
positionintegerRequired

Where it comes when the collection is played, from 0 for the first: its rank among the items this endpoint lists, as they stood when this page was read. Sort by it to play them. A collection set to play in a random order is answered in the order the organization arranged it in, the same on every read, while its player plays it shuffled, in an order drawn again each day; one whose items Videas selects by rules answers a new order on every read.

assetAssetSummaryRequired

The asset, as GET /v1/assets answers it.

asset.idstring (uuid)Required

The asset's identifier — stable for its whole life, and the one to store.

asset.namestringRequired

Its title, as the organization wrote it. Never empty.

asset.typeAssetTypeRequired

What kind of thing it is.

One of: video, audio, image, document, archive, file, subtitles, third_party, other

asset.statusAssetStatusRequired

Where it is in its processing: only a ready asset can be played.

One of: uploading, processing, awaiting_credit, ready, error

asset.workspace_idstring (uuid)Required

The workspace it is in — the id of one of GET /v1/workspaces. An asset is in exactly one here, whatever else the organization files it under.

asset.descriptionstringnullableRequired

Its description, as the organization wrote it; null when it has none.

asset.external_refstringnullableRequired

Your identifier for this asset, when the organization recorded one — the field that maps an asset of ours to a record of yours. Not unique; null when unset.

asset.languagestringnullableRequired

The language of its content, as a BCP 47 tag (fr, en-GB); null when unknown.

asset.duration_msintegernullableRequired

Its running time in milliseconds, for a video or a sound; null when it has none or it is not known yet.

asset.created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

asset.updated_atstring (date-time)Required

When anything about it last changed (RFC 3339) — but for its tags and its custom fields: setting them does not move it.

asset.third_partyThirdPartyVideonullableRequired

For an asset of type third_party, the video it plays from another provider's site; null for every other type.

asset.thumbnail_urlstring (uri)nullableRequired

The address of its picture — the one the organization chose to show it with, else the one Videas picked for it — as a JPEG at its own size, at most 3840 pixels a side; null while it has none.

Stable and anonymous: it needs no key, can be put as it is in a web page's <img>, and goes on answering the asset's picture when another one is chosen, so store the address rather than the bytes. Its answers may be held for a few minutes and carry an ETag.

The same address gives other sizes and formats with its last segment changed: thumbnail.webp or thumbnail.png for the picture at its own size, and {fit}-{width}x{height}.{ext} for one fitted to a box — fit cover (filling the box, cropped to it) or contain (inside it, never cropped), ext jpg, webp or png — such as cover-320x180.jpg or contain-1280x720.webp. A box it does not keep is redirected (308) to the smallest one it keeps that covers it. A picture is never enlarged.

It answers 404 once the asset is deleted or hidden, or no longer has a picture.

CollectionSummary

One collection of the organization's library: a list of its assets, played one after the other.

FieldTypeRequiredDescription
idstring (uuid)Required

The collection's identifier — stable for its whole life, and the one to store.

namestringRequired

Its title, as the organization wrote it. Never empty.

descriptionstringnullableRequired

Its description, as the organization wrote it — Markdown, as written and not rendered; null when it has none.

workspace_idstring (uuid)Required

The workspace it is in — the id of one of GET /v1/workspaces.

item_countintegerRequired

How many entries it holds, counted whatever each entry's asset is: it may count entries GET /v1/collections/{collection_id}/items leaves out, such as an asset hidden from the library. 0 for a collection whose items Videas selects by rules rather than holds: its items are what that endpoint answers.

duration_msintegerRequired

The running times of those same entries added up, in milliseconds; 0 when none has one.

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When its name, its description or the picture chosen for it last changed (RFC 3339). Its tags and its entries — which assets it holds, and in what order — do not move it: read its items to see theirs.

thumbnail_urlstring (uri)nullableRequired

The address of its picture — the one the organization chose for the collection, else its cover entry's, else that of the first item it plays, the one its items rank 0 (for a collection set to shuffle, the first in its arrangement) — as a JPEG at its own size, at most 3840 pixels a side; null while it has none. A collection whose items Videas selects by rules is shown only by a picture chosen for it.

Stable and anonymous, like an asset's thumbnail_url, and with the same other names — thumbnail.webp, cover-320x180.jpg and the like. It follows the collection: when another picture is chosen, another entry becomes its cover, or another item plays first, the address answers that one, so store the address rather than the bytes. It answers 404 once the collection is deleted or hidden, or no longer has a picture.

CollectionView

One collection of the organization, read by its id: every field a listing answers about it, under the same names, and its tags.

FieldTypeRequiredDescription
idstring (uuid)Required

The collection's identifier — stable for its whole life, and the one to store.

namestringRequired

Its title, as the organization wrote it. Never empty.

descriptionstringnullableRequired

Its description, as the organization wrote it — Markdown, as written and not rendered; null when it has none.

workspace_idstring (uuid)Required

The workspace it is in — the id of one of GET /v1/workspaces.

item_countintegerRequired

How many entries it holds, counted whatever each entry's asset is: it may count entries GET /v1/collections/{collection_id}/items leaves out, such as an asset hidden from the library. 0 for a collection whose items Videas selects by rules rather than holds: its items are what that endpoint answers.

duration_msintegerRequired

The running times of those same entries added up, in milliseconds; 0 when none has one.

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When its name, its description or the picture chosen for it last changed (RFC 3339). Its tags and its entries — which assets it holds, and in what order — do not move it: read its items to see theirs.

thumbnail_urlstring (uri)nullableRequired

The address of its picture — the one the organization chose for the collection, else its cover entry's, else that of the first item it plays, the one its items rank 0 (for a collection set to shuffle, the first in its arrangement) — as a JPEG at its own size, at most 3840 pixels a side; null while it has none. A collection whose items Videas selects by rules is shown only by a picture chosen for it.

Stable and anonymous, like an asset's thumbnail_url, and with the same other names — thumbnail.webp, cover-320x180.jpg and the like. It follows the collection: when another picture is chosen, another entry becomes its cover, or another item plays first, the address answers that one, so store the address rather than the bytes. It answers 404 once the collection is deleted or hidden, or no longer has a picture.

tagsarray<TagSummary>Required

The tags the organization files it under, ordered by name; empty when it has none. A tag a machine suggested and nobody confirmed is not one of them.

tags[].idstring (uuid)Required

The tag's identifier — the same on every asset that carries it, and kept when the tag is renamed.

tags[].namestringRequired

The word itself, as the organization wrote it.

CreateAssetRequest

An asset to create in the library, from a video hosted on YouTube, Vimeo or Dailymotion.

This is the one kind of asset created here today: a file — a video, a sound, a picture, a document — is added with POST /v1/uploads, which receives or fetches its bytes. A field this body does not list is refused.

FieldTypeRequiredDescription
workspace_idstring (uuid)Required

The workspace the new asset lands in, at its root — the id of one of GET /v1/workspaces, private ones included.

third_party_urlstring (uri)Required

The address of the video on YouTube, Vimeo or Dailymotion, as its page or its share button gives it: https://www.youtube.com/watch?v=…, https://youtu.be/…, https://vimeo.com/…, https://www.dailymotion.com/video/…. Its provider is asked about it before the asset is created, so a private, deleted or non-embeddable video is refused. An embed code, an address on any other site and a link to a file are refused with a 400: a file is added with POST /v1/uploads.

copyrightstringnullableOptional

The notice a reuser has to carry — who holds its rights, under what terms. At most 1000 characters.

descriptionstringnullableOptional

The asset's description. Absent, the provider's description where it gives one, else none. At most 50000 characters.

excerptstringnullableOptional

A short summary, shown under the title where the description would not fit. At most 1000 characters.

external_refstringnullableOptional

Your identifier for this asset, returned as its external_ref without the spaces around it. Not unique, never blank, and at most 500 characters. Set it on every request: after a timeout or a 5xx, look it up with GET /v1/assets?external_ref= before sending the request again, since the first one may have created the asset.

languagestringnullableOptional

The language of its content, as a BCP 47 tag: fr, en-GB, zh-Hans-CN.

namestringnullableOptional

The asset's title. Absent, the provider's title. Never blank, and at most 500 characters once the spaces around it are trimmed.

CreatePublicationRequest

An asset to publish on one of the organization's channels. A field this body does not list is refused.

FieldTypeRequiredDescription
channel_idstring (uuid)Required

The channel to publish on, a GET /v1/channels id.

asset_idstring (uuid)Required

The asset to publish, a GET /v1/assets id. It must be ready, and a channel publishes a video, a sound, a picture or a video hosted elsewhere — not a document. An asset is published at most once on a channel.

accessWritablePublicationAccessnullableOptional

Who it is for: public or authenticated. Absent, the channel's own rule decides — authenticated on a channel whose visitors open an account themselves and whose site is otherwise open, public on any other. Created authenticated — sent so, or given so by the channel's rule — it is shown locked: it still shows itself to the visitors it is not for, in the channel's listings when it is listed and at its page, and playing it asks them to sign in.

One of: public, authenticated

category_idsarray<string (uuid)>nullableOptional

The categories to file it in, GET /v1/categories ids of the same channel, switched-off ones included. At most 100; an id sent twice counts once. Absent, it is filed nowhere.

is_listedbooleannullableOptional

Whether the channel shows it in its listings — true unless sent false.

primary_category_idstring (uuid)nullableOptional

Its main category, one of category_ids. Absent, it has none.

published_atstring (date-time)nullableOptional

With status: published, when it goes on the channel (RFC 3339) — a date in the future schedules it. Absent, now. Refused on a draft.

slugstringnullableOptional

The handle its address is built on: lowercase letters and digits in words joined by single hyphens, at most 255 characters, taken as sent. Absent, the asset's own handle where it has one, else its name made into one — followed by -2, -3 and on where the channel already answers at that address.

statusPublicationStatusnullableOptional

draft, the default, or published. A publication is never created archived.

One of: draft, published, archived

CreateUploadRequest

What to add to the library: the workspace it lands in, what it is called, and where its bytes come from.

Send exactly one of size_bytes or source_url. size_bytes means you send the file yourself, to the address the answer gives; source_url means we download it from that link in the background. A request carrying both, or neither, is refused with a 400 naming the two. A field this body does not list is refused too.

FieldTypeRequiredDescription
workspace_idstring (uuid)Required

The workspace the new asset lands in, at its root — the id of one of GET /v1/workspaces, private ones included.

content_typestringnullableOptional

The type you declare for the file you send. Recorded, never trusted: what the file is gets measured once it has arrived. Only with size_bytes.

descriptionstringnullableOptional

The asset's description. Absent, it has none. At most 50000 characters.

external_refstringnullableOptional

Your identifier for this asset, returned as its external_ref without the spaces around it. Not unique, never blank, and at most 500 characters. Set it on every request: after a timeout or a 5xx, look it up with GET /v1/assets?external_ref= before sending the request again, since the first one may have created the asset.

filenamestringnullableOptional

The file's name on your side, extension included — what the asset's kind is first read from. Required with size_bytes; optional with source_url, whose file is then named from what the link answers. Never blank.

languagestringnullableOptional

The language of its content, as a BCP 47 tag: fr, en-GB, zh-Hans-CN.

namestringnullableOptional

The asset's title. Absent, the file's name — its first 500 characters. Never blank, and at most 500 characters once the spaces around it are trimmed.

sha256stringnullableOptional

The SHA-256 digest of the file at source_url, as 64 hexadecimal characters: when given, the file we download must match it — a copy that does not is downloaded once more, and a second mismatch fails the upload checksum_mismatch. Only with source_url — a file you send is answered with the digest of what was stored.

size_bytesintegernullableOptional

You send the file, and this is its exact size in bytes. At most 10737418240 (10 GiB); a larger file is refused with a 413. Exclusive with source_url.

source_urlstring (uri)nullableOptional

We fetch the file from this http or https link, in the background, from the fixed addresses this API's description lists under « Adding a file » — a presigned link to your bucket works, and the upload's status says how far the download got. Exclusive with size_bytes. Refused with a 400 naming the reason: a scheme other than http or https, a user name or a password in the link, localhost, a literal address that is not a public one, a port other than 80 for http and 443 for https, or a YouTube, Vimeo or Dailymotion page, which is a player and not a file — POST /v1/assets creates an asset that plays one. The file is at most 10 GiB, and a larger one fails the upload too_large. The link is kept sealed while it is needed and never answered back whole: source_url on the upload is it without its query.

CustomFieldChoiceCount

How many options the listing would answer.

FieldTypeRequiredDescription
countintegerRequired

Counted when asked: a listing begun afterwards may meet options added or withdrawn since.

CustomFieldChoiceSummary

One option a choice field offers.

FieldTypeRequiredDescription
idstring (uuid)Required

The option's identifier — what a value of the field holds, and what a write sends.

labelstringRequired

What a person reads for it.

CustomFieldCount

How many custom fields the listing would answer.

FieldTypeRequiredDescription
countintegerRequired

Counted when asked: a listing begun afterwards may meet fields created or deleted since.

CustomFieldSummary

One of the organization's own fields: something an asset of its library may carry beside its name and its description.

FieldTypeRequiredDescription
idstring (uuid)Required

The field's identifier — what a write of an asset's values names it by, and the one to store.

labelstringRequired

What a person reads beside its value.

slugstringRequired

A short handle the organization gave it: lowercase letters and digits joined by hyphens. Not unique: two groups of fields may each hold one under the same handle — address a field by its id.

typeCustomFieldTypeRequired

What it holds, which decides the shape of its value.

One of: text, long_text, number, date, boolean, choice, link, record, json, file

multiplebooleanRequired

For a choice field, whether it takes several options rather than one; false for every other type.

requiredbooleanRequired

Whether it may be emptied: a value of a required field can be changed and never cleared. An asset may still have none, until somebody gives it one.

publicbooleanRequired

Whether it is shown to the public wherever an asset carrying it is published — on a channel's page and in the player's details.

workspace_idstring (uuid)nullableRequired

The one workspace whose assets it applies to; null for every workspace of the organization.

asset_typesarray<AssetType>nullableRequired

The types of asset it applies to; null for every type.

One of: video, audio, image, document, archive, file, subtitles, third_party, other

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When anything about it last changed (RFC 3339).

CustomFieldType

What a custom field holds, and so the shape of its value:

  • text — one line, a string;
  • long_text — several lines, a string;
  • number — a number;
  • date — a day, YYYY-MM-DD;
  • boolean — true or false;
  • choice — one of the field's options, by its id, or a list of them on a multiple field;
  • link — an address with an optional label, {"url", "label"};
  • record — an entry of a reference list this product keeps for the organization;
  • json — structured data;
  • file — a file.

The last three are listed and not yet read or written here. The list may grow: read a value you do not know as a field your client neither reads nor writes.

One of: text, long_text, number, date, boolean, choice, link, record, json, file

CustomFieldValue

A value of a custom field, in the shape its type gives it — the same shape read and written:

  • text, long_text — a string;
  • number — a number;
  • date — YYYY-MM-DD; a value written outside this API may also carry a time of day, YYYY-MM-DDTHH:MM:SS with an optional offset;
  • boolean — true or false;
  • choice — an option's id, as GET /v1/custom-fields/{field_id}/choices lists them; on a multiple field, a list of them;
  • link — {"url", "label"}.

CustomFieldValueEntry

One value an asset holds of one of the organization's custom fields.

FieldTypeRequiredDescription
field_idstring (uuid)Required

The field — the id of one of GET /v1/custom-fields.

slugstringRequired

The field's handle, as that listing answers it.

labelstringRequired

The field's label, as that listing answers it.

typeCustomFieldTypeRequired

The field's type, which decides the shape of value.

One of: text, long_text, number, date, boolean, choice, link, record, json, file

valueCustomFieldValueRequired

The value, in the shape its type gives it.

CustomFieldValueUpdate

One field's new value.

FieldTypeRequiredDescription
field_idstring (uuid)Required

The field — the id of one of GET /v1/custom-fields that applies to this asset: one of every workspace or of the asset's own, of every type or of the asset's.

valueCustomFieldValuenullableRequired

The value, in the shape the field's type gives it — the shape custom_fields reads it back in: a string for text and long_text, a number, YYYY-MM-DD for a date, true or false, an option's id for a choice — a list of them on a multiple one —, and {"url", "label"} for a link, whose url is an absolute http or https address and whose label may be left out. Nothing is converted: 42 is not a text and "true" is not a boolean.

Required, and null empties the field — so does an empty string on a text or a long_text field, and an empty list on a multiple one; a required field cannot be emptied. A record, json or file field is not written here yet.

ErrorBody

The body of every error response, whatever the status: a code to branch on, a message for a person to read, and a request_id to quote when you report the failure.

FieldTypeRequiredDescription
codeErrorCodeRequired

One of: validation, unauthorized, not_signed_in, forbidden, no_organization, second_factor_required, not_found, method_not_allowed, conflict, credits_exhausted, budget_exceeded, payload_too_large, unsupported_media_type, rate_limited, not_implemented, service_unavailable, upstream_error, timed_out, internal

messagestringRequired

What went wrong, in English, for a person to read. It may change at any time: branch on code, never on this.

request_idstringOptional

The request's identifier, to quote when you report this failure. Absent, never null, when the server has none to give.

ErrorCode

Why a request failed: a stable code, carried in every error body, that says what to do about it. Branch on this, never on message.

  • validation (400, 422) — the request is malformed or invalid: fix it;
  • unauthorized (401) — no usable credential: authenticate;
  • not_signed_in (401) — the client's own credential was accepted, and the person acting through it is not signed in, or no longer is: sign the person in again, and keep the client's credential. Answered only where a person signs in on top of a client's credential; any other missing or expired credential is unauthorized;
  • forbidden (403) — the credential is valid and may not do this;
  • no_organization (403) — the account belongs to no organization: create or join one, since signing in again does not help;
  • second_factor_required (403) — the session is good and this endpoint asks more of it: prove a second factor on it, enrolling one first where the account has none, since signing in again is not what is asked;
  • not_found (404) — nothing answers to what the request names;
  • method_not_allowed (405) — the address does not take this method;
  • conflict (409) — something changed first: read the current state again rather than sending the same request again;
  • credits_exhausted (402) — the prepaid balance is spent: top it up;
  • budget_exceeded (402) — a spending limit is reached: raise it, or wait for its period to end;
  • payload_too_large (413) — the body is larger than accepted: send less;
  • unsupported_media_type (415) — the body's Content-Type is not one accepted here;
  • rate_limited (429) — too many requests: wait the seconds Retry-After gives;
  • not_implemented (501) — the operation is not available yet;
  • service_unavailable (503) — the service cannot answer right now: retry later;
  • upstream_error (502) — a service called on your behalf failed: retry later;
  • timed_out (504) — the server stopped waiting, and the request may have taken effect in part: check before sending a write again, or send it with the same idempotency key;
  • internal (500) — a failure on the server's side: retry later, and quote the body's request_id when you report it.

A code keeps its meaning. New codes may be added: read one you do not know by the HTTP status it came with.

One of: validation, unauthorized, not_signed_in, forbidden, no_organization, second_factor_required, not_found, method_not_allowed, conflict, credits_exhausted, budget_exceeded, payload_too_large, unsupported_media_type, rate_limited, not_implemented, service_unavailable, upstream_error, timed_out, internal

Page_AssetSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

FieldTypeRequiredDescription
dataarray<AssetSummary>Required

The items of this page, in the list's order.

data[].idstring (uuid)Required

The asset's identifier — stable for its whole life, and the one to store.

data[].namestringRequired

Its title, as the organization wrote it. Never empty.

data[].typeAssetTypeRequired

What kind of thing it is.

One of: video, audio, image, document, archive, file, subtitles, third_party, other

data[].statusAssetStatusRequired

Where it is in its processing: only a ready asset can be played.

One of: uploading, processing, awaiting_credit, ready, error

data[].workspace_idstring (uuid)Required

The workspace it is in — the id of one of GET /v1/workspaces. An asset is in exactly one here, whatever else the organization files it under.

data[].descriptionstringnullableRequired

Its description, as the organization wrote it; null when it has none.

data[].external_refstringnullableRequired

Your identifier for this asset, when the organization recorded one — the field that maps an asset of ours to a record of yours. Not unique; null when unset.

data[].languagestringnullableRequired

The language of its content, as a BCP 47 tag (fr, en-GB); null when unknown.

data[].duration_msintegernullableRequired

Its running time in milliseconds, for a video or a sound; null when it has none or it is not known yet.

data[].created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Required

When anything about it last changed (RFC 3339) — but for its tags and its custom fields: setting them does not move it.

data[].third_partyThirdPartyVideonullableRequired

For an asset of type third_party, the video it plays from another provider's site; null for every other type.

data[].thumbnail_urlstring (uri)nullableRequired

The address of its picture — the one the organization chose to show it with, else the one Videas picked for it — as a JPEG at its own size, at most 3840 pixels a side; null while it has none.

Stable and anonymous: it needs no key, can be put as it is in a web page's <img>, and goes on answering the asset's picture when another one is chosen, so store the address rather than the bytes. Its answers may be held for a few minutes and carry an ETag.

The same address gives other sizes and formats with its last segment changed: thumbnail.webp or thumbnail.png for the picture at its own size, and {fit}-{width}x{height}.{ext} for one fitted to a box — fit cover (filling the box, cropped to it) or contain (inside it, never cropped), ext jpg, webp or png — such as cover-320x180.jpg or contain-1280x720.webp. A box it does not keep is redirected (308) to the smallest one it keeps that covers it. A picture is never enlarged.

It answers 404 once the asset is deleted or hidden, or no longer has a picture.

nextstringnullableRequired

The cursor of the next page, to send back as after; null on the last page.

Page_CategorySummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

FieldTypeRequiredDescription
dataarray<CategorySummary>Required

The items of this page, in the list's order.

data[].idstring (uuid)Required

The category's identifier.

data[].channel_idstring (uuid)Required

The channel it belongs to, a GET /v1/channels id.

data[].parent_idstring (uuid)nullableRequired

The category it sits under, of the same channel; null at the root of the channel's tree. It names a category this listing answers too.

data[].namestringRequired

Its name, as the channel's audience reads it.

data[].slugstringRequired

The handle its address is built on — lowercase letters and digits joined by hyphens, unique within its channel.

data[].positionintegerRequired

Its place among the categories sharing its parent, lowest first. Not unique: siblings at one position are shown in the order of their names.

data[].is_activebooleanRequired

Whether the channel's audience sees it. A category switched off is hidden from the channel with everything below it; it keeps what is filed in it, and shows it again once it is switched back on.

data[].urlstringnullableRequired

The address of its page on the channel: the channel's url followed by /categories/{slug}/. null when the channel's url is. The page answers 404 while the category, or one above it, is switched off.

data[].created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Required

When anything about it last changed (RFC 3339) — moving it under another parent included.

nextstringnullableRequired

The cursor of the next page, to send back as after; null on the last page.

Page_ChannelSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

FieldTypeRequiredDescription
dataarray<ChannelSummary>Required

The items of this page, in the list's order.

data[].idstring (uuid)Required

The channel's identifier — what a category's channel_id names.

data[].namestringRequired

Its name, as its audience reads it.

data[].urlstringnullableRequired

The address of its home page: its main domain, followed by a language segment such as /fr when that domain serves several channels, one per language. Every address on the channel starts with it. null while no domain of the channel is switched on. It is where the channel answers once it is online — a channel is listed whether it is online or not, and this read does not say which.

data[].languagestringRequired

The language it is written in, a BCP 47 tag such as fr or en.

data[].created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Required

When the channel itself last changed (RFC 3339). A change of its domains alone, which moves its url, does not move it.

nextstringnullableRequired

The cursor of the next page, to send back as after; null on the last page.

Page_CollectionItem

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

FieldTypeRequiredDescription
dataarray<CollectionItem>Required

The items of this page, in the list's order.

data[].positionintegerRequired

Where it comes when the collection is played, from 0 for the first: its rank among the items this endpoint lists, as they stood when this page was read. Sort by it to play them. A collection set to play in a random order is answered in the order the organization arranged it in, the same on every read, while its player plays it shuffled, in an order drawn again each day; one whose items Videas selects by rules answers a new order on every read.

data[].assetAssetSummaryRequired

The asset, as GET /v1/assets answers it.

nextstringnullableRequired

The cursor of the next page, to send back as after; null on the last page.

Page_CollectionSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

FieldTypeRequiredDescription
dataarray<CollectionSummary>Required

The items of this page, in the list's order.

data[].idstring (uuid)Required

The collection's identifier — stable for its whole life, and the one to store.

data[].namestringRequired

Its title, as the organization wrote it. Never empty.

data[].descriptionstringnullableRequired

Its description, as the organization wrote it — Markdown, as written and not rendered; null when it has none.

data[].workspace_idstring (uuid)Required

The workspace it is in — the id of one of GET /v1/workspaces.

data[].item_countintegerRequired

How many entries it holds, counted whatever each entry's asset is: it may count entries GET /v1/collections/{collection_id}/items leaves out, such as an asset hidden from the library. 0 for a collection whose items Videas selects by rules rather than holds: its items are what that endpoint answers.

data[].duration_msintegerRequired

The running times of those same entries added up, in milliseconds; 0 when none has one.

data[].created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Required

When its name, its description or the picture chosen for it last changed (RFC 3339). Its tags and its entries — which assets it holds, and in what order — do not move it: read its items to see theirs.

data[].thumbnail_urlstring (uri)nullableRequired

The address of its picture — the one the organization chose for the collection, else its cover entry's, else that of the first item it plays, the one its items rank 0 (for a collection set to shuffle, the first in its arrangement) — as a JPEG at its own size, at most 3840 pixels a side; null while it has none. A collection whose items Videas selects by rules is shown only by a picture chosen for it.

Stable and anonymous, like an asset's thumbnail_url, and with the same other names — thumbnail.webp, cover-320x180.jpg and the like. It follows the collection: when another picture is chosen, another entry becomes its cover, or another item plays first, the address answers that one, so store the address rather than the bytes. It answers 404 once the collection is deleted or hidden, or no longer has a picture.

nextstringnullableRequired

The cursor of the next page, to send back as after; null on the last page.

Page_CustomFieldChoiceSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

FieldTypeRequiredDescription
dataarray<CustomFieldChoiceSummary>Required

The items of this page, in the list's order.

data[].idstring (uuid)Required

The option's identifier — what a value of the field holds, and what a write sends.

data[].labelstringRequired

What a person reads for it.

nextstringnullableRequired

The cursor of the next page, to send back as after; null on the last page.

Page_CustomFieldSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

FieldTypeRequiredDescription
dataarray<CustomFieldSummary>Required

The items of this page, in the list's order.

data[].idstring (uuid)Required

The field's identifier — what a write of an asset's values names it by, and the one to store.

data[].labelstringRequired

What a person reads beside its value.

data[].slugstringRequired

A short handle the organization gave it: lowercase letters and digits joined by hyphens. Not unique: two groups of fields may each hold one under the same handle — address a field by its id.

data[].typeCustomFieldTypeRequired

What it holds, which decides the shape of its value.

One of: text, long_text, number, date, boolean, choice, link, record, json, file

data[].multiplebooleanRequired

For a choice field, whether it takes several options rather than one; false for every other type.

data[].requiredbooleanRequired

Whether it may be emptied: a value of a required field can be changed and never cleared. An asset may still have none, until somebody gives it one.

data[].publicbooleanRequired

Whether it is shown to the public wherever an asset carrying it is published — on a channel's page and in the player's details.

data[].workspace_idstring (uuid)nullableRequired

The one workspace whose assets it applies to; null for every workspace of the organization.

data[].asset_typesarray<AssetType>nullableRequired

The types of asset it applies to; null for every type.

One of: video, audio, image, document, archive, file, subtitles, third_party, other

data[].created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Required

When anything about it last changed (RFC 3339).

nextstringnullableRequired

The cursor of the next page, to send back as after; null on the last page.

Page_PlaybackSession

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

FieldTypeRequiredDescription
dataarray<PlaybackSession>Required

The items of this page, in the list's order.

data[].idstring (uuid)Required

The sitting's identifier. One sitting of a collection is one row per asset it played, each carrying the sitting's id with its own asset_id: a row is an id and an asset_id together.

data[].asset_idstring (uuid)Required

The asset watched. It may be one GET /v1/assets/{asset_id} answers 404 for: a session outlives its asset, whatever became of it — deleted, hidden, moved.

data[].viewer_idstring (uuid)nullableRequired

Who watched: the viewer_id your embed code gave the player, otherwise an identifier the player keeps for one browser on one device. It identifies a person only if you made it so — send one of your own in the embed code; an identifier of yours that is not a uuid can become one, a UUIDv5 of it for example. Nothing checks what a page sends. null when the session was recorded with none.

data[].started_atstring (date-time)Required

When the sitting started (RFC 3339), to the second. Lists are ordered by this instant. It never moves: a reload continues the sitting it reopens.

data[].watch_time_msintegerRequired

How long the asset was played, in milliseconds — seeking counts for nothing. It only ever grows while the sitting goes on.

data[].completion_percentagenumberRequired

How far the sitting got, from 0 to 100, as a percentage of the asset's duration. It only ever grows while the sitting goes on.

data[].asset_duration_msintegerRequired

The asset's duration when the sitting was recorded, in milliseconds — which a new version of the asset does not move. 0 when it had none, as a live stream has none.

data[].watchedarray<WatchedRange>Required

The stretches of the asset that were watched, in order and never overlapping, each at least once — a stretch watched twice is listed once. Their resolution is a hundredth of the asset's duration: each stretch starts and ends on one of a hundred equal steps of it, so it covers a little more than was watched, and none ends past asset_duration_ms. Empty when the sitting recorded none: nothing was watched yet, the asset has no duration, or the player that played it did not report one.

nextstringnullableRequired

The cursor of the next page, to send back as after; null on the last page.

Page_PublicationSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

FieldTypeRequiredDescription
dataarray<PublicationSummary>Required

The items of this page, in the list's order.

data[].idstring (uuid)Required

The publication's identifier — what PATCH /v1/publications/{publication_id} takes.

data[].channel_idstring (uuid)Required

The channel it is published on, a GET /v1/channels id. It never changes.

data[].asset_idstring (uuid)Required

The asset it publishes, a GET /v1/assets id. It never changes, and an asset is published at most once on a channel.

data[].slugstringRequired

The handle its address is built on — lowercase letters and digits in words joined by single hyphens, unique among the channel's publications.

data[].urlstringnullableRequired

The address of its page on the channel: the channel's url followed by /{slug}/. null when the channel's url is. It answers 404 until the publication is published and its published_at has come, and the channel's own door applies to it — see access.

data[].statusPublicationStatusRequired

One of: draft, published, archived

data[].published_atstring (date-time)nullableRequired

When it went, or goes, on the channel (RFC 3339) — null for a draft never published. A published publication whose date is in the future is scheduled: the channel shows it from that instant. A draft or an archived publication keeps the date it last went out with.

data[].is_listedbooleanRequired

Whether the channel shows it in its catalogue, its categories, its search and its sitemap. A publication that is not listed still answers at its url.

data[].accessPublicationAccessRequired

One of: public, authenticated, restricted, paid, on_request

data[].category_idsarray<string (uuid)>Required

The categories of its channel it is filed in, each a GET /v1/categories id — a set, whose order says one thing only: its main category comes first when it has one, and the others follow in the order GET /v1/categories lists them, oldest first. Empty when it is filed nowhere.

data[].primary_category_idstring (uuid)nullableRequired

Its main category, the one its page and its card name — one of category_ids; null when it has none.

data[].created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Required

When its own settings last changed (RFC 3339) — its address, its status, its date, whether it is listed, who it is for. Filing it in other categories does not move it.

nextstringnullableRequired

The cursor of the next page, to send back as after; null on the last page.

Page_WorkspaceSummary

One page of a list: its items, and the cursor of the page after it. Send next back as after to read the following page, until it is null. A page carries no total.

FieldTypeRequiredDescription
dataarray<WorkspaceSummary>Required

The items of this page, in the list's order.

data[].idstring (uuid)Required

The workspace's identifier — what an asset's workspace_id names.

data[].namestringRequired

Its name, as the organization wrote it.

data[].created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

data[].updated_atstring (date-time)Required

When anything about it last changed (RFC 3339).

nextstringnullableRequired

The cursor of the next page, to send back as after; null on the last page.

PlaybackSession

One playback session: one sitting of one viewer on one asset of the organization.

FieldTypeRequiredDescription
idstring (uuid)Required

The sitting's identifier. One sitting of a collection is one row per asset it played, each carrying the sitting's id with its own asset_id: a row is an id and an asset_id together.

asset_idstring (uuid)Required

The asset watched. It may be one GET /v1/assets/{asset_id} answers 404 for: a session outlives its asset, whatever became of it — deleted, hidden, moved.

viewer_idstring (uuid)nullableRequired

Who watched: the viewer_id your embed code gave the player, otherwise an identifier the player keeps for one browser on one device. It identifies a person only if you made it so — send one of your own in the embed code; an identifier of yours that is not a uuid can become one, a UUIDv5 of it for example. Nothing checks what a page sends. null when the session was recorded with none.

started_atstring (date-time)Required

When the sitting started (RFC 3339), to the second. Lists are ordered by this instant. It never moves: a reload continues the sitting it reopens.

watch_time_msintegerRequired

How long the asset was played, in milliseconds — seeking counts for nothing. It only ever grows while the sitting goes on.

completion_percentagenumberRequired

How far the sitting got, from 0 to 100, as a percentage of the asset's duration. It only ever grows while the sitting goes on.

asset_duration_msintegerRequired

The asset's duration when the sitting was recorded, in milliseconds — which a new version of the asset does not move. 0 when it had none, as a live stream has none.

watchedarray<WatchedRange>Required

The stretches of the asset that were watched, in order and never overlapping, each at least once — a stretch watched twice is listed once. Their resolution is a hundredth of the asset's duration: each stretch starts and ends on one of a hundred equal steps of it, so it covers a little more than was watched, and none ends past asset_duration_ms. Empty when the sitting recorded none: nothing was watched yet, the asset has no duration, or the player that played it did not report one.

watched[].start_msintegerRequired

Where it starts, in milliseconds from the asset's start.

watched[].end_msintegerRequired

Where it ends, in milliseconds from the asset's start — after start_ms, and at most the session's asset_duration_ms.

PlaybackSessionCount

How many playback sessions the listing would answer under the same filter.

FieldTypeRequiredDescription
countintegerRequired

Counted when asked: a session played since, or still playing, may make a listing begun afterwards answer more.

PublicationAccess

Who the publication is for — its own setting.

It is not what a given visitor gets, which also depends on the channel's door: a public publication on a channel that asks every visitor to sign in is still behind that sign-in. public — anybody the channel lets in; authenticated — anybody who signed in to the channel, or gave its password; restricted — only the members granted it; paid — the members who bought it, or hold a subscription covering it; on_request — the members who asked for it and were granted it. A request sets the first two (WritablePublicationAccess); the other three are set from Videas, with the right or the offer each stands for. The list may grow: read a value you do not know as restricted.

One of: public, authenticated, restricted, paid, on_request

PublicationCount

How many publications the listing would answer under the same filters.

FieldTypeRequiredDescription
countintegerRequired

Counted when asked: a listing begun afterwards may meet publications created or changed since.

PublicationStatus

Where a publication is in its life.

draft — not on the channel; published — on the channel from its published_at, which may be in the future: a publication scheduled for later is published with a date to come, and the channel shows it from that instant; archived — retired from the channel and kept, with its date. The list may grow: read a value you do not know as a publication the channel does not show.

One of: draft, published, archived

PublicationSummary

One asset published on one of the organization's channels.

FieldTypeRequiredDescription
idstring (uuid)Required

The publication's identifier — what PATCH /v1/publications/{publication_id} takes.

channel_idstring (uuid)Required

The channel it is published on, a GET /v1/channels id. It never changes.

asset_idstring (uuid)Required

The asset it publishes, a GET /v1/assets id. It never changes, and an asset is published at most once on a channel.

slugstringRequired

The handle its address is built on — lowercase letters and digits in words joined by single hyphens, unique among the channel's publications.

urlstringnullableRequired

The address of its page on the channel: the channel's url followed by /{slug}/. null when the channel's url is. It answers 404 until the publication is published and its published_at has come, and the channel's own door applies to it — see access.

statusPublicationStatusRequired

One of: draft, published, archived

published_atstring (date-time)nullableRequired

When it went, or goes, on the channel (RFC 3339) — null for a draft never published. A published publication whose date is in the future is scheduled: the channel shows it from that instant. A draft or an archived publication keeps the date it last went out with.

is_listedbooleanRequired

Whether the channel shows it in its catalogue, its categories, its search and its sitemap. A publication that is not listed still answers at its url.

accessPublicationAccessRequired

One of: public, authenticated, restricted, paid, on_request

category_idsarray<string (uuid)>Required

The categories of its channel it is filed in, each a GET /v1/categories id — a set, whose order says one thing only: its main category comes first when it has one, and the others follow in the order GET /v1/categories lists them, oldest first. Empty when it is filed nowhere.

primary_category_idstring (uuid)nullableRequired

Its main category, the one its page and its card name — one of category_ids; null when it has none.

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When its own settings last changed (RFC 3339) — its address, its status, its date, whether it is listed, who it is for. Filing it in other categories does not move it.

PublicationView

One publication, read by its id: every field a listing answers about it, under the same names. A field a listing cannot afford on every row may be added here.

FieldTypeRequiredDescription
idstring (uuid)Required

The publication's identifier — what PATCH /v1/publications/{publication_id} takes.

channel_idstring (uuid)Required

The channel it is published on, a GET /v1/channels id. It never changes.

asset_idstring (uuid)Required

The asset it publishes, a GET /v1/assets id. It never changes, and an asset is published at most once on a channel.

slugstringRequired

The handle its address is built on — lowercase letters and digits in words joined by single hyphens, unique among the channel's publications.

urlstringnullableRequired

The address of its page on the channel: the channel's url followed by /{slug}/. null when the channel's url is. It answers 404 until the publication is published and its published_at has come, and the channel's own door applies to it — see access.

statusPublicationStatusRequired

One of: draft, published, archived

published_atstring (date-time)nullableRequired

When it went, or goes, on the channel (RFC 3339) — null for a draft never published. A published publication whose date is in the future is scheduled: the channel shows it from that instant. A draft or an archived publication keeps the date it last went out with.

is_listedbooleanRequired

Whether the channel shows it in its catalogue, its categories, its search and its sitemap. A publication that is not listed still answers at its url.

accessPublicationAccessRequired

One of: public, authenticated, restricted, paid, on_request

category_idsarray<string (uuid)>Required

The categories of its channel it is filed in, each a GET /v1/categories id — a set, whose order says one thing only: its main category comes first when it has one, and the others follow in the order GET /v1/categories lists them, oldest first. Empty when it is filed nowhere.

primary_category_idstring (uuid)nullableRequired

Its main category, the one its page and its card name — one of category_ids; null when it has none.

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When its own settings last changed (RFC 3339) — its address, its status, its date, whether it is listed, who it is for. Filing it in other categories does not move it.

SetAssetTagsRequest

The words to file an asset under, which replace the ones it is filed under now.

A field this body does not list is refused.

FieldTypeRequiredDescription
tagsarray<string>Required

The asset's tags, by name: at most 100 words, each at most 100 characters once the spaces around it are trimmed, never blank, and holding at least one Latin letter or digit. Case and accents do not count, and any run of spaces or punctuation counts as one separator — so Carbon fibre, carbon-fibre and CARBON FIBRE are one tag, and carbonfibre another. Two words that are one tag are filed once. An empty list takes off every tag but those this product attaches itself, and a word naming one of those is taken only on an asset that already carries it.

TagSummary

A tag the organization files assets under.

FieldTypeRequiredDescription
idstring (uuid)Required

The tag's identifier — the same on every asset that carries it, and kept when the tag is renamed.

namestringRequired

The word itself, as the organization wrote it.

ThirdPartyProvider

Who hosts a third-party video: youtube, vimeo or dailymotion — or other, a player from another site, which has no video_id.

The list may grow: read a value you do not know as other.

One of: youtube, vimeo, dailymotion, other

ThirdPartyVideo

A video another provider hosts, which an asset of type third_party plays from there.

FieldTypeRequiredDescription
providerThirdPartyProviderRequired

Who hosts it.

One of: youtube, vimeo, dailymotion, other

video_idstringnullableRequired

The provider's own identifier of the video — what the address of its page names, such as the v of a YouTube address — and what to match your own records on. null for other, and when it is not known.

player_urlstring (uri)nullableRequired

The address of its player, https://, to put in an <iframe>; null when none is known, and the video then plays nowhere.

UpdateAssetCustomFieldsRequest

Values to write in an asset's custom fields: the fields you name, and no other.

A field left out keeps its value. A field this body does not list is refused.

FieldTypeRequiredDescription
valuesarray<CustomFieldValueUpdate>Required

The values, one per field: at most 200, and a field named once.

values[].field_idstring (uuid)Required

The field — the id of one of GET /v1/custom-fields that applies to this asset: one of every workspace or of the asset's own, of every type or of the asset's.

values[].valueCustomFieldValuenullableRequired

The value, in the shape the field's type gives it — the shape custom_fields reads it back in: a string for text and long_text, a number, YYYY-MM-DD for a date, true or false, an option's id for a choice — a list of them on a multiple one —, and {"url", "label"} for a link, whose url is an absolute http or https address and whose label may be left out. Nothing is converted: 42 is not a text and "true" is not a boolean.

Required, and null empties the field — so does an empty string on a text or a long_text field, and an empty list on a multiple one; a required field cannot be emptied. A record, json or file field is not written here yet.

UpdateAssetRequest

What to change about an asset: the fields you send, and no other.

A field left out is left as it is, and null empties a field that may be empty — every field but name. A field this body does not list is refused, among them the asset's type, its handle, whether it is listed, its expiry, its licence and its picture.

FieldTypeRequiredDescription
copyrightstringnullableOptional

The notice a reuser has to carry — who holds its rights, under what terms. At most 1000 characters; null or an empty string empties it.

descriptionstringnullableOptional

Its description. At most 50000 characters; null or an empty string empties it.

excerptstringnullableOptional

A short summary, shown under the title where the description would not fit. At most 1000 characters; null or an empty string empties it.

external_refstringnullableOptional

Your identifier for this asset, kept without the spaces around it. Not unique, never blank, and at most 500 characters; null empties it.

languagestringnullableOptional

The language of its content, as a BCP 47 tag: fr, en-GB, zh-Hans-CN. null empties it: the language is then unknown.

namestringOptional

The asset's title. Never blank, at most 500 characters once the spaces around it are trimmed, and never null: an asset always has one.

seo_descriptionstringnullableOptional

The description a web page publishing it gives search engines and link previews. Kept without the spaces around it, at most 1000 characters, and never blank; null empties it.

seo_titlestringnullableOptional

The title a web page publishing it gives itself, in place of its name. Kept without the spaces around it, at most 255 characters, and never blank; null empties it.

UpdatePublicationRequest

What to change about a publication: the fields you send, and no other. Its channel and its asset never change, and a field this body does not list is refused.

FieldTypeRequiredDescription
accessWritablePublicationAccessOptional

Who it is for: public or authenticated, the two levels a request moves a publication between. Only the level moves: whether it shows itself, locked, to the visitors it is not for stays as it was — a publication created authenticated through this API does, and one created public and made authenticated later does not: those visitors do not see it at all. A publication that is restricted, paid or on_request is not moved by a request: a 409. Never null.

One of: public, authenticated

category_idsarray<string (uuid)>Optional

The categories it is filed in, as a whole: the list replaces the one it has, and the order it is sent in says nothing. A category it stays in keeps its place and its featuring there, one it enters puts it last, and one left out no longer holds it. [] files it nowhere; never null. At most 100, all of its own channel's; an id sent twice counts once.

is_listedbooleanOptional

Whether the channel shows it in its listings. Never null.

primary_category_idstring (uuid)nullableOptional

Its main category — one of the categories it is filed in once this change is made — or null for none. Absent, the main category stays where it is while the publication is still filed there, and there is none otherwise.

published_atstring (date-time)Optional

When it goes on the channel (RFC 3339), for a publication that is published or is made so by status: a date in the future schedules it, and sent alone it moves the date of one already published. Refused on a draft or an archived publication; never null.

slugstringOptional

A new handle for its address, on the terms of the creation. Its old address goes on answering, sending visitors to the new one. Never null.

statusPublicationStatusOptional

draft or archived takes it off the channel and keeps its published_at; published puts it on — at the published_at sent, else now: one taken off and put back on comes back as new rather than under the date it first went out on. Never null.

One of: draft, published, archived

Upload

One upload into the organization's library, opened with an API key.

For a file you send (source: client), send it to upload_url, carrying the upload_token the opener answered in X-Upload-Token: whole with one PUT when it is at most max_put_bytes, or with tus 1.0 core. The address is opaque — use it as given. For a link (source: link) there is nothing to send: we download the file in the background, source_url says from where — without its query — and failure says why, if it fails. The asset exists from the start, uploading; once the upload is completed it goes on to processing and ready, which GET /v1/assets/{asset_id} reads.

The fields that describe the transfer — upload_url, max_put_bytes, expires_at and received_bytes — are null once its record is deleted, ninety days after the upload ended; size_bytes then answers the stored file's size for a completed upload.

FieldTypeRequiredDescription
idstring (uuid)Required

The upload's identifier: what GET and DELETE /v1/uploads/{upload_id} take.

asset_idstring (uuid)Required

The asset the upload creates, which exists from the moment the upload opens — the id GET /v1/assets/{asset_id} takes.

workspace_idstring (uuid)nullableRequired

The workspace the asset is in — the id of one of GET /v1/workspaces; null while the asset is on no workspace of the organization, once it has been deleted.

sourceUploadSourceRequired

Where the bytes come from.

One of: client, link

statusUploadStatusRequired

Where the upload is.

One of: pending, receiving, completed, cancelled, expired, failed, refused

size_bytesintegernullableRequired

The file's size in bytes, as the opener declared it — for a link, as the remote declared it, null until it has; null once the transfer's record is deleted, for an upload that did not complete.

received_bytesintegernullableRequired

How many bytes have been received — 0 for a link whose download has not started; null once the transfer's record is deleted.

upload_urlstring (uri)nullableRequired

Where to send the file, with X-Upload-Token: whole with one PUT, or with tus 1.0 core. An absolute URL, to be used as given. null for a link, and once the transfer's record is deleted.

max_put_bytesintegernullableRequired

The largest file one PUT to upload_url carries, in bytes; a larger one goes with tus, in chunks of at most this size. null for a link, and once the transfer's record is deleted.

expires_atstring (date-time)nullableRequired

When a file you send that has not completed by then is given up on (RFC 3339): its asset ends error. A request still sending bytes at that moment pushes it out for as long as it runs. null for a link, and once the upload has ended.

source_urlstring (uri)nullableRequired

For a link, where the file is fetched from: the link without its query, its fragment and any user name — so no signature it carried. null for a file you send.

failureUploadFailurenullableRequired

Why the download of a link failed, when status is failed; null otherwise.

failure.codeUploadFailureCodeRequired

One of: address_refused, unreachable, not_found, refused, not_a_file, too_large, interrupted, checksum_mismatch

failure.messagestringRequired

What happened, in English, for a person to read. Never the link, and never what the remote answered in its body. Not stable: branch on code.

created_atstring (date-time)Required

When the upload was opened (RFC 3339).

updated_atstring (date-time)Required

When anything about the upload last changed (RFC 3339).

finished_atstring (date-time)nullableRequired

When the upload ended — completed, cancelled, expired, failed or refused (RFC 3339); null while it is open.

UploadCreated

The upload just opened, and the token to send its file with.

FieldTypeRequiredDescription
idstring (uuid)Required

The upload's identifier: what GET and DELETE /v1/uploads/{upload_id} take.

asset_idstring (uuid)Required

The asset the upload creates, which exists from the moment the upload opens — the id GET /v1/assets/{asset_id} takes.

workspace_idstring (uuid)nullableRequired

The workspace the asset is in — the id of one of GET /v1/workspaces; null while the asset is on no workspace of the organization, once it has been deleted.

sourceUploadSourceRequired

Where the bytes come from.

One of: client, link

statusUploadStatusRequired

Where the upload is.

One of: pending, receiving, completed, cancelled, expired, failed, refused

size_bytesintegernullableRequired

The file's size in bytes, as the opener declared it — for a link, as the remote declared it, null until it has; null once the transfer's record is deleted, for an upload that did not complete.

received_bytesintegernullableRequired

How many bytes have been received — 0 for a link whose download has not started; null once the transfer's record is deleted.

upload_urlstring (uri)nullableRequired

Where to send the file, with X-Upload-Token: whole with one PUT, or with tus 1.0 core. An absolute URL, to be used as given. null for a link, and once the transfer's record is deleted.

max_put_bytesintegernullableRequired

The largest file one PUT to upload_url carries, in bytes; a larger one goes with tus, in chunks of at most this size. null for a link, and once the transfer's record is deleted.

expires_atstring (date-time)nullableRequired

When a file you send that has not completed by then is given up on (RFC 3339): its asset ends error. A request still sending bytes at that moment pushes it out for as long as it runs. null for a link, and once the upload has ended.

source_urlstring (uri)nullableRequired

For a link, where the file is fetched from: the link without its query, its fragment and any user name — so no signature it carried. null for a file you send.

failureUploadFailurenullableRequired

Why the download of a link failed, when status is failed; null otherwise.

failure.codeUploadFailureCodeRequired

One of: address_refused, unreachable, not_found, refused, not_a_file, too_large, interrupted, checksum_mismatch

failure.messagestringRequired

What happened, in English, for a person to read. Never the link, and never what the remote answered in its body. Not stable: branch on code.

created_atstring (date-time)Required

When the upload was opened (RFC 3339).

updated_atstring (date-time)Required

When anything about the upload last changed (RFC 3339).

finished_atstring (date-time)nullableRequired

When the upload ended — completed, cancelled, expired, failed or refused (RFC 3339); null while it is open.

upload_tokenstringnullableRequired

The credential upload_url takes, in X-Upload-Token, answered here and never again: no read of the upload returns it. It admits its holder to this one upload until the upload ends, and to nothing else, so it may be handed to the page that sends the file — never the API key. null for a link, which nobody sends anything to.

UploadFailure

Why the download of a link failed.

FieldTypeRequiredDescription
codeUploadFailureCodeRequired

One of: address_refused, unreachable, not_found, refused, not_a_file, too_large, interrupted, checksum_mismatch

messagestringRequired

What happened, in English, for a person to read. Never the link, and never what the remote answered in its body. Not stable: branch on code.

UploadFailureCode

Why the download of a link failed, for a program to branch on. Each is final: once the cause is fixed, a new upload is how to try again.

  • address_refused — we do not connect to where the link leads: an address of ours, or one that is not public. Over https it is also the answer when the connection to the server cannot be opened, twice in a row — a name that does not resolve, a server that refuses us — so check the link's host, and that it accepts connections from the addresses we fetch from;
  • unreachable — no answer, after trying again for a while: over plain http, a name that does not resolve or a connection that fails; a TLS failure or a timeout; or a server that kept failing (5xx) or pushing back (429);
  • not_found — 404 or 410: the link is wrong, or the file is gone;
  • refused — any other 4xx, typically a presigned link that expired: sign it for longer than the download may take, retries included; or a redirect we do not follow: a sixth one, or one from https to plain http;
  • not_a_file — a web page where a file was expected: link to the file itself;
  • too_large — larger than a file may be, 10 GiB;
  • interrupted — the download broke off more times than it is retried;
  • checksum_mismatch — the file was downloaded twice, and twice it was not the sha256 you gave.

The list may grow, like source's: read a code you do not know as a failure your code does not handle yet.

One of: address_refused, unreachable, not_found, refused, not_a_file, too_large, interrupted, checksum_mismatch

UploadSource

Where an upload's bytes come from: client — the caller sends the file to upload_url; link — we download it from source_url.

The list may grow: a client should read a value it does not know as a source this client does not handle, not as an error.

One of: client, link

UploadStatus

Where an upload is. Both sources reach every value but failed, which is a link's alone:

  • pending — open, nothing received yet; for a link, the download has not started;
  • receiving — bytes are arriving; for a link, the download is running;
  • completed — the file is stored, and the asset goes on to processing;
  • cancelled — given up on with DELETE /v1/uploads/{upload_id}; for a file you send, also with the tus termination on upload_url, and for a link, when its asset is deleted before the file has arrived;
  • expired — a file you send that did not complete before expires_at; for a link, a download nobody was fetching any more;
  • failed — a link's only: the download failed, and failure says why;
  • refused — the file arrived and the organization's credit could not pay its first month of storage, so nothing was kept: top up the credit, then upload the file again.

The last five are final, and the asset of an upload that ended any other way than completed ends error. The list may grow, like source's.

One of: pending, receiving, completed, cancelled, expired, failed, refused

WatchedRange

One stretch of an asset a sitting watched.

FieldTypeRequiredDescription
start_msintegerRequired

Where it starts, in milliseconds from the asset's start.

end_msintegerRequired

Where it ends, in milliseconds from the asset's start — after start_ms, and at most the session's asset_duration_ms.

WorkspaceCount

How many workspaces the listing would answer.

FieldTypeRequiredDescription
countintegerRequired

Counted when asked: a listing begun afterwards may meet workspaces created or deleted since.

WorkspaceSummary

One workspace of the organization.

FieldTypeRequiredDescription
idstring (uuid)Required

The workspace's identifier — what an asset's workspace_id names.

namestringRequired

Its name, as the organization wrote it.

created_atstring (date-time)Required

When it was created (RFC 3339). Lists are ordered by this instant, then by id.

updated_atstring (date-time)Required

When anything about it last changed (RFC 3339).

WritablePublicationAccess

Who a publication is for, as a request sets it: public — anybody the channel lets in; authenticated — anybody who signed in to the channel, or gave its password.

It is the publication's own level, not what a visitor gets: on a channel that asks every visitor to sign in, a public publication is still behind that sign-in. restricted, paid and on_request are read and not set by a request — each stands for a right or an offer set from Videas, and is accepted here once those can be set through this API. Sending one is a 400.

One of: public, authenticated