v58

latestOpenAPI 3.0.3agplraw.githubusercontent.com2026-08-01187461.6 MB
chat

Post a file from the conversation Draft folder as a chat message

The file must be inside the Draft folder returned by the probe endpoint. This endpoint moves the file from Draft into the shared conversation subfolder (resolving any name conflicts), creates the chat message, and returns the actual final filename. The subfolder is shared with the room via a folder-level TYPE_ROOM share — no per-file share is created, keeping the Share Overview clean.

post/ocs/v2.php/apps/spreed/api/{apiVersion}/chat/{token}/attachment

Path parameters

apiVersion'v1' required
tokenstring required

Headers

OCS-APIRequestboolean required

Required to be true for the API request to pass

Request body

filePathstring required

Path of the file relative to the user's home root (e.g. "Talk/Group Chat-abc123/Draft/uuid.jpg")

referenceIdstring required

Client-generated reference ID for the message

talkMetaDatastring

JSON-encoded metadata (caption, messageType, silent, …)

fileNamestring

Desired final file name; the service resolves conflicts by appending " (1)", " (2)", … if already taken

allowUpdateboolean

Allow recipients to modify shared files

Response

File moved from Draft and posted as chat message