Put media on an AI attachment from links
import_attachment_mediaPut media on an AI attachment from links
Mojeeb downloads the attachment's media from https links and stores it as an upload
would, replacing whatever was stored: one link for a photo, video or document, or up to
10 for an album's images, in order. For a client that can't send files, such as an AI
assistant. A link can also be the url of a Mojeeb upload of this agent (createUpload),
read from Mojeeb's storage instead of downloaded. Each link must answer 200 with the file itself within 20 seconds:
redirects aren't followed, and a link to an address that isn't public is refused. A link
that fails is 422 attachment_media_url_invalid; a file that arrives but isn't what the
type takes is 422 invalid_media, with the same types and sizes as
uploadAttachmentMedia. Nothing stored changes until every file passes. A video is
re-encoded, so 503 media_processing_busy can answer here too. It shares the budget of
10 requests a minute per key with uploadAttachmentMedia.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| urls | Yes | Links to the files: an https link or the `url` of a Mojeeb upload of this agent (`createUpload`) each; one for a photo, video or document, up to 10 for an album's images, in order. | |
| agent_id | Yes | The agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`. | |
| attachment_id | Yes | An AI attachment of the agent. Another agent's attachment is `404 not_found`. |