Upload attachment
POST
/v1/attachments/uploadUpload a base64-encoded attachment into the authenticated user's computer workspace and return an ACP attachment descriptor.
How to call this endpoint
Every ACP API request uses bearer authentication. The examples here show the actual request path, auth header, and body shape that the platform expects.
Path, query, and header parameters
These parameters control which ACP object the endpoint acts on and how the request is processed.
Path parameters
None.
Query parameters
None.
Body schema
Content type: application/json · Required
| Field | Type | Required | Description |
|---|---|---|---|
| filename | string | Yes | — |
| mimeType | string | Yes | — |
| data | string | Yes | Base64-encoded file contents. |
| threadId | string | No | Thread ID. |
| environmentId | string | No | Computer ID. |
| folder | string | No | — |
What the API returns
Each response code below includes the documented payload shape for the ACP API.
201Attachment uploadedapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| attachment | object | No | — |
| attachment.id | string | No | Unique identifier. |
| attachment.filename | string | No | — |
| attachment.mimeType | string | No | — |
| attachment.size | integer | No | — |
| attachment.type | image | document | No | — |
| attachment.gcsPath | string | No | — |
| attachment.url | string | No | — |
| attachment.uploadedAt | string | No | — |
| attachment.workspacePath | string | No | — |
| attachment.environmentId | string | No | Computer ID. |