Upload a local file as post media
upload_mediaPut a file that lives on the user's machine into durable Ignix storage and get back a stable https URL. THIS is how a photo or video on disk becomes a post, and it is also how a DOCUMENT or an AUDIO file gets a URL for a chatbot flow node: images, video, audio, and PDF, Word, Excel, CSV and ZIP documents are all accepted (documents are delivered in a DM as a link button — see get_network_rules). import_media only accepts URLs that are ALREADY public, so a local file has no other way in — do not ask the human to upload it by hand, and do not give up on the post. Default mode: call it with fileName and contentType and it returns an uploadUrl; send the bytes there yourself with an HTTP PUT (e.g. curl -X PUT -H "Content-Type: <contentType>" --upload-file "<path>" "<uploadUrl>"), then use the returned url as post media. Any file size. Only if you cannot make an HTTP request, pass the bytes inline as base64 in data (small images only: inline bytes travel through your context window). If you cannot make an HTTP request and the file is a video or anything but a small image (a web or mobile chat), this is the one case to ask the user to upload it in the Ignix web app (ignix.social, from the post composer); it then appears in list_library_media.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ONLY for small images when you cannot perform an HTTP PUT: the file bytes as base64 (max 4 MB decoded). Leave it empty to get an `uploadUrl` instead, which is the right way for video and for anything large. | |
| type | No | Inferred from the content type when omitted. | |
| bytes | No | Size of the file in bytes, if you know it. With it, Ignix returns an upload through its own app domain (`uploadUrl` + `uploadHeaders`, which you MUST send with the PUT) instead of a direct storage URL — that route works from networks that block the storage provider. Up to 90 MB in one PUT. | |
| fileName | No | Name of the file, used to infer the type and to label it in the library, e.g. "reel-hooks.mov". | |
| contentType | No | MIME type, e.g. "video/mp4", "image/jpeg", "application/pdf", "audio/mp4". Inferred from fileName when omitted. | |
| description | No | Optional note stored with the asset in the library. | |
| registerUrl | No | After a successful PUT, pass the `url` you were given here to file the asset in the media library so the human can find and reuse it. Optional: the post works without this. | |
| workspaceId | No | Workspace to work on (an id from list_workspaces). Not needed when this connection is tied to one workspace, or when you pass an account: the account's workspace is used. | |
| idempotencyKey | No | Optional. A unique id for this action (16-128 chars: letters, digits, _ : . -). If you are unsure whether a call went through (timeout, network error), repeat it with the SAME idempotencyKey and the same arguments: you get the original result and nothing is done twice. |