Biblioteka mediów
Endpointy „Biblioteka mediów” Zanfia Workspace API — ze schematami i przykładami kodu.
Wgrywaj pliki i wideo do lekcji oraz stron. Wideo jest transkodowane po wgraniu — odpytuj element media, aż uploadStatus będzie ready. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.
Lista mediów
/mediaAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/media"{ "count": 0, "media": [ { "id": "string", "name": "string", "type": "string", "mimeType": "string", "size": 0, "url": "string", "folder": "string", "uploadStatus": "string", "createdAt": "string" } ]}{ "error": "string"}Prześlij plik
/mediaAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/media" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "mimeType": "string", "data": "string" }'{ "mediaId": "string", "url": "string", "storagePath": "string"}{ "error": "string"}Rozpocznij przesyłanie wideo
/media/videos/initiate-uploadAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Begin a Bunny video upload: provisions a Bunny video object + a Pending MediaDocument, and returns a signed TUS credential. The caller then uploads the bytes DIRECTLY to Bunny (the file never passes through the API), and polls GET /media/:mediaId until uploadStatus is ready (Bunny finalizes via webhook).
Response Body
application/json
application/json
curl -X POST "https://example.com/media/videos/initiate-upload" \ -H "Content-Type: application/json" \ -d '{ "title": "string", "sourceSizeBytes": 0 }'{ "mediaId": "string", "bunnyVideoId": "string", "bunnyLibraryId": "string", "signature": "string", "expire": 0}{ "error": "string"}Przenieś media do folderu
/media/moveAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Files the items into folder (by NAME); folder: null unfiles them.
Response Body
application/json
application/json
curl -X POST "https://example.com/media/move" \ -H "Content-Type: application/json" \ -d '{ "mediaIds": [ "string" ], "folder": "string" }'{ "updatedCount": 0}{ "error": "string"}Szczegóły pliku
/media/{mediaId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Media id
Response Body
application/json
application/json
curl -X GET "https://example.com/media/string"{ "media": { "id": "string", "name": "string", "type": "string", "mimeType": "string", "size": 0, "url": "string", "folder": "string", "uploadStatus": "string", "createdAt": "string" }}{ "error": "string"}Edytuj szczegóły pliku
/media/{mediaId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Media id
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/media/string" \ -H "Content-Type: application/json" \ -d '{}'{ "mediaId": "string", "updated": true}{ "error": "string"}Usuń plik z mediów
/media/{mediaId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Media id
Response Body
application/json
application/json
curl -X DELETE "https://example.com/media/string"{ "status": "ok"}{ "error": "string"}Transkrypcja wideo
/media/{mediaId}/transcriptAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Media id
Query Parameters
true includes word-level timings (large payload).
Response Body
application/json
application/json
curl -X GET "https://example.com/media/string/transcript"{ "transcription": { "text": "string", "language": "string", "createdAt": "string", "updatedAt": "string", "words": [ { "word": "string", "start": 0, "end": 0 } ] }}{ "error": "string"}Lista folderów
/media-foldersAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/media-folders"{ "count": 0, "folders": [ { "id": "string", "name": "string" } ]}{ "error": "string"}Utwórz folder
/media-foldersAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/media-folders" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "folder": { "id": "string", "name": "string" }}{ "error": "string"}Zmień nazwę folderu
/media-folders/{name}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Folder name
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Renaming onto an existing folder MERGES into it (the old folder is removed).
Response Body
application/json
application/json
curl -X PATCH "https://example.com/media-folders/string" \ -H "Content-Type: application/json" \ -d '{ "newName": "string" }'{ "folder": { "id": "string", "name": "string" }, "updatedItemCount": 0}{ "error": "string"}Usuń folder
/media-folders/{name}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Folder name
Response Body
application/json
application/json
curl -X DELETE "https://example.com/media-folders/string"{ "docDeleted": true, "unfiledItemCount": 0}{ "error": "string"}Czy ten artykuł był pomocny?

