Write

upload_media

Upload a new media file (image or video) to the outline media library.


Parameters

NameTypeRequiredDescription
outlineIdstring—Outline ID. Defaults to your own outline.
urlstring—URL to fetch media from (https only). Exactly one of url or base64 must be provided.
base64string—Base64 encoded media bytes. Exactly one of url or base64 must be provided.
filenamestringYesFilename for the upload.
mimeTypestringYesMIME type of the upload (e.g. image/jpeg, video/mp4).
altstring—Optional alt text to apply.

Response

FieldTypeWhat it means
outlineIdstringResolved outline ID.
mediaIdstringThe new media ID.
urlstringURL of the uploaded media.
altstringAlt text.
filenamestringFilename.
mimeTypestringMIME type.
processingStatusstringProcessing status.

Example

Request

json
{ "url": "https://example.com/image.jpg", "filename": "image.jpg", "mimeType": "image/jpeg" }

Response

json
{ "outlineId": "42", "mediaId": "media_123", "url": "https://example.com/image.jpg", "alt": "", "filename": "image.jpg", "mimeType": "image/jpeg", "processingStatus": "ready" }