---
title: "Delete one file from a session's artifact directory and return the session with its refreshed artifact list"
method: DELETE
path: "/api/v1/sessions/{sessionId}/artifact-files"
tags: ["sessions"]
---

# Delete one file from a session's artifact directory and return the session with its refreshed artifact list

`DELETE /api/v1/sessions/{sessionId}/artifact-files`

## Request

- Base URL: `http://127.0.0.1:3001`
- URL: `http://127.0.0.1:3001/api/v1/sessions/{sessionId}/artifact-files`
- Auth: none declared

## Path parameters

- `sessionId` string, required: Session identifier, e.g. project-1.

## Query parameters

- `path` string: Artifact-directory-relative file path, as listed in the session's artifactFiles.

## Response `200`

OK

- SessionResponse
  - `session` ControllersSessionView, required
    - `activity` DomainActivity, required
      - `lastActivityAt` string, date-time, required
      - `state` string, required
    - `artifactFiles` SessionArtifact[]
      - `inlineUrl` string
      - `kind` 'html' | 'markdown' | 'file', required
      - `name` string, required
      - `path` string, required
      - `previewUrl` string
      - `rawUrl` string
      - `size` integer, required
      - `updatedAt` string, date-time, required
    - `autoInjectCI` boolean, required
    - `autoInjectReview` boolean, required
    - `autoReviewEnabled` boolean, required
    - `branch` string
    - `branchNaming` boolean
    - `branchState` SessionBranchState
      - `commits` integer, required
      - `remoteBranch` string
      - `unpushed` integer, required
    - `chatProviderPreserved` boolean, required
    - `createdAt` string, date-time, required
    - `displayName` string
    - `displayStatus` 'Working' | 'Blocked' | 'Exited' | 'No signal' | 'Interrupted' | 'Awaiting PR' | 'Fixing CI failures' | 'Addressing comments' | 'Needs review' | 'Review scheduled' | 'Reviewing' | 'Review failed' | 'Review pending' | 'Draft' | 'CI failing' | 'Commented' | 'Changes requested' | 'Needs human review' | 'Mergeable' | 'Approved' | 'Merged' | 'Closed without merge' | 'Terminated', required
    - `harness` string
    - `hibernatedAt` string, date-time, nullable
    - `id` string, required
    - `isPinned` boolean, required
    - `isTerminated` boolean, required
    - `issueId` string
    - `kanbanColumn` 'building' | 'validating' | 'needs_review' | 'ready' | 'archive', required
    - `kind` string, required
    - `lastEventAt` string, date-time, required
    - `lastInteractionAt` string, date-time, nullable
    - `lastUserMessageAt` string, date-time, nullable
    - `mode` 'chat' | 'tui', required
    - `model` string
    - `outputType` 'none' | 'pr' | 'artifact' | 'pr_artifact', required
    - `pinnedAt` string, date-time, nullable
    - `previewRevision` integer
    - `previewUrl` string
    - `projectId` string
    - `provisionError` string
    - `provisionState` 'provisioning' | 'ready' | 'failed'
    - `provisionSteps` SessionProvisionStep[]
      - `endedAt` string, date-time, nullable
      - `id` 'fetch' | 'worktree' | 'setup' | 'agent', required
      - `startedAt` string, date-time, nullable
      - `status` 'pending' | 'running' | 'done', required
    - `prs` SessionPRFacts[], required
      - `ci` 'unknown' | 'pending' | 'passing' | 'failing', required
      - `mergeability` 'unknown' | 'mergeable' | 'conflicting' | 'blocked' | 'unstable', required
      - `number` integer, required
      - `review` 'none' | 'approved' | 'changes_requested' | 'review_required', required
      - `reviewComments` boolean, required
      - `state` 'draft' | 'open' | 'merged' | 'closed', required
      - `updatedAt` string, date-time, required
      - `url` string, required
    - `requestedOutput` 'artifact'
    - `reviewerConfig` AgentConfig
      - `effort` string
      - `mode` string
      - `model` string
      - `permissions` string
    - `reviewerHarness` 'claude-code' | 'codex' | 'copilot' | 'cursor' | 'kilocode' | 'opencode' | 'opencode-v2' | 'kiro' | 'pi' | 'agy' | 'devin' | 'droid' | 'kimi' | 'kimchi' | 'muse' | 'amp' | 'aider' | 'grok' | 'crush' | 'auggie' | 'cline' | 'autohand'
    - `scmStatus` 'pr_open' | 'draft' | 'ci_failed' | 'review_pending' | 'changes_requested' | 'commented' | 'approved' | 'mergeable' | 'merged'
    - `staleBinary` SessionStaleBinary
      - `since` string, date-time, required
      - `switchFailedAt` string, date-time, nullable
      - `version` string, required: Harness release now installed; the session moves to it on its next launch.
    - `status` 'working' | 'pr_open' | 'draft' | 'ci_failed' | 'review_pending' | 'changes_requested' | 'commented' | 'approved' | 'mergeable' | 'merged' | 'needs_input' | 'exited' | 'idle' | 'terminated' | 'no_signal', required
    - `statusReadiness` 'checking' | 'ready' | 'unavailable', required
    - `terminalGeneration` string
    - `terminalHandleId` string
    - `terminateOnPrMerge` boolean, required
    - `updatedAt` string, date-time, required
    - `workspaceCleanup` 'pending' | 'removed' | 'preserved_dirty' | 'failed' | 'not_applicable'

## Other responses

- `404`: Not Found
- `500`: Internal Server Error
- `501`: Not Implemented

## Changes

- **2026-10-23** `4bc07ee6043b`: 1 info
  - added the optional property `session/branchNaming` to the response with the `200` status
- **2026-10-21** `8f160e6183cd`: 1 warning, 3 info
  - removed the optional property `session/activeAgentSwitch` from the response with the `200` status
  - removed the `agent_switch_saga` enum value from the `reporting_owner` response property for the response status `404`
  - removed the `agent_switch_saga` enum value from the `reporting_owner` response property for the response status `500`
  - removed the `agent_switch_saga` enum value from the `reporting_owner` response property for the response status `501`
- **2026-10-21** `9b5e02721b77`: 1 warning
  - added the new `Interrupted` enum value to the `session/displayStatus` response property for the response status `200`
- **2026-10-19** `f6d1ae4671f5`: 1 info
  - added the optional property `session/staleBinary` to the response with the `200` status
- **2026-10-14** `b84e4c462bf4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/changes/api/v1/sessions/:sessionId/artifact-files/delete.md)

---

[API](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon.md) - [All operations](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/llms.txt) - [OpenAPI document](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/revisions/61d7efd08578?raw)
