Upload a file
Multipart form with fields `session_id`, `filename`, `content_type`, and `file`. The bytes land in the account's Computer workspace under `uploads/` — the agent reads them back with its `computer_file_*` tools, and you download them again with `GET /v1/files/{file_id}/content`. The file is registered against the session it was uploaded to, so it is only reachable (and only readable by an agent working that chat) through a session the key's account owns.
Multipart form with fields session_id, filename, content_type, and file. The bytes land
in the account's Computer workspace under uploads/ — the agent reads them back with its
computer_file_* tools, and you download them again with GET /v1/files/{file_id}/content.
The file is registered against the session it was uploaded to, so it is only reachable (and only readable by an agent working that chat) through a session the key's account owns.
Authorization
api_key files:writeAn atk_-prefixed API key, created under Settings → API keys.
In: header
Scope: files:write
Request Body
multipart/form-data
Fields: session_id, filename, content_type, file
TypeScript Definitions
Use the request body type in TypeScript.
Multipart fields of POST /v1/files. The file part carries the raw bytes; the other three
are plain text form fields. Documented as an object schema so the docs' cURL examples render
one -F flag per field — a bare type: string body breaks the multipart example generator.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/files" \ -F content_type="string" \ -F file="string" \ -F filename="string" \ -F session_id="1ffd059c-17ea-40a8-8aef-70fd0307db82"{ "artifact_key": "string", "changelog": "string", "content_type": "string", "created_at": "2019-08-24T14:15:22Z", "filename": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "string", "path": "string", "pinned": true, "session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82", "size_bytes": 0, "title": "string", "version": 0}Subscribe to account events GET
A live server-sent-event stream of everything happening in the account: artifacts appearing, jobs changing state, chats finishing, kanban card runs settling. This is the intended way to wait for dispatched work rather than polling. Each frame is a JSON object with a `type` discriminator and the new state inline — there is no need to re-read the resource to learn what changed. **The stream is not replayable.** It carries no event ids and ignores `Last-Event-ID`; anything produced while you were disconnected is not redelivered. On reconnect, re-read whatever you care about (`GET /v1/jobs`, `GET /v1/sessions/{id}/artifacts`) and carry on from there. Treat it as a latency optimization over polling, not as a durable log.
Get file metadata GET
다음