Media API
Uploads, imports and the media library.
4 endpoints. Every path is relative to the API base URL and needs a bearer token unless it is marked public. See the REST API overview for authentication, errors and pagination.
GET/v1/orgs/{orgId}/marketing/media
Lists the workspace's media library, newest first: files uploaded or imported, and on-brand visuals (branded images, carousels and app screenshots) rendered for it.
Path parameters
orgIdstring (uuid)required
Query parameters
collectionstringone of
all,uploads,on_brandkindstringone of
all,image,video,carouselpageintegerlimitinteger
Responses
200Lists the workspace's media library, newest first: files uploaded or imported, and on-brand visuals (branded images, carousels and app screenshots) rendered for it.
dataobjectrequiredFields
itemsarray<object>requiredItem fields
idstring (uuid)requiredsourcestringrequiredone of
upload,import,branded_image,carousel,screenshotassetobjectrequiredOption 1
kind"image"requiredassetIdstring (uuid)requiredurlstring (uri)requiredcontentTypestringrequiredsizeBytesintegerrequiredwidthintegerheightintegeraltTextstring
Option 2
kind"images"requiredimagesarray<object>requiredItem fields
assetIdstring (uuid)requiredurlstring (uri)requiredcontentTypestringrequiredsizeBytesintegerrequiredwidthintegerheightintegeraltTextstring
Option 3
kind"document"requiredassetIdstring (uuid)requiredurlstring (uri)requiredcontentType"application/pdf"requiredsizeBytesintegerrequiredtitlestringrequiredpageCountintegerpreviewImageUrlsarray<string (uri)>
Option 4
kind"video"requiredassetIdstring (uuid)requiredurlstring (uri)requiredcontentTypestringrequiredsizeBytesintegerrequireddurationSecondsnumberrequiredwidthintegerrequiredheightintegerrequired
previewUrlstring (uri) | nullrequiredtitlestring | nullrequiredformatstring | nullrequiredaiGeneratedbooleanrequiredsizeBytesintegerrequiredcreatedAtstringrequired
pageintegerrequiredlimitintegerrequiredtotalintegerrequiredhasMorebooleanrequiredcountsobjectrequiredFields
allintegerrequireduploadsintegerrequiredonBrandintegerrequired
curl -X GET "https://api.adventur.ai/v1/orgs/$ORG_ID/marketing/media" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN"POST/v1/orgs/{orgId}/marketing/media/{assetId}/complete
Finalize a scheduler media upload after the client PUTs it to S3. For MP4 and MOV video the length and frame size are read from the file.
Path parameters
orgIdstring (uuid)requiredassetIdstring (uuid)required
Request body application/json
keystringrequiredkindstringrequiredone of
image,videocontentTypestringrequireddurationSecondsnumberwidthintegerheightinteger
Responses
200Finalize a scheduler media upload after the client PUTs it to S3. For MP4 and MOV video the length and frame size are read from the file.
dataobjectrequiredFields
assetobjectrequiredOption 1
kind"image"requiredassetIdstring (uuid)requiredurlstring (uri)requiredcontentTypestringrequiredsizeBytesintegerrequiredwidthintegerheightintegeraltTextstring
Option 2
kind"images"requiredimagesarray<object>requiredItem fields
assetIdstring (uuid)requiredurlstring (uri)requiredcontentTypestringrequiredsizeBytesintegerrequiredwidthintegerheightintegeraltTextstring
Option 3
kind"document"requiredassetIdstring (uuid)requiredurlstring (uri)requiredcontentType"application/pdf"requiredsizeBytesintegerrequiredtitlestringrequiredpageCountintegerpreviewImageUrlsarray<string (uri)>
Option 4
kind"video"requiredassetIdstring (uuid)requiredurlstring (uri)requiredcontentTypestringrequiredsizeBytesintegerrequireddurationSecondsnumberrequiredwidthintegerrequiredheightintegerrequired
curl -X POST "https://api.adventur.ai/v1/orgs/$ORG_ID/marketing/media/$ASSET_ID/complete" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{"key":"string","kind":"image","contentType":"string"}'POST/v1/orgs/{orgId}/marketing/media/import
Copy an image or video from a public https link into the workspace so it can be attached to posts.
Path parameters
orgIdstring (uuid)required
Request body application/json
urlstring (uri)requiredaltTextstring
Responses
200Copy an image or video from a public https link into the workspace so it can be attached to posts.
dataobjectrequiredFields
assetobjectrequiredOption 1
kind"image"requiredassetIdstring (uuid)requiredurlstring (uri)requiredcontentTypestringrequiredsizeBytesintegerrequiredwidthintegerheightintegeraltTextstring
Option 2
kind"images"requiredimagesarray<object>requiredItem fields
assetIdstring (uuid)requiredurlstring (uri)requiredcontentTypestringrequiredsizeBytesintegerrequiredwidthintegerheightintegeraltTextstring
Option 3
kind"document"requiredassetIdstring (uuid)requiredurlstring (uri)requiredcontentType"application/pdf"requiredsizeBytesintegerrequiredtitlestringrequiredpageCountintegerpreviewImageUrlsarray<string (uri)>
Option 4
kind"video"requiredassetIdstring (uuid)requiredurlstring (uri)requiredcontentTypestringrequiredsizeBytesintegerrequireddurationSecondsnumberrequiredwidthintegerrequiredheightintegerrequired
curl -X POST "https://api.adventur.ai/v1/orgs/$ORG_ID/marketing/media/import" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{"url":"https://example.com"}'POST/v1/orgs/{orgId}/marketing/media/upload-url
Get a presigned URL to upload a scheduler post's image or video asset.
Path parameters
orgIdstring (uuid)required
Request body application/json
kindstringrequiredone of
image,videocontentTypestringrequired
Responses
200Get a presigned URL to upload a scheduler post's image or video asset.
dataobjectrequiredFields
assetIdstring (uuid)requireduploadUrlstringrequiredkeystringrequiredexpiresInSecondsnumberrequiredmethod"PUT"requiredrequiredHeadersobjectrequired
curl -X POST "https://api.adventur.ai/v1/orgs/$ORG_ID/marketing/media/upload-url" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{"kind":"image","contentType":"string"}'