Skip to main content
POST
Create media asset

Authorizations

Authorization
string
header
required

Enter your API token from the Haystack dashboard

Body

application/json
itemId
integer
required

The item this media belongs to

contentType
enum<string>
required

The type of media content

Available options:
audio,
video
variantTypeId
integer
required

The variant type ID for this media asset (e.g., original, sermon audio, full service)

mimeType
string

MIME type of the file being uploaded

Example:

"video/mp4"

originalFilename
string

Original filename of the uploaded file

externalPlatform
enum<string>

Platform for external video playback (video content only)

Available options:
youtube,
vimeo
externalPlatformId
string

Video ID on the external platform (required if externalPlatform is set)

Example:

"dQw4w9WgXcQ"

Response

200 - application/json

Media asset created with upload URL

mediaAsset
object
uploadUrl
string

Secure URL to upload your video/audio file (PUT request)

Example:

"https://storage.example.com/upload/abc123?signature=xyz"