API reference
Media folders
Base URL https://api.beplan.io/v1. Authentication, envelopes, pagination, idempotency and rate limits:
conventions. OpenAPI document: openapi.json.
All 5 Media folders operations
- GET List folders
- POST Create a folder
- GET Get a folder
- PATCH Rename, recolor or move a folder
- DELETE Delete an empty folder
List folders
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/folders media.folders.list - Scope
- media:read
- Role permission
- Any of: Upload media (
media:create), Edit media (media:update), Delete media (media:delete), Review media (media:review) - Effect
- Changes nothing.
- Stability
- Beta. May still change before it is marked stable. Since 2026-11-19.
Lists the direct subfolders of parentId (omitted: the root), by name, with how many media and subfolders each holds and up to three cover images (signed URLs, about an hour). With search, every folder below parentId whose name contains the text.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
parentId optional | query | string (uuid) | |
search optional | query | string | at most 200 characters |
Responses
200 OK
object · MediaFoldersResponse
dataarray of objectrequired8fields in each item
idstringrequiredparentIdstringrequirednullablenamestringrequiredcolorstringrequiredOne of:gray,red,orange,yellow,green,blue,purple,pinkiconstringrequirednullablemediaCountnumberrequiredsubfolderCountnumberrequiredcoversarray of objectrequiredat most 3 items · default []2fields in each item
idstringrequiredpreviewUrlstringrequired
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 429, 500.
Error codes
| Status | Code | Message |
|---|---|---|
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | ORGANIZATION_NOT_FOUND | This organization doesn't exist or you're not a member of it. |
| 404 | WORKSPACE_NOT_FOUND | This workspace doesn't exist or you don't have access to it. |
9 more that every operation can answer (tokens, scopes, limits)
| 401 | APP_SUSPENDED | This app has been suspended by Beplan and can't access your account. |
| 401 | TOKEN_EXPIRED | This token has expired. Create a new one or sign in again. |
| 401 | TOKEN_REVOKED | This token was revoked. Connect again to get a new one. |
| 401 | UNAUTHENTICATED | Your session has expired. Please sign in again. |
| 403 | INSUFFICIENT_SCOPE | This token doesn't have the access this needs. Connect again and allow it. |
| 403 | INTEGRATION_BLOCKED_BY_ORGANIZATION | This organization doesn't allow this integration. Ask an admin of the organization. |
| 403 | INTEGRATION_PENDING_APPROVAL | An admin of this organization needs to approve this connection first. |
| 429 | RATE_LIMITED | Too many requests. Wait a moment and try again. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. Please try again. |
Example
Folders at the root
curl -X GET "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders" \
-H "Authorization: Bearer beplan_pat_…" const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders", {
method: "GET",
headers: {
Authorization: "Bearer beplan_pat_…",
},
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json(); import requests
response = requests.get(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders",
headers={"Authorization": "Bearer beplan_pat_…"},
)
response.raise_for_status()
data = response.json()["data"] Response 200
{
"data": [
{
"id": "6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d",
"parentId": null,
"name": "Launch",
"color": "blue",
"icon": null,
"mediaCount": 4,
"subfolderCount": 0,
"covers": []
}
]
} Create a folder
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/folders media.folders.create - Scope
- media:write
- Role permission
- Upload media (
media:create) - Effect
- Changes data in Beplan.
- Idempotency
- Send an
Idempotency-Keyto retry safely: the same key with the same body within 24 hours returns the stored response. - Stability
- Beta. May still change before it is marked stable. Since 2026-11-19.
Creates a folder in parentId (null: the root) with a name, a color (gray, red, orange, yellow, green, blue, purple, pink) and an optional emoji icon. Answers 201 with the folder.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) |
Request body JSON, required
object · CreateMediaFolderBody
namestringrequired1–255 charactersparentIdstring (uuid)requirednullablecolorstringrequiredOne of:gray,red,orange,yellow,green,blue,purple,pinkiconstringoptionalnullableat most 16 characters
Responses
201 Created
object · MediaFolderResponse
dataobject · MediaFolderrequired7fields
idstringrequiredparentIdstringrequirednullablenamestringrequiredcolorstringrequiredOne of:gray,red,orange,yellow,green,blue,purple,pinkiconstringrequirednullablemediaCountnumberrequiredsubfolderCountnumberrequired
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 409, 413, 415, 429, 500.
Error codes
| Status | Code | Message |
|---|---|---|
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | FOLDER_NOT_FOUND | This folder doesn't exist in this workspace. |
| 404 | ORGANIZATION_NOT_FOUND | This organization doesn't exist or you're not a member of it. |
| 404 | WORKSPACE_NOT_FOUND | This workspace doesn't exist or you don't have access to it. |
13 more that every operation can answer (tokens, scopes, limits)
| 401 | APP_SUSPENDED | This app has been suspended by Beplan and can't access your account. |
| 401 | TOKEN_EXPIRED | This token has expired. Create a new one or sign in again. |
| 401 | TOKEN_REVOKED | This token was revoked. Connect again to get a new one. |
| 401 | UNAUTHENTICATED | Your session has expired. Please sign in again. |
| 403 | INSUFFICIENT_SCOPE | This token doesn't have the access this needs. Connect again and allow it. |
| 403 | INTEGRATION_BLOCKED_BY_ORGANIZATION | This organization doesn't allow this integration. Ask an admin of the organization. |
| 403 | INTEGRATION_PENDING_APPROVAL | An admin of this organization needs to approve this connection first. |
| 409 | CONFLICT | This changed in the meantime. Refresh and try again. |
| 409 | IDEMPOTENCY_KEY_REUSED | This Idempotency-Key was already used for a different request. Send a new key. |
| 413 | PAYLOAD_TOO_LARGE | This request is too large to be sent with an Idempotency-Key. Send a smaller body or no key. |
| 415 | UNSUPPORTED_MEDIA_TYPE | This API reads JSON bodies only. Send the body as JSON with `Content-Type: application/json`. |
| 429 | RATE_LIMITED | Too many requests. Wait a moment and try again. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. Please try again. |
Example
A folder at the root
curl -X POST "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Launch",
"parentId": null,
"color": "blue"
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders", {
method: "POST",
headers: {
Authorization: "Bearer beplan_pat_…",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Launch",
"parentId": null,
"color": "blue"
}),
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json(); import uuid
import requests
response = requests.post(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders",
headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
json={
"name": "Launch",
"parentId": None,
"color": "blue",
},
)
response.raise_for_status()
data = response.json()["data"] Response 201
{
"data": {
"id": "6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d",
"parentId": null,
"name": "Launch",
"color": "blue",
"icon": null,
"mediaCount": 0,
"subfolderCount": 0
}
} Get a folder
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/folders/{folderId} media.folders.get - Scope
- media:read
- Role permission
- Any of: Upload media (
media:create), Edit media (media:update), Delete media (media:delete), Review media (media:review) - Effect
- Changes nothing.
- Stability
- Beta. May still change before it is marked stable. Since 2026-11-19.
Returns a folder with its counts and its breadcrumb: the folders above it, root first.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
folderId required | path | string (uuid) |
Responses
200 OK
object · MediaFolderDetailResponse
dataobjectrequired8fields
idstringrequiredparentIdstringrequirednullablenamestringrequiredcolorstringrequiredOne of:gray,red,orange,yellow,green,blue,purple,pinkiconstringrequirednullablemediaCountnumberrequiredsubfolderCountnumberrequiredbreadcrumbarray of objectrequired2fields in each item
idstringrequirednamestringrequired
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 429, 500.
Error codes
| Status | Code | Message |
|---|---|---|
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | FOLDER_NOT_FOUND | This folder doesn't exist in this workspace. |
| 404 | ORGANIZATION_NOT_FOUND | This organization doesn't exist or you're not a member of it. |
| 404 | WORKSPACE_NOT_FOUND | This workspace doesn't exist or you don't have access to it. |
10 more that every operation can answer (tokens, scopes, limits)
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 401 | APP_SUSPENDED | This app has been suspended by Beplan and can't access your account. |
| 401 | TOKEN_EXPIRED | This token has expired. Create a new one or sign in again. |
| 401 | TOKEN_REVOKED | This token was revoked. Connect again to get a new one. |
| 401 | UNAUTHENTICATED | Your session has expired. Please sign in again. |
| 403 | INSUFFICIENT_SCOPE | This token doesn't have the access this needs. Connect again and allow it. |
| 403 | INTEGRATION_BLOCKED_BY_ORGANIZATION | This organization doesn't allow this integration. Ask an admin of the organization. |
| 403 | INTEGRATION_PENDING_APPROVAL | An admin of this organization needs to approve this connection first. |
| 429 | RATE_LIMITED | Too many requests. Wait a moment and try again. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. Please try again. |
Example
A folder at the root
curl -X GET "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders/6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d" \
-H "Authorization: Bearer beplan_pat_…" const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders/6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d", {
method: "GET",
headers: {
Authorization: "Bearer beplan_pat_…",
},
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json(); import requests
response = requests.get(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders/6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d",
headers={"Authorization": "Bearer beplan_pat_…"},
)
response.raise_for_status()
data = response.json()["data"] Response 200
{
"data": {
"id": "6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d",
"parentId": null,
"name": "Launch",
"color": "blue",
"icon": null,
"mediaCount": 4,
"subfolderCount": 0,
"breadcrumb": []
}
} Rename, recolor or move a folder
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/folders/{folderId} media.folders.update - Scope
- media:write
- Role permission
- Edit media (
media:update) - Effect
- Changes data in Beplan.
- Stability
- Beta. May still change before it is marked stable. Since 2026-11-19.
Changes a folder's name, color or icon, or moves it under parentId (null: the root; not into itself or one of its subfolders). Fields left out are kept. Returns the folder.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
folderId required | path | string (uuid) |
Request body JSON, required
object · UpdateMediaFolderBody
namestringoptional1–255 charactersparentIdstring (uuid)optionalnullablecolorstringoptionalOne of:gray,red,orange,yellow,green,blue,purple,pinkiconstringoptionalnullableat most 16 characters
Responses
200 OK
object · MediaFolderResponse
dataobject · MediaFolderrequired7fields
idstringrequiredparentIdstringrequirednullablenamestringrequiredcolorstringrequiredOne of:gray,red,orange,yellow,green,blue,purple,pinkiconstringrequirednullablemediaCountnumberrequiredsubfolderCountnumberrequired
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 413, 415, 429, 500.
Error codes
| Status | Code | Message |
|---|---|---|
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | FOLDER_NOT_FOUND | This folder doesn't exist in this workspace. |
| 404 | ORGANIZATION_NOT_FOUND | This organization doesn't exist or you're not a member of it. |
| 404 | WORKSPACE_NOT_FOUND | This workspace doesn't exist or you don't have access to it. |
11 more that every operation can answer (tokens, scopes, limits)
| 401 | APP_SUSPENDED | This app has been suspended by Beplan and can't access your account. |
| 401 | TOKEN_EXPIRED | This token has expired. Create a new one or sign in again. |
| 401 | TOKEN_REVOKED | This token was revoked. Connect again to get a new one. |
| 401 | UNAUTHENTICATED | Your session has expired. Please sign in again. |
| 403 | INSUFFICIENT_SCOPE | This token doesn't have the access this needs. Connect again and allow it. |
| 403 | INTEGRATION_BLOCKED_BY_ORGANIZATION | This organization doesn't allow this integration. Ask an admin of the organization. |
| 403 | INTEGRATION_PENDING_APPROVAL | An admin of this organization needs to approve this connection first. |
| 413 | PAYLOAD_TOO_LARGE | This request is too large to be sent with an Idempotency-Key. Send a smaller body or no key. |
| 415 | UNSUPPORTED_MEDIA_TYPE | This API reads JSON bodies only. Send the body as JSON with `Content-Type: application/json`. |
| 429 | RATE_LIMITED | Too many requests. Wait a moment and try again. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. Please try again. |
Example
Rename a folder
curl -X PATCH "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders/6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Content-Type: application/json" \
-d '{
"name": "Launch week"
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders/6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d", {
method: "PATCH",
headers: {
Authorization: "Bearer beplan_pat_…",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Launch week"
}),
});
if (!response.ok) throw new Error((await response.json()).error.code);
const { data } = await response.json(); import requests
response = requests.patch(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders/6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d",
headers={"Authorization": "Bearer beplan_pat_…"},
json={
"name": "Launch week",
},
)
response.raise_for_status()
data = response.json()["data"] Response 200
{
"data": {
"id": "6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d",
"parentId": null,
"name": "Launch week",
"color": "blue",
"icon": null,
"mediaCount": 4,
"subfolderCount": 0
}
} Delete an empty folder
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/folders/{folderId} media.folders.delete - Scope
- media:write
- Role permission
- Edit media (
media:update) - Effect
- Deletes data or cannot be undone.
- Stability
- Beta. May still change before it is marked stable. Since 2026-11-19.
Deletes a folder that holds no media and no subfolder (409 FOLDER_NOT_EMPTY otherwise: move or delete what it holds first). Answers 204.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
folderId required | path | string (uuid) |
Responses
204 No content
No content.
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 409, 429, 500.
Error codes
| Status | Code | Message |
|---|---|---|
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | FOLDER_NOT_FOUND | This folder doesn't exist in this workspace. |
| 404 | ORGANIZATION_NOT_FOUND | This organization doesn't exist or you're not a member of it. |
| 404 | WORKSPACE_NOT_FOUND | This workspace doesn't exist or you don't have access to it. |
| 409 | FOLDER_NOT_EMPTY | This folder isn't empty. Move or delete what's inside first. |
10 more that every operation can answer (tokens, scopes, limits)
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 401 | APP_SUSPENDED | This app has been suspended by Beplan and can't access your account. |
| 401 | TOKEN_EXPIRED | This token has expired. Create a new one or sign in again. |
| 401 | TOKEN_REVOKED | This token was revoked. Connect again to get a new one. |
| 401 | UNAUTHENTICATED | Your session has expired. Please sign in again. |
| 403 | INSUFFICIENT_SCOPE | This token doesn't have the access this needs. Connect again and allow it. |
| 403 | INTEGRATION_BLOCKED_BY_ORGANIZATION | This organization doesn't allow this integration. Ask an admin of the organization. |
| 403 | INTEGRATION_PENDING_APPROVAL | An admin of this organization needs to approve this connection first. |
| 429 | RATE_LIMITED | Too many requests. Wait a moment and try again. |
| 500 | INTERNAL_ERROR | Something went wrong on our side. Please try again. |
Example
Delete an empty folder
curl -X DELETE "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders/6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d" \
-H "Authorization: Bearer beplan_pat_…" const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders/6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d", {
method: "DELETE",
headers: {
Authorization: "Bearer beplan_pat_…",
},
});
if (!response.ok) throw new Error((await response.json()).error.code); import requests
response = requests.delete(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/folders/6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d",
headers={"Authorization": "Bearer beplan_pat_…"},
)
response.raise_for_status() Answers 204 with no content.