Add videos to a collection
Adds 1 to 100 videos of the library to a collection. Video IDs must be unique within the request.
AccessKeyAccessKey<token>The private key of a library, starting with ovk_. Copy it from API & embeds in the console, keep it on your server, and rotate it there if it leaks.
collectionId*stringID of the collection.
uuidAccessKey*stringThe library's private key. Same value as the AccessKey security scheme; listed here so code samples include it.
application/json- body
video_ids*array<>1 <= items <= 100The updated collection.
application/json- response
data*curl -X POST 'https://api.octavideo.tech/api/v1/collections/3c7a9e21-5b4d-4f8e-a1c2-7d9e0f1a2b3c/videos' \ -H 'AccessKey: ovk_YOUR_LIBRARY_PRIVATE_KEY' \ -H 'Content-Type: application/json' \ -d '{ "video_ids": [ "6f1c2b9e-4a7d-4f3e-9b8a-2d5c7e1f0a34" ]}'{ "data": { "id": "3c7a9e21-5b4d-4f8e-a1c2-7d9e0f1a2b3c", "name": "Arabic grammar, level 1", "video_ids": [ "6f1c2b9e-4a7d-4f3e-9b8a-2d5c7e1f0a34" ], "created_at": "2026-10-25T09:30:00Z" }}Create a collection POST
Creates an empty collection in the library.
Issue a playback OTP POST
Issues a one-time password (OTP) that lets one viewer play one video, and returns the `embed_url` to load in an iframe. Call this from your server each time a signed-in viewer opens a video page, and never expose your library key to the browser. An OTP can be used once and expires after `ttl_seconds` (5 minutes by default). Always pass `user_id`: it makes one person count as one unique viewer across devices. The video must be `ready`, otherwise the response is `409` with the code `video_not_ready`.