API reference
Media uploads
Base URL https://api.beplan.io/v1. Authentication, envelopes, pagination, idempotency and rate limits:
conventions. OpenAPI document: openapi.json.
All 7 Media uploads operations
- POST Import a media from a URL
- POST Cancel an upload
- POST Complete an upload
- POST Sign upload parts again
- POST Start uploading a new version
- POST Start uploading raw footage
- POST Start uploading a media
Import a media from a URL
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/imports media.import - 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.
Adds a file to the library from a public address, for callers that can't send the bytes themselves (assistants, no-code tools); otherwise prefer media.uploads.create. The address must be https on the default port, with no user or password in it, and not a local name (localhost, .local, .internal) or an IP address outside the public internet (private network, link-local, cloud metadata): otherwise 422 MEDIA_IMPORT_URL_INVALID and nothing is created. A host name is resolved only when the file is fetched: one that resolves to a non-public address fails the import with import_unreachable. Redirects are followed, at most 3, and only to addresses that pass the same rules. The file must be one of the library's image or video types and really be of that type (mimeType, or guessed from the address's extension: an address without a known extension needs mimeType); an image is at most 20 MB, a video 10 GB, and never more than the organization's storage left. Folder, formats and review work like an upload. Asynchronous: answers 202 with mediaId at once and fetches the file in the background. Poll media.get with that id (every few seconds, then less often): processing.state is processing while the file is fetched and prepared (it has no file or download link yet, and is not in lists), then ready, or failed with processing.error saying why: import_unreachable (the server could not be reached, answered an error, or redirected too often or to an address that isn't allowed), import_not_public (the address itself is not a public https address), import_too_large (over the limit or the storage left), import_wrong_type (the file is not of the declared type, e.g. an HTML page), import_timeout (the server sent nothing for 30 s or was too slow overall), import_failed (our side; try again). A failed import stays in the library as a failed item: delete it with media.delete. Short outages are retried before the import fails.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) |
Request body JSON, required
object · ImportMediaBody
urlstringrequiredThe file's publichttpsaddress (default port, no user or password in it). Redirects are followed only to publichttpsaddresses.at most 2048 charactersfilenamestringoptionalThe name shown in the library. Default: the last segment of the address's path.1–255 charactersmimeTypestringoptionalThe file's type. Default: guessed from the address's extension; an address without a known extension needs it. The fetched file must be of this type.One of:image/jpeg,image/png,image/webp,image/gif,image/heic,image/heif,image/avif,image/tiff,image/bmp,video/mp4,video/quicktime,video/webm,video/x-matroska,video/x-msvideo,video/x-m4v,video/3gpp,video/mpegfolderIdstring (uuid)optionalnullableThe folder to put it in (nullor omitted: the root).formatIdsarray of string (uuid)optionalFormats of the workspace to tag it with.at most 50 items
Responses
202 Accepted
object · ImportMediaResponse
dataobject · MediaImportrequired3fields
mediaIdstringrequiredversionIdstringrequirednullablestatestringrequiredOne of:importing
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 409, 413, 415, 422, 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 | FORMAT_NOT_FOUND | One of the formats 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. |
| 413 | MEDIA_STORAGE_FULL | Your media storage is full. Delete some media or add storage to your plan. |
| 422 | MEDIA_IMPORT_URL_INVALID | Use a public HTTPS address of the file, on the default port and without credentials. |
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. |
Examples
An image by its address
curl -X POST "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/imports" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"url": "https://cdn.example.com/campaign/launch-teaser.jpg"
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/imports", {
method: "POST",
headers: {
Authorization: "Bearer beplan_pat_…",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://cdn.example.com/campaign/launch-teaser.jpg"
}),
});
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/imports",
headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
json={
"url": "https://cdn.example.com/campaign/launch-teaser.jpg",
},
)
response.raise_for_status()
data = response.json()["data"] Response 202
{
"data": {
"mediaId": "0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11",
"versionId": null,
"state": "importing"
}
} A video from an address without an extension, into a folder
curl -X POST "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/imports" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"url": "https://files.example.com/download?id=42",
"filename": "Launch teaser.mp4",
"mimeType": "video/mp4",
"folderId": "6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d"
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/imports", {
method: "POST",
headers: {
Authorization: "Bearer beplan_pat_…",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://files.example.com/download?id=42",
"filename": "Launch teaser.mp4",
"mimeType": "video/mp4",
"folderId": "6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d"
}),
});
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/imports",
headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
json={
"url": "https://files.example.com/download?id=42",
"filename": "Launch teaser.mp4",
"mimeType": "video/mp4",
"folderId": "6d1c2b7a-1f2e-4b8c-9a3d-5e6f7a8b9c0d",
},
)
response.raise_for_status()
data = response.json()["data"] Response 202
{
"data": {
"mediaId": "0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11",
"versionId": null,
"state": "importing"
}
} Cancel an upload
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/items/{mediaId}/upload/abort media.upload.abort - Scope
- media:write
- Role permission
- Any of: Upload media (
media:create), Upload raw footage (media:rawFootageUpload), Manage raw footage (media:rawFootageManage), Review media (media:review) - 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.
Cancels an upload in progress that this token started (see media.uploads.create) and removes what it created. 409 CONFLICT once it is complete. Answers 204; calling it again changes nothing.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
mediaId required | path | string (uuid) |
Request body JSON, required
object · UploadTargetBody
versionIdstring (uuid)requirednullableThe ticket'sversionId, as the upload returned it (nullfor a plain upload).
Responses
204 No content
No content.
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 409, 413, 415, 429, 500, 502.
Error codes
| Status | Code | Message |
|---|---|---|
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | MEDIA_NOT_FOUND | This media doesn't exist or was deleted. |
| 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 | CONFLICT | This changed in the meantime. Refresh and try again. |
| 502 | UPSTREAM_FAILED | A service we depend on didn't respond. Please try again. |
13 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. |
| 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
Cancel a plain upload
curl -X POST "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/upload/abort" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"versionId": null
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/upload/abort", {
method: "POST",
headers: {
Authorization: "Bearer beplan_pat_…",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"versionId": null
}),
});
if (!response.ok) throw new Error((await response.json()).error.code); import uuid
import requests
response = requests.post(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/upload/abort",
headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
json={
"versionId": None,
},
)
response.raise_for_status() Answers 204 with no content.
Complete an upload
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/items/{mediaId}/upload/complete media.upload.complete - Scope
- media:write
- Role permission
- Any of: Upload media (
media:create), Upload raw footage (media:rawFootageUpload), Manage raw footage (media:rawFootageManage), Review media (media:review) - 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.
Last step of an upload (see media.uploads.create), by the token that started it: checks every byte reached storage (409 MEDIA_UPLOAD_INCOMPLETE otherwise: send the missing parts and call again), marks the file uploaded and queues its processing (videos are transcoded: follow processing.state with media.get). For a new version, it becomes the media's current one and the media goes back to review. Answers 204; calling it again after success changes nothing. A new version of a media in posts that are scheduled or waiting for approval answers 422 MEDIA_IN_POSTS_UNDER_APPROVAL when the organization requires approval for posts from integrations.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
mediaId required | path | string (uuid) |
Request body JSON, required
object · UploadTargetBody
versionIdstring (uuid)requirednullableThe ticket'sversionId, as the upload returned it (nullfor a plain upload).
Responses
204 No content
No content.
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 403, 404, 409, 413, 415, 422, 429, 500, 502.
Error codes
| Status | Code | Message |
|---|---|---|
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | MEDIA_NOT_FOUND | This media doesn't exist or was deleted. |
| 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 | CONFLICT | This changed in the meantime. Refresh and try again. |
| 409 | MEDIA_UPLOAD_INCOMPLETE | Wait for the upload to finish before approving this media. |
| 422 | MEDIA_IN_POSTS_UNDER_APPROVAL | This media is in posts that are scheduled or waiting for approval, and this organization requires approval for posts from integrations. Change it in Beplan, or take it out of those posts first. |
| 502 | UPSTREAM_FAILED | A service we depend on didn't respond. Please try again. |
13 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. |
| 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
Complete a plain upload
curl -X POST "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/upload/complete" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"versionId": null
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/upload/complete", {
method: "POST",
headers: {
Authorization: "Bearer beplan_pat_…",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"versionId": null
}),
});
if (!response.ok) throw new Error((await response.json()).error.code); import uuid
import requests
response = requests.post(
"https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/upload/complete",
headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
json={
"versionId": None,
},
)
response.raise_for_status() Answers 204 with no content.
Sign upload parts again
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/items/{mediaId}/upload/parts media.upload.parts.sign - Scope
- media:write
- Role permission
- Any of: Upload media (
media:create), Upload raw footage (media:rawFootageUpload), Manage raw footage (media:rawFootageManage), Review media (media:review) - Effect
- Changes data in Beplan.
- Idempotency
- Single-flight: an
Idempotency-Keyonly stops a second run while the first is running. Its answer carries signed links and is never stored, so a repeat afterwards runs again with fresh links. - Stability
- Beta. May still change before it is marked stable. Since 2026-11-19.
For a long multipart upload whose part URLs expired (they last an hour): signs up to 100 parts again (partNumbers, from 1). Only for an upload in progress that this token started (409 CONFLICT otherwise). Also keeps the upload from being cleaned up as abandoned.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
mediaId required | path | string (uuid) |
Request body JSON, required
object · RefreshUploadPartsBody
versionIdstring (uuid)requirednullablepartNumbersarray of integerrequired1–100 items · each from 1 to 10000
Responses
200 OK
object · RefreshUploadPartsResponse
dataarray of objectrequired2fields in each item
partNumbernumberrequiredurlstringrequired
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 | MEDIA_NOT_FOUND | This media doesn't exist or was deleted. |
| 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 | CONFLICT | This changed in the meantime. Refresh and try again. |
12 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 | 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
Re-sign the first two parts
curl -X POST "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/upload/parts" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"versionId": null,
"partNumbers": [
1,
2
]
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/upload/parts", {
method: "POST",
headers: {
Authorization: "Bearer beplan_pat_…",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"versionId": null,
"partNumbers": [
1,
2
]
}),
});
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/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/upload/parts",
headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
json={
"versionId": None,
"partNumbers": [
1,
2,
],
},
)
response.raise_for_status()
data = response.json()["data"] Response 200
{
"data": [
{
"partNumber": 1,
"url": "https://storage.beplan.io/org-media/…?partNumber=1&X-Amz-Signature=…"
},
{
"partNumber": 2,
"url": "https://storage.beplan.io/org-media/…?partNumber=2&X-Amz-Signature=…"
}
]
} Start uploading a new version
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/items/{mediaId}/versions media.versions.create - Scope
- media:write
- Role permission
- Any of: Upload media (
media:create), Review media (media:review), Manage raw footage (media:rawFootageManage) - Effect
- Changes data in Beplan.
- Idempotency
- Single-flight: an
Idempotency-Keyonly stops a second run while the first is running. Its answer carries signed links and is never stored, so a repeat afterwards runs again with fresh links. - Stability
- Beta. May still change before it is marked stable. Since 2026-11-19.
Starts uploading a new version of a media in review: one sent back for changes (by its uploader or a reviewer), or an edited cut of raw footage (by someone who manages raw footage). Same three steps as media.uploads.create (send the ticket's versionId to complete). Nothing changes on the media until the upload completes. 409 MEDIA_REVIEW_STATE_CONFLICT in any other state. 422 MEDIA_IN_POSTS_UNDER_APPROVAL when the media is in posts that are scheduled or waiting for approval and the organization requires approval for posts from integrations. Needs the organization's Team Collaboration add-on (402 PLAN_UPGRADE_REQUIRED with details.feature: "team_collaboration" without it).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) | |
mediaId required | path | string (uuid) |
Request body JSON, required
object · CreateVersionUploadBody
fileobjectrequiredThe file to upload.sizemust be at most 20 MB (20,971,520 bytes) for images and GIFs, 50 MB (52,428,800 bytes) for audio and 10 GB (10,737,418,240 bytes) for videos, else400 VALIDATION_FAILEDonsize; an audio file'sduration, when given, at most 900 seconds.6fields
filenamestringrequiredThe file's name, shown in the library.1–255 charactersmimeTypestringrequiredThe file's type. The bytes you send must be of this type.One of:image/jpeg,image/png,image/webp,image/gif,image/heic,image/heif,image/avif,image/tiff,image/bmp,video/mp4,video/quicktime,video/webm,video/x-matroska,video/x-msvideo,video/x-m4v,video/3gpp,video/mpeg,audio/mpeg,audio/mp3,audio/mp4,audio/x-m4a,audio/m4a,audio/aac,audio/x-aac,audio/wav,audio/x-wav,audio/wave,audio/vnd.wave,audio/ogg,audio/opus,audio/flac,audio/x-flacsizeintegerrequiredThe exact file size in bytes.greater than 0widthintegeroptionalWidth in pixels, if you know it.greater than 0heightintegeroptionalHeight in pixels, if you know it.greater than 0durationnumberoptionalLength in seconds (videos and audio), if you know it.at least 0
Responses
201 Created
object · UploadTicketResponse
dataobject · UploadTicketrequired3fields
mediaIdstringrequiredThe media the file fills (hidden from lists until the upload completes).versionIdstringrequirednullableThe version the file fills (raw footage and new versions), elsenull: send it back as is.planobject · UploadPlanrequiredHow to send the bytes to storage (signed URLs, valid one hour; send them without anAuthorizationheader).single: onePUT urlwith the whole file and aContent-Typeheader equal tofile.mimeType.multipart:PUTeach part's bytes to itsurl(partnis bytes[(n - 1) * partSize, n * partSize), the last one shorter), in any order, noContent-Typeneeded, ETags need not be kept. Then call…/upload/complete.Variant: mode: "single"
modestringrequiredAlwayssingleurlstringrequired
Variant: mode: "multipart"
modestringrequiredAlwaysmultipartpartSizenumberrequiredpartsarray of objectrequired2fields in each item
partNumbernumberrequiredurlstringrequired
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 402, 403, 404, 409, 413, 415, 422, 429, 500, 502.
Error codes
| Status | Code | Message |
|---|---|---|
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 402 | PLAN_UPGRADE_REQUIRED | Your current plan doesn't include this feature. |
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | MEDIA_NOT_FOUND | This media doesn't exist or was deleted. |
| 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 | CONFLICT | This changed in the meantime. Refresh and try again. |
| 409 | MEDIA_REVIEW_STATE_CONFLICT | This media isn't at that step of the review anymore. |
| 413 | MEDIA_STORAGE_FULL | Your media storage is full. Delete some media or add storage to your plan. |
| 422 | MEDIA_IN_POSTS_UNDER_APPROVAL | This media is in posts that are scheduled or waiting for approval, and this organization requires approval for posts from integrations. Change it in Beplan, or take it out of those posts first. |
| 502 | UPSTREAM_FAILED | A service we depend on didn't respond. Please try again. |
12 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 | 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 new cut of a video
curl -X POST "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/versions" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"file": {
"filename": "launch-teaser-v2.mp4",
"mimeType": "video/mp4",
"size": 52428800
}
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/versions", {
method: "POST",
headers: {
Authorization: "Bearer beplan_pat_…",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"file": {
"filename": "launch-teaser-v2.mp4",
"mimeType": "video/mp4",
"size": 52428800
}
}),
});
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/items/0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11/versions",
headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
json={
"file": {
"filename": "launch-teaser-v2.mp4",
"mimeType": "video/mp4",
"size": 52428800,
},
},
)
response.raise_for_status()
data = response.json()["data"] Response 201
{
"data": {
"mediaId": "0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11",
"versionId": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"plan": {
"mode": "multipart",
"partSize": 25165824,
"parts": [
{
"partNumber": 1,
"url": "https://storage.beplan.io/org-media/…?partNumber=1&X-Amz-Signature=…"
},
{
"partNumber": 2,
"url": "https://storage.beplan.io/org-media/…?partNumber=2&X-Amz-Signature=…"
},
{
"partNumber": 3,
"url": "https://storage.beplan.io/org-media/…?partNumber=3&X-Amz-Signature=…"
}
]
}
}
} Start uploading raw footage
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/raw-footage/uploads media.rawFootage.uploads.create - Scope
- media:write
- Role permission
- Upload raw footage (
media:rawFootageUpload) - Effect
- Changes data in Beplan.
- Idempotency
- Single-flight: an
Idempotency-Keyonly stops a second run while the first is running. Its answer carries signed links and is never stored, so a repeat afterwards runs again with fresh links. - Stability
- Beta. May still change before it is marked stable. Since 2026-11-19.
Starts uploading a video as raw footage, for an editor to cut (it becomes version 0). Videos only. Same three steps as media.uploads.create (send the ticket's versionId to complete). Needs the organization's Team Collaboration add-on (402 PLAN_UPGRADE_REQUIRED with details.feature: "team_collaboration" without it).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) |
Request body JSON, required
object · CreateRawFootageUploadBody
fileobjectrequiredThe file to upload.sizemust be at most 20 MB (20,971,520 bytes) for images and GIFs, 50 MB (52,428,800 bytes) for audio and 10 GB (10,737,418,240 bytes) for videos, else400 VALIDATION_FAILEDonsize; an audio file'sduration, when given, at most 900 seconds.6fields
filenamestringrequiredThe file's name, shown in the library.1–255 charactersmimeTypestringrequiredThe file's type. The bytes you send must be of this type.One of:image/jpeg,image/png,image/webp,image/gif,image/heic,image/heif,image/avif,image/tiff,image/bmp,video/mp4,video/quicktime,video/webm,video/x-matroska,video/x-msvideo,video/x-m4v,video/3gpp,video/mpeg,audio/mpeg,audio/mp3,audio/mp4,audio/x-m4a,audio/m4a,audio/aac,audio/x-aac,audio/wav,audio/x-wav,audio/wave,audio/vnd.wave,audio/ogg,audio/opus,audio/flac,audio/x-flacsizeintegerrequiredThe exact file size in bytes.greater than 0widthintegeroptionalWidth in pixels, if you know it.greater than 0heightintegeroptionalHeight in pixels, if you know it.greater than 0durationnumberoptionalLength in seconds (videos and audio), if you know it.at least 0
Responses
201 Created
object · UploadTicketResponse
dataobject · UploadTicketrequired3fields
mediaIdstringrequiredThe media the file fills (hidden from lists until the upload completes).versionIdstringrequirednullableThe version the file fills (raw footage and new versions), elsenull: send it back as is.planobject · UploadPlanrequiredHow to send the bytes to storage (signed URLs, valid one hour; send them without anAuthorizationheader).single: onePUT urlwith the whole file and aContent-Typeheader equal tofile.mimeType.multipart:PUTeach part's bytes to itsurl(partnis bytes[(n - 1) * partSize, n * partSize), the last one shorter), in any order, noContent-Typeneeded, ETags need not be kept. Then call…/upload/complete.Variant: mode: "single"
modestringrequiredAlwayssingleurlstringrequired
Variant: mode: "multipart"
modestringrequiredAlwaysmultipartpartSizenumberrequiredpartsarray of objectrequired2fields in each item
partNumbernumberrequiredurlstringrequired
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 402, 403, 404, 409, 413, 415, 429, 500, 502.
Error codes
| Status | Code | Message |
|---|---|---|
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 402 | PLAN_UPGRADE_REQUIRED | Your current plan doesn't include this feature. |
| 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. |
| 413 | MEDIA_STORAGE_FULL | Your media storage is full. Delete some media or add storage to your plan. |
| 502 | UPSTREAM_FAILED | A service we depend on didn't respond. Please try again. |
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 long video
curl -X POST "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/raw-footage/uploads" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"file": {
"filename": "stream-2026-11-18.mp4",
"mimeType": "video/mp4",
"size": 1073741824
}
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/raw-footage/uploads", {
method: "POST",
headers: {
Authorization: "Bearer beplan_pat_…",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"file": {
"filename": "stream-2026-11-18.mp4",
"mimeType": "video/mp4",
"size": 1073741824
}
}),
});
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/raw-footage/uploads",
headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
json={
"file": {
"filename": "stream-2026-11-18.mp4",
"mimeType": "video/mp4",
"size": 1073741824,
},
},
)
response.raise_for_status()
data = response.json()["data"] Response 201
{
"data": {
"mediaId": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a",
"versionId": "3e4f5a6b-7c8d-4e9f-9a0b-1c2d3e4f5a6b",
"plan": {
"mode": "multipart",
"partSize": 25165824,
"parts": [
{
"partNumber": 1,
"url": "https://storage.beplan.io/org-media/…?partNumber=1&X-Amz-Signature=…"
},
{
"partNumber": 2,
"url": "https://storage.beplan.io/org-media/…?partNumber=2&X-Amz-Signature=…"
},
{
"partNumber": 3,
"url": "https://storage.beplan.io/org-media/…?partNumber=3&X-Amz-Signature=…"
},
{
"partNumber": 4,
"url": "https://storage.beplan.io/org-media/…?partNumber=4&X-Amz-Signature=…"
},
{
"partNumber": 5,
"url": "https://storage.beplan.io/org-media/…?partNumber=5&X-Amz-Signature=…"
},
{
"partNumber": 6,
"url": "https://storage.beplan.io/org-media/…?partNumber=6&X-Amz-Signature=…"
},
{
"partNumber": 7,
"url": "https://storage.beplan.io/org-media/…?partNumber=7&X-Amz-Signature=…"
},
{
"partNumber": 8,
"url": "https://storage.beplan.io/org-media/…?partNumber=8&X-Amz-Signature=…"
},
{
"partNumber": 9,
"url": "https://storage.beplan.io/org-media/…?partNumber=9&X-Amz-Signature=…"
},
{
"partNumber": 10,
"url": "https://storage.beplan.io/org-media/…?partNumber=10&X-Amz-Signature=…"
},
{
"partNumber": 11,
"url": "https://storage.beplan.io/org-media/…?partNumber=11&X-Amz-Signature=…"
},
{
"partNumber": 12,
"url": "https://storage.beplan.io/org-media/…?partNumber=12&X-Amz-Signature=…"
},
{
"partNumber": 13,
"url": "https://storage.beplan.io/org-media/…?partNumber=13&X-Amz-Signature=…"
},
{
"partNumber": 14,
"url": "https://storage.beplan.io/org-media/…?partNumber=14&X-Amz-Signature=…"
},
{
"partNumber": 15,
"url": "https://storage.beplan.io/org-media/…?partNumber=15&X-Amz-Signature=…"
},
{
"partNumber": 16,
"url": "https://storage.beplan.io/org-media/…?partNumber=16&X-Amz-Signature=…"
},
{
"partNumber": 17,
"url": "https://storage.beplan.io/org-media/…?partNumber=17&X-Amz-Signature=…"
},
{
"partNumber": 18,
"url": "https://storage.beplan.io/org-media/…?partNumber=18&X-Amz-Signature=…"
},
{
"partNumber": 19,
"url": "https://storage.beplan.io/org-media/…?partNumber=19&X-Amz-Signature=…"
},
{
"partNumber": 20,
"url": "https://storage.beplan.io/org-media/…?partNumber=20&X-Amz-Signature=…"
},
{
"partNumber": 21,
"url": "https://storage.beplan.io/org-media/…?partNumber=21&X-Amz-Signature=…"
},
{
"partNumber": 22,
"url": "https://storage.beplan.io/org-media/…?partNumber=22&X-Amz-Signature=…"
},
{
"partNumber": 23,
"url": "https://storage.beplan.io/org-media/…?partNumber=23&X-Amz-Signature=…"
},
{
"partNumber": 24,
"url": "https://storage.beplan.io/org-media/…?partNumber=24&X-Amz-Signature=…"
},
{
"partNumber": 25,
"url": "https://storage.beplan.io/org-media/…?partNumber=25&X-Amz-Signature=…"
},
{
"partNumber": 26,
"url": "https://storage.beplan.io/org-media/…?partNumber=26&X-Amz-Signature=…"
},
{
"partNumber": 27,
"url": "https://storage.beplan.io/org-media/…?partNumber=27&X-Amz-Signature=…"
},
{
"partNumber": 28,
"url": "https://storage.beplan.io/org-media/…?partNumber=28&X-Amz-Signature=…"
},
{
"partNumber": 29,
"url": "https://storage.beplan.io/org-media/…?partNumber=29&X-Amz-Signature=…"
},
{
"partNumber": 30,
"url": "https://storage.beplan.io/org-media/…?partNumber=30&X-Amz-Signature=…"
},
{
"partNumber": 31,
"url": "https://storage.beplan.io/org-media/…?partNumber=31&X-Amz-Signature=…"
},
{
"partNumber": 32,
"url": "https://storage.beplan.io/org-media/…?partNumber=32&X-Amz-Signature=…"
},
{
"partNumber": 33,
"url": "https://storage.beplan.io/org-media/…?partNumber=33&X-Amz-Signature=…"
},
{
"partNumber": 34,
"url": "https://storage.beplan.io/org-media/…?partNumber=34&X-Amz-Signature=…"
},
{
"partNumber": 35,
"url": "https://storage.beplan.io/org-media/…?partNumber=35&X-Amz-Signature=…"
},
{
"partNumber": 36,
"url": "https://storage.beplan.io/org-media/…?partNumber=36&X-Amz-Signature=…"
},
{
"partNumber": 37,
"url": "https://storage.beplan.io/org-media/…?partNumber=37&X-Amz-Signature=…"
},
{
"partNumber": 38,
"url": "https://storage.beplan.io/org-media/…?partNumber=38&X-Amz-Signature=…"
},
{
"partNumber": 39,
"url": "https://storage.beplan.io/org-media/…?partNumber=39&X-Amz-Signature=…"
},
{
"partNumber": 40,
"url": "https://storage.beplan.io/org-media/…?partNumber=40&X-Amz-Signature=…"
},
{
"partNumber": 41,
"url": "https://storage.beplan.io/org-media/…?partNumber=41&X-Amz-Signature=…"
},
{
"partNumber": 42,
"url": "https://storage.beplan.io/org-media/…?partNumber=42&X-Amz-Signature=…"
},
{
"partNumber": 43,
"url": "https://storage.beplan.io/org-media/…?partNumber=43&X-Amz-Signature=…"
}
]
}
}
} Start uploading a media
/organizations/{organizationId}/workspaces/{workspaceId}/media-library/uploads media.uploads.create - Scope
- media:write
- Role permission
- Upload media (
media:create) - Effect
- Changes data in Beplan.
- Idempotency
- Single-flight: an
Idempotency-Keyonly stops a second run while the first is running. Its answer carries signed links and is never stored, so a repeat afterwards runs again with fresh links. - Stability
- Beta. May still change before it is marked stable. Since 2026-11-19.
Starts uploading an image (up to 20 MB) or a video (up to 10 GB) to the library, optionally into a folder (folderId) with formats (formatIds). Uploading is three steps: (1) this call, with the file's name, type and exact size, answers a ticket; (2) send the bytes straight to storage as plan says: single (images): one PUT plan.url with the whole file and Content-Type equal to file.mimeType; multipart (videos, GIFs): PUT part n (bytes [(n - 1) * partSize, n * partSize), the last part shorter) to plan.parts[n - 1].url, any order, no headers needed; the URLs are signed for an hour and need no Authorization header (…/upload/parts signs parts again); (3) POST …/items/{mediaId}/upload/complete with the ticket's versionId. The media is hidden until completed; …/upload/abort cancels. An upload left unfinished is cleaned up after a while. With the Team Collaboration add-on, the media goes to review instead when sendToReview is set, and always for members whose role must have their uploads reviewed. 413 MEDIA_STORAGE_FULL when the organization's storage can't hold the file. Leave origin out (clipEditor is for the Clips editor's own uploads).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
organizationId required | path | string | 1–128 characters |
workspaceId required | path | string (uuid) |
Request body JSON, required
object · CreateLibraryUploadBody
fileobjectrequiredThe file to upload.sizemust be at most 20 MB (20,971,520 bytes) for images and GIFs, 50 MB (52,428,800 bytes) for audio and 10 GB (10,737,418,240 bytes) for videos, else400 VALIDATION_FAILEDonsize; an audio file'sduration, when given, at most 900 seconds.6fields
filenamestringrequiredThe file's name, shown in the library.1–255 charactersmimeTypestringrequiredThe file's type. The bytes you send must be of this type.One of:image/jpeg,image/png,image/webp,image/gif,image/heic,image/heif,image/avif,image/tiff,image/bmp,video/mp4,video/quicktime,video/webm,video/x-matroska,video/x-msvideo,video/x-m4v,video/3gpp,video/mpeg,audio/mpeg,audio/mp3,audio/mp4,audio/x-m4a,audio/m4a,audio/aac,audio/x-aac,audio/wav,audio/x-wav,audio/wave,audio/vnd.wave,audio/ogg,audio/opus,audio/flac,audio/x-flacsizeintegerrequiredThe exact file size in bytes.greater than 0widthintegeroptionalWidth in pixels, if you know it.greater than 0heightintegeroptionalHeight in pixels, if you know it.greater than 0durationnumberoptionalLength in seconds (videos and audio), if you know it.at least 0
folderIdstring (uuid)optionalnullableformatIdsarray of string (uuid)optionalat most 50 itemssendToReviewbooleanoptionaloriginstringoptionalOne of:library,clipEditor
Responses
201 Created
object · UploadTicketResponse
dataobject · UploadTicketrequired3fields
mediaIdstringrequiredThe media the file fills (hidden from lists until the upload completes).versionIdstringrequirednullableThe version the file fills (raw footage and new versions), elsenull: send it back as is.planobject · UploadPlanrequiredHow to send the bytes to storage (signed URLs, valid one hour; send them without anAuthorizationheader).single: onePUT urlwith the whole file and aContent-Typeheader equal tofile.mimeType.multipart:PUTeach part's bytes to itsurl(partnis bytes[(n - 1) * partSize, n * partSize), the last one shorter), in any order, noContent-Typeneeded, ETags need not be kept. Then call…/upload/complete.Variant: mode: "single"
modestringrequiredAlwayssingleurlstringrequired
Variant: mode: "multipart"
modestringrequiredAlwaysmultipartpartSizenumberrequiredpartsarray of objectrequired2fields in each item
partNumbernumberrequiredurlstringrequired
Errors answer { error: { code, message, details, requestId } } with status 400, 401, 402, 403, 404, 409, 413, 415, 429, 500, 502.
Error codes
| Status | Code | Message |
|---|---|---|
| 400 | VALIDATION_FAILED | Some of the information sent is invalid. |
| 402 | PLAN_UPGRADE_REQUIRED | Your current plan doesn't include this feature. |
| 403 | MISSING_PERMISSION | You don't have permission to do this. |
| 404 | FOLDER_NOT_FOUND | This folder doesn't exist in this workspace. |
| 404 | FORMAT_NOT_FOUND | One of the formats 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. |
| 413 | MEDIA_STORAGE_FULL | Your media storage is full. Delete some media or add storage to your plan. |
| 502 | UPSTREAM_FAILED | A service we depend on didn't respond. Please try again. |
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
An image
curl -X POST "https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/uploads" \
-H "Authorization: Bearer beplan_pat_…" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"file": {
"filename": "launch-teaser.jpg",
"mimeType": "image/jpeg",
"size": 482133
}
}' const response = await fetch("https://api.beplan.io/v1/organizations/ORGANIZATION_ID/workspaces/WORKSPACE_ID/media-library/uploads", {
method: "POST",
headers: {
Authorization: "Bearer beplan_pat_…",
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"file": {
"filename": "launch-teaser.jpg",
"mimeType": "image/jpeg",
"size": 482133
}
}),
});
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/uploads",
headers={"Authorization": "Bearer beplan_pat_…", "Idempotency-Key": str(uuid.uuid4())},
json={
"file": {
"filename": "launch-teaser.jpg",
"mimeType": "image/jpeg",
"size": 482133,
},
},
)
response.raise_for_status()
data = response.json()["data"] Response 201
{
"data": {
"mediaId": "0b6f5a52-7f4e-4c55-9d6f-2f0a6a1c3e11",
"versionId": null,
"plan": {
"mode": "single",
"url": "https://storage.beplan.io/org-media/…?X-Amz-Signature=…"
}
}
}