Write
upload_media
Upload a new media file (image or video) to the outline media library.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| outlineId | string | — | Outline ID. Defaults to your own outline. |
| url | string | — | URL to fetch media from (https only). Exactly one of url or base64 must be provided. |
| base64 | string | — | Base64 encoded media bytes. Exactly one of url or base64 must be provided. |
| filename | string | Yes | Filename for the upload. |
| mimeType | string | Yes | MIME type of the upload (e.g. image/jpeg, video/mp4). |
| alt | string | — | Optional alt text to apply. |
Response
| Field | Type | What it means |
|---|---|---|
| outlineId | string | Resolved outline ID. |
| mediaId | string | The new media ID. |
| url | string | URL of the uploaded media. |
| alt | string | Alt text. |
| filename | string | Filename. |
| mimeType | string | MIME type. |
| processingStatus | string | Processing 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"
}