Stage media-library files onto a conversation
POST/api/conversations/:conversationId/attachments/from-library
Copies one or more MEDIA LIBRARY files into this conversation as PENDING
attachments — the same shape uploadAttachment returns, so the returned
ids go on to sendMessage as attachment_ids exactly like an upload.
This is how a saved reply's image is sent. A saved reply stores only a REFERENCE to a library file, because library files are served by short-lived signed urls and a stored url would be dead long before an agent used the reply.
Each copy points at the same stored object, so the workspace is not
charged twice for one file and tidying the library later cannot blank a
message that already went out. A reference whose file has since left the
library is skipped rather than failing the call. Files the channel cannot
carry are rejected with 422, using the same limits as an upload.
Authorized through the conversation's reply ability.
Request
Responses
- 201
- 401
- 403
- 404
- 422
The staged (pending) attachments.
Not authenticated. code: account_disabled means the member's seat was deactivated in this workspace: the session is over even though the token was not revoked (clients sign out and clean up).
Authenticated but not allowed.
Resource not found (or not visible to the current tenant).
The request failed validation.