Skip to main content

File the library in folders

Make a folder in a workspace with POST /v1/folders, put what you add straight into it with parent_id on POST /v1/uploads and POST /v1/assets, and move an asset to another folder of its workspace with PATCH /v1/assets/{asset_id}.

A workspace files its assets in folders — the tree Read the library walks. Three requests write it:

Request What it does Permission
POST /v1/folders Makes a folder assets.library.upload
parent_id on POST /v1/uploads and POST /v1/assets Files the asset they create in a folder the request’s own: assets.library.upload, with assets.third_party_video.import for a video hosted elsewhere
parent_id on PATCH /v1/assets/{asset_id} Moves an asset to another folder of its workspace, or to its root assets.library.edit

A folder is in one workspace, and an asset is filed only in a folder of its own. Every parent_id you send must be the id of a folder that GET /v1/workspaces/{workspace_id}/folders lists for the workspace concerned — the one you name when you create, the asset’s own when you move it. Anything else — a folder of another workspace, one in the trash, one hidden in Videas, an asset, an id that names nothing — is a 404, and nothing is created or moved.

GET /v1/folders/{folder_id} reads one folder, in the shape of a row of that listing, with Read the library through the API (assets.library.read).

Make a folder

curl -X POST https://api.videas.com/v1/folders \
  -H "Authorization: Bearer $VIDEAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "0192a6b1-7c3e-7d40-9a51-3f0e2b6c8d10",
    "name": "Onboarding",
    "description": "The courses every new hire follows."
  }'
Field
workspace_id Required. The workspace whose tree it joins — the id of one of GET /v1/workspaces, private ones included.
name Required. Its name: never blank, and at most 500 characters once the spaces around it are trimmed.
description Optional. What it is for, at most 50,000 characters. Absent, null or blank, it says nothing.
parent_id Optional. The folder it sits directly under. Absent or null, it sits at the workspace’s root.

The body takes no other field. The answer is a 201, with Location: /v1/folders/{folder_id} and the folder as GET /v1/folders/{folder_id} reads it:

{
  "id": "0192a6b1-8d4f-7e51-ab62-4a1f3c7d9e21",
  "name": "Onboarding",
  "description": "The courses every new hire follows.",
  "workspace_id": "0192a6b1-7c3e-7d40-9a51-3f0e2b6c8d10",
  "parent_id": null,
  "created_at": "2026-09-02T10:15:00Z",
  "updated_at": "2026-09-02T10:15:00Z"
}

A tree is made from the top down, one request per folder, each naming the one above it as its parent_id:

curl -X POST https://api.videas.com/v1/folders \
  -H "Authorization: Bearer $VIDEAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "0192a6b1-7c3e-7d40-9a51-3f0e2b6c8d10",
    "name": "Week 1",
    "parent_id": "0192a6b1-8d4f-7e51-ab62-4a1f3c7d9e21"
  }'

The API makes folders and does nothing else to them: a folder is renamed, moved or deleted in Videas.

Sent twice, it makes two

POST /v1/folders is not idempotent, and two folders may have the same name, side by side. A folder carries no external_ref either. So look a folder up before making it — after a timeout or a 5xx, and on every run of a sync that files what it adds: in GET /v1/workspaces/{workspace_id}/folders, by its name and its parent_id. With a key that reads the library and adds to it:

import os

import requests

API = "https://api.videas.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['VIDEAS_API_KEY']}"}

def folder(workspace_id, name, parent_id=None):
    """The folder of this name directly under parent_id, made when there is none."""
    params = {}
    while True:
        response = requests.get(
            f"{API}/workspaces/{workspace_id}/folders", headers=HEADERS, params=params
        )
        response.raise_for_status()
        page = response.json()
        for row in page["data"]:
            if row["name"] == name and row["parent_id"] == parent_id:
                return row
        if page["next"] is None:
            break
        params["after"] = page["next"]
    response = requests.post(
        f"{API}/folders",
        headers=HEADERS,
        json={"workspace_id": workspace_id, "name": name, "parent_id": parent_id},
    )
    response.raise_for_status()
    return response.json()

onboarding = folder("0192a6b1-7c3e-7d40-9a51-3f0e2b6c8d10", "Onboarding")
week_1 = folder("0192a6b1-7c3e-7d40-9a51-3f0e2b6c8d10", "Week 1", onboarding["id"])

File what you add

POST /v1/uploads — a file you send or one fetched from a link — and POST /v1/assets — a video hosted elsewhere — take parent_id: the asset they create lands directly in that folder of workspace_id. Without it, or with null, it lands at the workspace’s root.

curl -X POST https://api.videas.com/v1/uploads \
  -H "Authorization: Bearer $VIDEAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "0192a6b1-7c3e-7d40-9a51-3f0e2b6c8d10",
    "parent_id": "0192a6b1-8d4f-7e51-ab62-4a1f3c7d9e21",
    "filename": "lecture.mp4",
    "size_bytes": 734003200,
    "name": "Opening lecture",
    "external_ref": "course-42/lecture-1"
  }'

The folder is checked before anything else is done: a parent_id refused answers 404 before an asset is created, an upload opened, a link fetched or a provider asked.

An upload’s own answer says which workspace its asset is in, not which folder: GET /v1/assets/{asset_id} reads the asset’s parent_id.

Move an asset

PATCH /v1/assets/{asset_id} takes parent_id beside the asset’s words:

curl -X PATCH https://api.videas.com/v1/assets/0192a6e4-3b5c-7d6e-8f90-a1b2c3d4e5f6 \
  -H "Authorization: Bearer $VIDEAS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"parent_id": "0192a6b1-8d4f-7e51-ab62-4a1f3c7d9e21"}'
  • Absent, the asset stays where it is.
  • A folder’s id moves it directly into that folder, one its workspace’s listing answers.
  • null moves it to its workspace’s root.
  • The parent_id it already reads with moves nothing, null included: sending back what GET /v1/assets/{asset_id} answered is always safe.
  • It never changes workspace: PATCH takes no workspace_id, and a body that names one is refused with a 422. An asset moves to another workspace in Videas.

The answer is the whole asset, as for every edit, and a body that also changes the asset’s words writes both or neither.

Two things set a move apart from a change of the asset’s words:

  • it does not move updated_at, which dates the asset and not its place: to know whether an asset moved since your last sync, compare its parent_id;
  • it is not recorded in the asset’s history in Videas.

Like every change, it is refused with a 403 on an asset validated in the organization’s shared pool.

In Videas, a folder can be shared by a link, and the link opens the folder with everything in it and in its subfolders at the moment somebody opens it — not as it stood when the link was made (Share several files with a single link). So:

  • an asset you file in such a folder — on its upload, its import or a move — becomes visible to whoever holds the link;
  • an asset you move out of it no longer is.

The API does not say which folders are shared, and asks for no confirmation: a key that may add to the library or edit it files in any folder of the workspace. Agree with the people who look after the library on the folders an integration files in.

Folders the API does not show

A folder hidden in Videas is in no listing, and the API answers as if it did not exist: GET /v1/folders/{folder_id} is a 404, and so is a parent_id naming it. What it holds reads parent_id: null, as at the workspace’s root, and ?parent=root lists it. Sending that null back on a PATCH leaves the asset where it is in Videas; naming a folder the listing answers moves it there.

Errors

Every error has the same body — {"code": "…", "message": "…", "request_id": "…"}. Branch on code; message is written for a human and may change.

Status code On POST /v1/folders
400 validation A blank name, a name longer than 500 characters or a description longer than 50,000; a query parameter. The message names the field.
401 unauthorized No key, or a key that is unknown, expired or revoked.
403 forbidden The key does not carry assets.library.upload.
404 not_found No workspace of your organization has this workspace_id, or no folder its listing answers has this parent_id.
415 unsupported_media_type The body is not sent as application/json.
422 validation workspace_id or name missing, a field of the wrong type, or a field the body does not list.
429 rate_limited Too many requests: wait the number of seconds Retry-After gives.

On POST /v1/uploads, POST /v1/assets and PATCH /v1/assets/{asset_id}, a parent_id that no folder of the workspace’s listing has is a 404 too, beside the refusals each guide lists.

Next steps