API referenceMessages
Attach a file
POST
The file as the raw body with its media type and its name in x-filename, or a multipart form. Up to 10 MB a file and 25 MB a message. Send its id with a message.
bearerheader
AuthorizationBearer <token>An API token
id*stringA session id
x-filename?stringThe file's name (URL-encoded), for a raw body
body*fileFormat
binaryAttached
application/json- response
attachmentId*stringatt_<hex>
name*stringUnique in the session; the sandbox has it at /workspace/.pistis/attachments/<name>
size*integerBytes
type*stringMedia type
curl -X POST 'http://127.0.0.1:7777/sessions/ses_6c1f2a0b9d3e4f5a6b7c/attachments' \ -H 'x-filename: notes.txt' \ -H 'Content-Type: application/octet-stream' \ -d 'hello'Example Response
{ "attachmentId": "string", "name": "string", "size": 0, "type": "string"}