Upload Media
postly_upload_mediaImports media into Postly storage independently of a post mutation. Accepts a client-provided file reference, URL, data URL, or base64 payload. Returns a durable Postly media object only when complete; a 202 processing result requires a later list_media check with its idempotency_key before creating or scheduling a post.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public or temporary URL to import into Postly storage when no file reference is available. | |
| data | No | Base64 content or a data URL for agents that can provide bytes instead of a URL. | |
| file | No | Client-provided file reference for an attached, selected, or generated file. | |
| type | No | Optional MIME type such as image/png, video/mp4, or application/pdf. | |
| alt_text | No | Optional alt text to carry forward into the returned Postly media object. | |
| file_name | No | Optional file name. Required when using data/base64 without a file reference. | |
| workspace_id | No | Destination Media Library workspace ID. Omit to use the oldest available writable workspace within this connection. Check media_library in the result for its workspace_id and registration status. | |
| idempotency_key | No | Optional stable key for safely retrying the same upload. Postly derives one automatically for file references and URLs. |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| media | No | ||
| usage | No | ||
| status | No | ||
| message | No | ||
| next_step | No | ||
| raw_upload | No | ||
| media_library | No | ||
| idempotency_key | No | ||
| retry_after_seconds | No |