Delete a single immutable artifact version without affecting other versions or the original environment file.
Endpoint
DELETE /agents/sessions/{session_id}/artifacts/{artifact_id}
Deletes the specified artifact version. A successful call returns 200 and a delete envelope.
Path parameters
| Field | Required | Type | Description |
|---|---|---|---|
session_id | Yes | string | Session that owns the artifact |
artifact_id | Yes | string | Artifact version ID to delete |
Request example
Response example
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Deleted artifact version ID |
object | string | Artifact deletion result object type, fixed as agent.session.artifact.deleted |
deleted | boolean | Whether deletion succeeded, true on success |
404, and the version no longer appears in lists. Deleting an artifact does not delete the original file in the sandbox or the uploaded source file.
Error codes
| HTTP status | Error type / code | Solution |
|---|---|---|
404 | not_found_error / not_found_error | Use an artifact ID that exists and has not been deleted in the current workspace |
{"error":{"type","code","message","param"}}. Gateway errors can use a different structure.