# Remove a work session `DELETE /api/v1/coaches/{coach_id}/work-sessions/{session_id}` Removes a work session from reports and totals while retaining its history. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Coaches → Write**. ## Headers - `X-Sport-Id` (integer, required) — The sport ID from [List sports](/api/sports/list.md). Use the sport the record belongs to. ## Path parameters - `coach_id` (integer, required) — ID of the coach in the selected sport. - `session_id` (integer, required) — ID of the work session. ## Body parameters - `request_id` (string, required) — Unique request ID, 16–64 letters, digits, hyphens, or underscores. Reuse it for an identical retry. - `version` (integer, required) — Current session version from the report. - `reason` (string, required) — Reason for the change, up to 1,000 characters. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request DELETE \ --url "https://api.asdincloud.com/api/v1/coaches/${COACH_ID:?Set COACH_ID}/work-sessions/${SESSION_ID:?Set SESSION_ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "X-Sport-Id: ${SPORT_ID:?Set SPORT_ID}" \ --header "Content-Type: application/json" \ --data '{"version":2,"request_id":"example-work-session-remove-01","reason":"Duplicate entry."}' ``` ## Response **200 OK** Returns the removed session with a deletion timestamp and new version. Example with fictional data and selected fields. ```json { "id": 38, "staff_id": 21, "sport_id": 3, "started_at": "2026-11-12T16:00:00Z", "ended_at": "2026-11-12T18:00:00Z", "source": "manual", "corrected": true, "version": 3, "duration_seconds": 7200, "created_at": "2026-11-13T09:00:00Z", "updated_at": "2026-11-13T09:00:00Z", "deleted_at": "2026-11-14T12:00:00Z" } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `404` — The requested record was not found. - `422` — The request or date interval is invalid. - `503` — Work sessions are temporarily unavailable. - `409` — The session version is stale, the times overlap, or the request ID was previously used with different values.