REST APIAttachments
Start an attachment upload
Reserves an attachment and returns a short-lived presigned URL to PUT the file to (the raw bytes as the body, with Content-Type set to the declared contentType — it is part of the signature). The bytes go straight into private object storage — never through the platform, and without waking the project's sandbox; the platform copies them into the sandbox when the turn that sends them starts. Pass the returned attachmentId to POST …/messages (or …/steer) once the upload finishes.
Authorization
ApiKey x-api-key<token>
Workspace-owned API key with per-resource permissions.
In: header
Path Parameters
id*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
filename*string
Length
1 <= length <= 255contentType*string
Match
^[A-Za-z0-9!#$&^_.+-]+\/[A-Za-z0-9!#$&^_.+-]+$Length
length <= 127size*integer
Range
-9007199254740991 <= value <= 104857600annotation?
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/attachments" \ -H "Content-Type: application/json" \ -d '{ "filename": "string", "contentType": "string", "size": -9007199254740991 }'{ "attachmentId": "96b9bbac-86d3-4497-9e0c-1f8e3803eddb", "uploadUrl": "http://example.com", "expiresInSeconds": -9007199254740991}