cURL
curl --request POST \ --url https://api.thehaystack.ai/v2/bevly/media/create \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "itemId": 123, "externalUrl": "https://www.youtube.com/watch?v=abc123", "externalPlatform": "youtube" } '
{ "mediaAsset": { "id": 123, "itemId": 123, "contentType": "video", "status": "created", "duration": 123, "muxAssetId": "<string>", "muxPlaybackId": "<string>", "variantTypeId": 123, "variantType": { "id": 123, "name": "Sermon Video", "contentType": "video", "indexable": true, "displayOrder": 123, "collectionId": 123 } }, "uploadUrl": "https://storage.example.com/upload/abc123?signature=xyz" }
Enter your API token from the Haystack dashboard
The item this media belongs to
YouTube or Vimeo URL for playback only (not for downloading)
"https://www.youtube.com/watch?v=abc123"
Platform for external playback
youtube
vimeo
Media asset created with upload URL
Show child attributes
video
audio
created
uploaded
processing
ready
error
Duration in seconds
"Sermon Video"
Whether this variant can be indexed for search
Order shown to users
Secure URL to upload your video/audio file (PUT request)
"https://storage.example.com/upload/abc123?signature=xyz"