Upload Computer Attachment
Upload raw bytes into /attachments and return the same FileInfo as the file list.
Call Create computer first and replace cmp_123 with its returned ID.
/agent/v1/computers/{computer_id}/attachments● SupportedRequest parameters
computer_idstring必填path: Computer id (cmp_...), as returned by computers.create or computers.list.
namestring必填query: Single filename, at most 255 UTF-8 bytes, excluding slash, dot segments and control characters.
Returns
201
Own-face superset: Managed Agents has no persistent Computer attachment directory. User uploads overwrite the same name; agents retain read-only access. Run-token uploads return 403 READ_ONLY. name is one filename of at most 255 UTF-8 bytes; MIME is inferred from the extension; custom Content-Type is not persisted and digest may be absent. Limit 16 MiB (413); invalid names return 400. Archived computers accept uploads; foreign computers return 404.
Errors follow the Anthropic error format (type / message / request_id) — see error codes
Response
HTTP 201
Computer result
application/json
| Name | Type | Description |
|---|---|---|
| path | string | Absolute path of the entry on the computer. |
| name | string | Name of the entry or object. |
| type | string | Kind of entry: a file, a directory or a symbolic link. |
| size | integer | Size in bytes. |
| mime_type | string | MIME type of the file. |
| read_only | boolean | True when the entry cannot be modified through the API. |
| digest | string | null | Content digest of the file; null when not computed. |
| updated_at | string | null | RFC 3339 time at which the object was last modified. |