Media

Create a streaming media upload session

post/media/upload-session

Request

  • Base URL: https://app.openpo.st/api/v1
  • URL: https://app.openpo.st/api/v1/media/upload-session
  • Auth: one of:
    • HTTP bearer
    • API key in cookie openpost_session

Headers

Idempotency-Keystring

Replay key scoped to the caller, Workspace, and operation

Request body

$schemastring uri

A URL to the JSON Schema for this object.

alt_textstring

Alt text for accessibility

asset_kind'library' | 'brand_asset' | 'brand_font' | 'design_preview' | 'template_preview' | 'project_asset'

Media library role

client_sha256string

Optional SHA-256 used to reuse an identical ready asset in this workspace

design_document_idstring

Producing OpenPost Image Editor design ID

design_page_idstring

Producing OpenPost Image Editor page ID

filenamestring required

Original filename

mime_typestring

Declared MIME type

parent_media_idstring

Source media ID for a derivative

project_asset_idstring

Reserved Project Asset receiving this upload

retention_class'library' | 'temporary'

Keep in the library or manage as temporary post media

sizeinteger required

Expected upload size in bytes

source'upload' | 'media_copy' | 'camera' | 'image_editor_export' | 'image_editor_edit' | 'background_removal' | 'video_editor_source' | 'video_editor_export' | 'stock_import' | 'meme_generator' | 'screenshot_template' | 'image_generation'

Media provenance

tag_idstring

Optional tag to assign to this upload

workspace_idstring required

Workspace ID

Example request

{
  "$schema": "https://example.com/api/v1/schemas/CreateMediaUploadSessionInputBody.json"
}

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

complete_urlstring required

API path to call after the upload succeeds

dedupedboolean required

Whether an identical ready workspace asset was reused

media_idstring required

Pending media ID

project_asset_idstring

Project Asset linked to the media

Example response

{
  "$schema": "https://example.com/api/v1/schemas/CreateMediaUploadSessionResponse.json"
}

Changes

No recorded changes to this operation across all 1 revision of this API.