---
title: "Delete an uploaded context (bytes removed; irreversible)"
method: DELETE
path: "/preview/contexts/{id}"
tags: ["contexts"]
---

# Delete an uploaded context (bytes removed; irreversible)

`DELETE /preview/contexts/{id}`

## Request

- Base URL: `https://autoresearch.sfcompute.com`
- URL: `https://autoresearch.sfcompute.com/preview/contexts/{id}`
- Auth: HTTP bearer

Delete an uploaded context: the stored bytes are removed and no download url is ever minted for it again. These are bytes YOU uploaded, in your own workspace - no other tenant's upload is reachable from here. Use this when an upload should not sit out its ~30-day lifecycle - the wrong folder, bytes you are not licensed to store with us, a session you are cleaning up. IRREVERSIBLE; re-uploading means create_context again. Refuses while a non-terminal job still needs the bytes (the refusal names the jobs - cancel_job them or let them finish). Idempotent: deleting twice succeeds. get_context then answers {status: "deleted", deleted_at} and gains `bytes_deleted_at` once the store confirms removal, so you can verify the purge rather than take our word for it. SCOPE, stated plainly: this deletes the uploaded context ONLY. Images already built from it are separate objects and are NOT deleted here (the registry has no delete verb today), job build/run logs and artifacts live out their own 30-day lifecycle, and the audit record of the upload and this deletion is retained.

## Path parameters

- `id` string, required: Context id from create_context (e.g. "ctx-5rq8d").

## Query parameters

- `workspace` string

## Response `200`

The capability's JSON result.

- Result: The capability's result: the same object the MCP tool returns as structuredContent. Resources carry an `object` type discriminator and an immutable id; money is integer micro-dollars in `*_usd_micros` fields.
  - `object` string: The resource type, when the result is one resource.

## Other responses

- `400`: Malformed request: bad JSON, a parameter that does not parse, or a value outside its range. Code `invalid`.
- `401`: No bearer token, or one this API cannot verify. Code `unauthenticated`.
- `403`: Authenticated, but the token's scopes or the account's role do not reach this operation. The message names the scope word to request. Code `forbidden`.
- `404`: No such route. Code `not_found`; the body names the OpenAPI document.
- `422`: A well-formed request the platform declined: no such node, a cap reached, a state that forbids the move. The message says which, and what to do instead. Code `refused`.
- `429`: Over this door's per-customer budget. Wait `Retry-After` seconds. Code `rate_limited`.
- `500`: Our fault. Retry; if it persists, quote the request-id. Code `internal`.

---

[API](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api.md) · [All operations](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/givemeanode/apis/autoresearch-customer-api/revisions/f88dcb70ac6c?raw)
