# DELETE /api/v1/time-entries/{time_entry_id}

> Delete time entry

- **Tag:** time-entries
- **Operation ID:** `delete_time_entry_api_v1_time_entries__time_entry_id__delete`

## Description

Soft-delete (deactivate) a time entry.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `time_entry_id` (path, string, required)

## Responses

### 200 — Successful Response

Schema: `TimeEntryResponse`

- `id` (string · required)
- `business_id` (string · required)
- `entry_date` (string · date · required)
- `duration_minutes` (integer · required)
- `description` (string)
- `person_name` (string)
- `customer_id` (string)
- `customer_name` (string)
- `project_id` (string)
- `project_name` (string)
- `catalog_item_id` (string)
- `billable` (boolean · required)
- `rate_cents` (integer)
- `billable_amount` (integer) — Computed billable amount in cents.
- `status` (string · required)
- `invoice_id` (string)
- `is_active` (boolean · required)
- `created_at` (string · date-time · required)
- `updated_at` (string · date-time · required)

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X DELETE 'https://api.ondayzero.com/api/v1/time-entries/{time_entry_id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/time-entries/{time_entry_id}', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.delete("https://api.ondayzero.com/api/v1/time-entries/{time_entry_id}", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/time-entries/delete-time-entry
- OpenAPI slice: https://www.ondayzero.com/docs/reference/time-entries/delete-time-entry/openapi.json
- Other endpoints in **time-entries**: https://www.ondayzero.com/docs/reference/time-entries
