Put media on a saved reply from links
POST/v1/agents/:agentId/saved-replies/:savedReplyId/media/import
x-scope: "saved_replies:write"
x-rate-limit-per-minute: 10
Replaces the saved reply's media with files read from links: one image, video or document,
or up to 10 images for an album. Each is an https link Mojeeb downloads within 20 seconds
(a public address, no redirects) or the url of a Mojeeb upload of this agent. An image is
JPEG, PNG or WebP up to 10 MB, a video MP4 or MOV up to 16 MB, a document PDF or DOCX up to
20 MB. Every link is read before anything stored changes; one that can't be is
422 media_url_invalid. It spends a budget of 10 requests a minute per key.
Request
Responses
- 200
- 401
- 403
- 404
- 413
- 422
- 429
- 500
- 503
The saved reply with its new media.
Response Headers
Correlation id for this request — paste into support tickets.
Authentication failed. Single code (invalid_api_key) covers every
sub-case: missing header, wrong scheme, malformed, unknown, revoked or
expired key. The message field disambiguates for humans debugging.
One exception: when the key could not be checked because of a server-side
fault, the status is still 401 but type is internal_error and code
is internal_server_error; retry with backoff.
Response Headers
Correlation id for this request — paste into support tickets.
Authenticated, but not allowed: insufficient_scope (the key lacks the scope in this
operation's x-scope) or agent_not_authorized (the key is limited to other agents).
Response Headers
Correlation id for this request — paste into support tickets.
not_found: no saved reply of this agent by that id. agent_not_found when the agent isn't
one of your company's.
Response Headers
Correlation id for this request — paste into support tickets.
The request body is larger than 1 MB.
Response Headers
Correlation id for this request — paste into support tickets.
invalid_request_body when the body breaks its schema; invalid_request for a shortcut
another saved reply of the agent already uses, a saved reply left with neither text nor
media, or media that isn't one image, video or document or up to 10 images;
media_url_invalid when a link in media_urls can't be read (param names it).
Response Headers
Correlation id for this request — paste into support tickets.
Per-key rate limit hit. Default is 60/min/key; an endpoint with an
x-rate-limit-per-minute of its own counts in a budget of its own
(today the WhatsApp template endpoints, sendBroadcast, retryBroadcast, inviteMember,
resendInvitation, uploadAttachmentMedia, importAttachmentMedia, createUpload and
importSavedReplyMedia, which share one that allows 10/min/key,
sendConversationMessage, which allows 20/min/key; putUploadContent takes no key and
allows the default 60/min per IP address), and its 429
reports that limit in X-RateLimit-Limit. Retry-After tells you when to retry;
X-RateLimit-Reset is the Unix timestamp of the next window.
Per-success-response
X-RateLimit-*headers are a known gap; on 2xx responses these headers are NOT currently emitted. Customers should rely on 429 +Retry-Afterfor backoff signals.
Response Headers
Correlation id for this request — paste into support tickets.
Seconds to wait before retrying.
The per-minute request limit of the endpoint called. Every key has the same limits today.
Remaining requests in the current window. 0 on rejection.
Unix timestamp at which the current window resets.
Unexpected server-side failure. Retry with exponential backoff. If
the failure persists, send us the correlation_id.
Response Headers
Correlation id for this request — paste into support tickets.
Mojeeb couldn't check access because of a temporary fault: the key's,
or on assignLead and assignConversation the teammate's. Nothing was
changed. Retry with backoff.
Response Headers
Correlation id for this request — paste into support tickets.