Task Team API Reference
Generated: 2026-01-05T08:51:47.712Z • Source: OpenAPI

Tip: use browser find (Cmd/Ctrl+F). Swagger UI is at http://localhost:3002/docs.


# Task Team API Reference

> Complete API documentation with examples in HTTP, Node.js, and Python

**Base URL**: `http://localhost:3002`

**API Version**: `1.0.0`

**Generated**: 2026-01-05T08:51:47.709Z

---

## Table of Contents

1. [Activity](#activity)
2. [Analytics](#analytics)
3. [Categories](#categories)
4. [Comments](#comments)
5. [Consumption](#consumption)
6. [Content](#content)
7. [Context](#context)
8. [Custom Fields](#custom-fields)
9. [Dependencies](#dependencies)
10. [Files](#files)
11. [Health](#health)
12. [Journal](#journal)
13. [Life Tracker](#life-tracker)
14. [Notifications](#notifications)
15. [Nutrition](#nutrition)
16. [Observations](#observations)
17. [Other](#other)
18. [Projects](#projects)
19. [Search](#search)
20. [Strategic Planning](#strategic-planning)
21. [Tags](#tags)
22. [Task Recurrence](#task-recurrence)
23. [Task Reminders](#task-reminders)
24. [Tasks](#tasks)
25. [Teams](#teams)
26. [Time Tracking](#time-tracking)
27. [Timers](#timers)
28. [Users](#users)
29. [Webhooks](#webhooks)
30. [Workspaces](#workspaces)

---

## Activity

### GET /v1/workspaces/{workspace_id}/activity

**get /v1/workspaces/{workspace_id}/activity**

Get workspace activity feed

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `types`: Comma-separated: task,project,comment,delegation - (optional)
- `user_id`: string - (optional)
- `since`: string - (optional)
- `limit`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/activity" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/activity', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/activity'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/activity-events

**get /v1/workspaces/{workspace_id}/activity-events**

List activity events for a workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `limit`: integer - (optional)
- `offset`: integer - (optional)
- `type`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/activity-events" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/activity-events', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/activity-events'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Analytics

### GET /v1/workspaces/{workspace_id}/time-entries/summary

**get /v1/workspaces/{workspace_id}/time-entries/summary**

Get time entry analytics summary

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/summary" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/summary', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/summary'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/analytics

**get /v1/workspaces/{workspace_id}/analytics**

Get workspace-level analytics and stats

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `start_date`: string - (optional)
- `end_date`: string - (optional)
- `group_by`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/analytics" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/analytics', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/analytics'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/users/{user_id}/productivity

**get /v1/workspaces/{workspace_id}/users/{user_id}/productivity**

Get user productivity metrics

**Path Parameters:**

- `workspace_id`: string - (required)
- `user_id`: string - (required)

**Query Parameters:**

- `start_date`: string - (optional)
- `end_date`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/users/USER_ID/productivity" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/users/USER_ID/productivity', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/users/USER_ID/productivity'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/projects/{project_id}/stats

**get /v1/workspaces/{workspace_id}/projects/{project_id}/stats**

Get project statistics

**Path Parameters:**

- `workspace_id`: string - (required)
- `project_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID/stats" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID/stats', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID/stats'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Categories

### GET /v1/workspaces/{workspace_id}/time-categories

**get /v1/workspaces/{workspace_id}/time-categories**

List time categories (workspace and/or personal)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/time-categories

**post /v1/workspaces/{workspace_id}/time-categories**

Create a time category

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

## Comments

### GET /v1/workspaces/{workspace_id}/tasks/{task_id}/comments

**get /v1/workspaces/{workspace_id}/tasks/{task_id}/comments**

List all comments for a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Query Parameters:**

- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/comments" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/comments', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/comments'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/comments

**post /v1/workspaces/{workspace_id}/comments**

Create a comment on a task

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "task_id": "string",
  "content": "string",
  "mentions": []
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/comments" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "task_id": "string",
  "content": "string",
  "mentions": []
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/comments', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "task_id": "string",
  "content": "string",
  "mentions": []
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/comments'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "task_id": "string",
  "content": "string",
  "mentions": []
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/comments/{comment_id}

**patch /v1/workspaces/{workspace_id}/comments/{comment_id}**

Update comment content

**Path Parameters:**

- `workspace_id`: string - (required)
- `comment_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/comments/COMMENT_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/comments/COMMENT_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/comments/COMMENT_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/comments/{comment_id}

**delete /v1/workspaces/{workspace_id}/comments/{comment_id}**

Soft delete comment

**Path Parameters:**

- `workspace_id`: string - (required)
- `comment_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/comments/COMMENT_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/comments/COMMENT_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/comments/COMMENT_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/mentions

**get /v1/workspaces/{workspace_id}/mentions**

List mentions for current user

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `status`: string - (optional)
- `limit`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/mentions" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/mentions', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/mentions'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/mentions/read

**post /v1/workspaces/{workspace_id}/mentions/read**

Mark mentions as read

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "mention_ids": [],
  "mark_all": false
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/mentions/read" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "mention_ids": [],
  "mark_all": false
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/mentions/read', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "mention_ids": [],
  "mark_all": false
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/mentions/read'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "mention_ids": [],
  "mark_all": false
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

## Consumption

### GET /v1/workspaces/{workspace_id}/consumption

**get /v1/workspaces/{workspace_id}/consumption**

List consumption entries in a workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/consumption

**post /v1/workspaces/{workspace_id}/consumption**

Create a new consumption entry

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/consumption/{id}

**patch /v1/workspaces/{workspace_id}/consumption/{id}**

Update a consumption entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/consumption/{id}

**delete /v1/workspaces/{workspace_id}/consumption/{id}**

Delete a consumption entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

## Content

### GET /v1/workspaces/{workspace_id}/content-search

**get /v1/workspaces/{workspace_id}/content-search**

Search for movies (TMDB), TV shows (TVMaze), or books (Open Library)

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `q`: Search query - (required)
- `type`: Content type to search - (optional)
- `limit`: number - (optional)
- `page`: number - (optional)
- `year`: Filter by release/publish year - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-search/details

**get /v1/workspaces/{workspace_id}/content-search/details**

Get detailed information for a specific movie, TV show, or book

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (required)
- `id`: External ID (TMDB ID, TVMaze ID, or Open Library work ID) - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/details" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/details', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/details'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-search/trending

**get /v1/workspaces/{workspace_id}/content-search/trending**

Get trending movies and TV shows

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (optional)
- `timeWindow`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/trending" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/trending', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/trending'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-search/isbn/{isbn}

**get /v1/workspaces/{workspace_id}/content-search/isbn/{isbn}**

Look up a book by ISBN

**Path Parameters:**

- `workspace_id`: string - (required)
- `isbn`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/isbn/ISBN" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/isbn/ISBN', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/isbn/ISBN'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-items

**get /v1/workspaces/{workspace_id}/content-items**

List user's content library with filters

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (optional)
- `status`: string - (optional)
- `sort`: string - (optional)
- `order`: string - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)
- `favorites_only`: boolean - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/content-items

**post /v1/workspaces/{workspace_id}/content-items**

Add content to user's library

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-items/stats

**get /v1/workspaces/{workspace_id}/content-items/stats**

Get content library statistics

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/stats" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/stats', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/stats'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-items/{id}

**get /v1/workspaces/{workspace_id}/content-items/{id}**

Get a single content item

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/content-items/{id}

**patch /v1/workspaces/{workspace_id}/content-items/{id}**

Update a content item (status, progress, rating, notes)

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/content-items/{id}

**delete /v1/workspaces/{workspace_id}/content-items/{id}**

Remove content from user's library

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/content-items/{id}/favorite

**post /v1/workspaces/{workspace_id}/content-items/{id}/favorite**

Toggle favorite status of a content item

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID/favorite" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID/favorite', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID/favorite'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

## Context

### GET /v1/context

**get /v1/context**

Get current user context - workspaces, projects, teams, tags, permissions, and active timers

**Query Parameters:**

- `include`: Comma-separated: user,workspaces,projects,users,recent_tasks,permissions,preferences,teams,tags,active_timers (default: all) - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/context" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/context', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/context'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

**Response:**

```json
{
  "workspaces": [],
  "projects": [],
  "users": [],
  "teams": [],
  "recent_tasks": [],
  "tags": []
}
```

---

## Custom Fields

### GET /v1/workspaces/{workspace_id}/custom-fields

**get /v1/workspaces/{workspace_id}/custom-fields**

List all custom fields in workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/custom-fields

**post /v1/workspaces/{workspace_id}/custom-fields**

Create a new custom field (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "name": "string",
  "type": "text",
  "options": [],
  "required": false
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "type": "text",
  "options": [],
  "required": false
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "string",
  "type": "text",
  "options": [],
  "required": false
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "name": "string",
  "type": "text",
  "options": [],
  "required": false
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/custom-fields/{field_id}

**get /v1/workspaces/{workspace_id}/custom-fields/{field_id}**

Get custom field details

**Path Parameters:**

- `workspace_id`: string - (required)
- `field_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields/FIELD_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields/FIELD_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields/FIELD_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/custom-fields/{field_id}

**patch /v1/workspaces/{workspace_id}/custom-fields/{field_id}**

Update custom field (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)
- `field_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields/FIELD_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields/FIELD_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields/FIELD_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/custom-fields/{field_id}

**delete /v1/workspaces/{workspace_id}/custom-fields/{field_id}**

Delete custom field and all its values (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)
- `field_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields/FIELD_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields/FIELD_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-fields/FIELD_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/custom-field-values

**post /v1/workspaces/{workspace_id}/custom-field-values**

Set a custom field value for a task or project

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "custom_field_id": "string",
  "entity_type": "task",
  "entity_id": "string"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-field-values" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "custom_field_id": "string",
  "entity_type": "task",
  "entity_id": "string"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-field-values', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "custom_field_id": "string",
  "entity_type": "task",
  "entity_id": "string"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-field-values'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "custom_field_id": "string",
  "entity_type": "task",
  "entity_id": "string"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/custom-field-values

**get /v1/workspaces/{workspace_id}/custom-field-values**

Get custom field values for an entity

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `entity_type`: string - (required)
- `entity_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-field-values" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-field-values', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/custom-field-values'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Dependencies

### GET /v1/workspaces/{workspace_id}/tasks/{task_id}/dependencies

**get /v1/workspaces/{workspace_id}/tasks/{task_id}/dependencies**

List all dependencies for a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/dependencies" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/dependencies', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/dependencies'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/dependencies

**post /v1/workspaces/{workspace_id}/dependencies**

Create a task dependency relationship

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "task_id": "string",
  "depends_on_task_id": "string",
  "type": "blocks"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/dependencies" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "task_id": "string",
  "depends_on_task_id": "string",
  "type": "blocks"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/dependencies', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "task_id": "string",
  "depends_on_task_id": "string",
  "type": "blocks"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/dependencies'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "task_id": "string",
  "depends_on_task_id": "string",
  "type": "blocks"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/dependencies/{dependency_id}

**delete /v1/workspaces/{workspace_id}/dependencies/{dependency_id}**

Remove a task dependency

**Path Parameters:**

- `workspace_id`: string - (required)
- `dependency_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/dependencies/DEPENDENCY_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/dependencies/DEPENDENCY_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/dependencies/DEPENDENCY_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

## Files

### GET /v1/workspaces/{workspace_id}/files

**get /v1/workspaces/{workspace_id}/files**

List files in workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `task_id`: string - (optional)
- `mime_type`: string - (optional)
- `search`: string - (optional)
- `limit`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/files" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/files', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/files'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/files/{file_id}

**get /v1/workspaces/{workspace_id}/files/{file_id}**

Get file metadata

**Path Parameters:**

- `workspace_id`: string - (required)
- `file_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/FILE_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/FILE_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/FILE_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/files/{file_id}

**delete /v1/workspaces/{workspace_id}/files/{file_id}**

Delete file and remove from storage

**Path Parameters:**

- `workspace_id`: string - (required)
- `file_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/FILE_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/FILE_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/FILE_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/files/{file_id}/download

**get /v1/workspaces/{workspace_id}/files/{file_id}/download**

Get signed download URL for file

**Path Parameters:**

- `workspace_id`: string - (required)
- `file_id`: string - (required)

**Query Parameters:**

- `expires_in`: URL expiry in seconds - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/FILE_ID/download" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/FILE_ID/download', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/FILE_ID/download'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/tasks/{task_id}/attachments

**post /v1/workspaces/{workspace_id}/tasks/{task_id}/attachments**

Attach an existing file to a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Request Body:**

```json
{
  "file_id": "string"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/attachments" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "file_id": "string"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/attachments', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "file_id": "string"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/attachments'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "file_id": "string"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/tasks/{task_id}/attachments

**get /v1/workspaces/{workspace_id}/tasks/{task_id}/attachments**

List all files attached to a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/attachments" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/attachments', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/attachments'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/files/upload

**post /v1/workspaces/{workspace_id}/files/upload**

Upload a file to workspace storage and create metadata record

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/upload" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/upload', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/files/upload'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

## Health

### GET /v1/workspaces/{workspace_id}/health/substances

**get /v1/workspaces/{workspace_id}/health/substances**

List substance/medicine logs

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `category`: string - (optional)
- `date`: string - (optional)
- `start_date`: string - (optional)
- `end_date`: string - (optional)
- `is_recurring`: boolean - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/substances

**post /v1/workspaces/{workspace_id}/health/substances**

Log a substance intake

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/substances/recurring

**get /v1/workspaces/{workspace_id}/health/substances/recurring**

Get recurring substances for quick-add

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/recurring" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/recurring', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/recurring'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/substances/today

**get /v1/workspaces/{workspace_id}/health/substances/today**

Get today's substance logs

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/today" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/today', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/today'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/substances/quick-add

**post /v1/workspaces/{workspace_id}/health/substances/quick-add**

Quick-add a recurring substance (copy from template)

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "name": "string",
  "category": "string",
  "dosage": "string"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/quick-add" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "category": "string",
  "dosage": "string"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/quick-add', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "string",
  "category": "string",
  "dosage": "string"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/quick-add'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "name": "string",
  "category": "string",
  "dosage": "string"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/health/substances/{id}

**patch /v1/workspaces/{workspace_id}/health/substances/{id}**

Update a substance log

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/health/substances/{id}

**delete /v1/workspaces/{workspace_id}/health/substances/{id}**

Delete a substance log

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/substances/stats

**get /v1/workspaces/{workspace_id}/health/substances/stats**

Get substance tracking statistics

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `period`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/stats" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/stats', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/stats'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/metrics

**get /v1/workspaces/{workspace_id}/health/metrics**

List health metrics with filters

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (optional)
- `start_date`: string - (optional)
- `end_date`: string - (optional)
- `period`: string - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/metrics

**post /v1/workspaces/{workspace_id}/health/metrics**

Record a health metric

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/metrics/latest

**get /v1/workspaces/{workspace_id}/health/metrics/latest**

Get latest value for each metric type

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/latest" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/latest', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/latest'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/metrics/{type}/history

**get /v1/workspaces/{workspace_id}/health/metrics/{type}/history**

Get metric history for charts

**Path Parameters:**

- `workspace_id`: string - (required)
- `type`: string - (required)

**Query Parameters:**

- `period`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/TYPE/history" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/TYPE/history', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/TYPE/history'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/metrics/weight

**post /v1/workspaces/{workspace_id}/health/metrics/weight**

Quick log weight

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "value": 0,
  "unit": "kg"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/weight" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "value": 0,
  "unit": "kg"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/weight', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "value": 0,
  "unit": "kg"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/weight'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "value": 0,
  "unit": "kg"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/metrics/blood-pressure

**post /v1/workspaces/{workspace_id}/health/metrics/blood-pressure**

Quick log blood pressure

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "systolic": 0,
  "diastolic": 0
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/blood-pressure" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "systolic": 0,
  "diastolic": 0
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/blood-pressure', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "systolic": 0,
  "diastolic": 0
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/blood-pressure'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "systolic": 0,
  "diastolic": 0
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/health/metrics/{id}

**delete /v1/workspaces/{workspace_id}/health/metrics/{id}**

Delete a health metric

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/documents

**get /v1/workspaces/{workspace_id}/health/documents**

List health documents

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (optional)
- `search`: string - (optional)
- `start_date`: string - (optional)
- `end_date`: string - (optional)
- `provider`: string - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/documents

**post /v1/workspaces/{workspace_id}/health/documents**

Upload a health document

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/documents/{id}

**get /v1/workspaces/{workspace_id}/health/documents/{id}**

Get a health document

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/health/documents/{id}

**patch /v1/workspaces/{workspace_id}/health/documents/{id}**

Update a health document metadata

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/health/documents/{id}

**delete /v1/workspaces/{workspace_id}/health/documents/{id}**

Delete a health document

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/documents/{id}/download

**get /v1/workspaces/{workspace_id}/health/documents/{id}/download**

Get signed download URL for document

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID/download" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID/download', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID/download'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/documents/stats

**get /v1/workspaces/{workspace_id}/health/documents/stats**

Get health document statistics

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/stats" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/stats', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/stats'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Journal

### GET /v1/workspaces/{workspace_id}/journal

**get /v1/workspaces/{workspace_id}/journal**

List journal entries

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `start_date`: string - (optional)
- `end_date`: string - (optional)
- `pinned_only`: boolean - (optional)
- `has_content`: boolean - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/journal

**post /v1/workspaces/{workspace_id}/journal**

Create a journal entry for a date

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/journal/today

**get /v1/workspaces/{workspace_id}/journal/today**

Get today's journal entry (creates if doesn't exist)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/today" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/today', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/today'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/journal/date/{date}

**get /v1/workspaces/{workspace_id}/journal/date/{date}**

Get journal entry for a specific date

**Path Parameters:**

- `workspace_id`: string - (required)
- `date`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PUT /v1/workspaces/{workspace_id}/journal/date/{date}

**put /v1/workspaces/{workspace_id}/journal/date/{date}**

Create or update journal entry for a date

**Path Parameters:**

- `workspace_id`: string - (required)
- `date`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X put "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE', {
  method: 'put',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.put(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/journal/{id}

**get /v1/workspaces/{workspace_id}/journal/{id}**

Get a journal entry by ID

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/journal/{id}

**patch /v1/workspaces/{workspace_id}/journal/{id}**

Update a journal entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/journal/{id}

**delete /v1/workspaces/{workspace_id}/journal/{id}**

Delete a journal entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/journal/stats

**get /v1/workspaces/{workspace_id}/journal/stats**

Get journal statistics (streak, total entries, etc.)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/stats" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/stats', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/stats'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Life Tracker

### GET /v1/workspaces/{workspace_id}/consumption

**get /v1/workspaces/{workspace_id}/consumption**

List consumption entries in a workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/consumption

**post /v1/workspaces/{workspace_id}/consumption**

Create a new consumption entry

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/consumption/{id}

**patch /v1/workspaces/{workspace_id}/consumption/{id}**

Update a consumption entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/consumption/{id}

**delete /v1/workspaces/{workspace_id}/consumption/{id}**

Delete a consumption entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/consumption/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/nutrition-goals

**get /v1/workspaces/{workspace_id}/nutrition-goals**

Get user's nutrition goals for a workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

**Response:**

```json
{}
```

---

### PUT /v1/workspaces/{workspace_id}/nutrition-goals

**put /v1/workspaces/{workspace_id}/nutrition-goals**

Update user's nutrition goals

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X put "http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals', {
  method: 'put',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.put(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/nutrition-summary

**get /v1/workspaces/{workspace_id}/nutrition-summary**

Get nutrition summary for a specific date

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `date`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/nutrition-summary/range

**get /v1/workspaces/{workspace_id}/nutrition-summary/range**

Get nutrition summary for a date range

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `start`: string - (required)
- `end`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary/range" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary/range', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary/range'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/food-search

**get /v1/workspaces/{workspace_id}/food-search**

Search for foods across saved items and Open Food Facts

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `q`: Search query - (optional)
- `barcode`: Search by barcode - (optional)
- `source`: string - (optional)
- `limit`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-search" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-search', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-search'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/food-items

**get /v1/workspaces/{workspace_id}/food-items**

List saved food items

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `favorites_only`: boolean - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/food-items

**post /v1/workspaces/{workspace_id}/food-items**

Save a new food item

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/food-items/favorites

**get /v1/workspaces/{workspace_id}/food-items/favorites**

Get favorite food items for quick-add

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/favorites" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/favorites', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/favorites'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/food-items/recent

**get /v1/workspaces/{workspace_id}/food-items/recent**

Get recently used food items

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/recent" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/recent', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/recent'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/food-items/{id}

**patch /v1/workspaces/{workspace_id}/food-items/{id}**

Update a food item

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/food-items/{id}

**delete /v1/workspaces/{workspace_id}/food-items/{id}**

Delete a food item

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/food-items/{id}/increment-use

**patch /v1/workspaces/{workspace_id}/food-items/{id}/increment-use**

Increment use count when food is logged

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID/increment-use" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID/increment-use', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID/increment-use'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-search

**get /v1/workspaces/{workspace_id}/content-search**

Search for movies (TMDB), TV shows (TVMaze), or books (Open Library)

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `q`: Search query - (required)
- `type`: Content type to search - (optional)
- `limit`: number - (optional)
- `page`: number - (optional)
- `year`: Filter by release/publish year - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-search/details

**get /v1/workspaces/{workspace_id}/content-search/details**

Get detailed information for a specific movie, TV show, or book

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (required)
- `id`: External ID (TMDB ID, TVMaze ID, or Open Library work ID) - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/details" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/details', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/details'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-search/trending

**get /v1/workspaces/{workspace_id}/content-search/trending**

Get trending movies and TV shows

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (optional)
- `timeWindow`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/trending" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/trending', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/trending'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-search/isbn/{isbn}

**get /v1/workspaces/{workspace_id}/content-search/isbn/{isbn}**

Look up a book by ISBN

**Path Parameters:**

- `workspace_id`: string - (required)
- `isbn`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/isbn/ISBN" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/isbn/ISBN', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-search/isbn/ISBN'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-items

**get /v1/workspaces/{workspace_id}/content-items**

List user's content library with filters

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (optional)
- `status`: string - (optional)
- `sort`: string - (optional)
- `order`: string - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)
- `favorites_only`: boolean - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/content-items

**post /v1/workspaces/{workspace_id}/content-items**

Add content to user's library

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-items/stats

**get /v1/workspaces/{workspace_id}/content-items/stats**

Get content library statistics

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/stats" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/stats', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/stats'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/content-items/{id}

**get /v1/workspaces/{workspace_id}/content-items/{id}**

Get a single content item

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/content-items/{id}

**patch /v1/workspaces/{workspace_id}/content-items/{id}**

Update a content item (status, progress, rating, notes)

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/content-items/{id}

**delete /v1/workspaces/{workspace_id}/content-items/{id}**

Remove content from user's library

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/content-items/{id}/favorite

**post /v1/workspaces/{workspace_id}/content-items/{id}/favorite**

Toggle favorite status of a content item

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID/favorite" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID/favorite', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/content-items/ID/favorite'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/journal

**get /v1/workspaces/{workspace_id}/journal**

List journal entries

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `start_date`: string - (optional)
- `end_date`: string - (optional)
- `pinned_only`: boolean - (optional)
- `has_content`: boolean - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/journal

**post /v1/workspaces/{workspace_id}/journal**

Create a journal entry for a date

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/journal/today

**get /v1/workspaces/{workspace_id}/journal/today**

Get today's journal entry (creates if doesn't exist)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/today" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/today', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/today'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/journal/date/{date}

**get /v1/workspaces/{workspace_id}/journal/date/{date}**

Get journal entry for a specific date

**Path Parameters:**

- `workspace_id`: string - (required)
- `date`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PUT /v1/workspaces/{workspace_id}/journal/date/{date}

**put /v1/workspaces/{workspace_id}/journal/date/{date}**

Create or update journal entry for a date

**Path Parameters:**

- `workspace_id`: string - (required)
- `date`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X put "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE', {
  method: 'put',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/date/DATE'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.put(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/journal/{id}

**get /v1/workspaces/{workspace_id}/journal/{id}**

Get a journal entry by ID

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/journal/{id}

**patch /v1/workspaces/{workspace_id}/journal/{id}**

Update a journal entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/journal/{id}

**delete /v1/workspaces/{workspace_id}/journal/{id}**

Delete a journal entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/journal/stats

**get /v1/workspaces/{workspace_id}/journal/stats**

Get journal statistics (streak, total entries, etc.)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/stats" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/stats', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/journal/stats'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/substances

**get /v1/workspaces/{workspace_id}/health/substances**

List substance/medicine logs

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `category`: string - (optional)
- `date`: string - (optional)
- `start_date`: string - (optional)
- `end_date`: string - (optional)
- `is_recurring`: boolean - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/substances

**post /v1/workspaces/{workspace_id}/health/substances**

Log a substance intake

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/substances/recurring

**get /v1/workspaces/{workspace_id}/health/substances/recurring**

Get recurring substances for quick-add

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/recurring" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/recurring', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/recurring'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/substances/today

**get /v1/workspaces/{workspace_id}/health/substances/today**

Get today's substance logs

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/today" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/today', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/today'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/substances/quick-add

**post /v1/workspaces/{workspace_id}/health/substances/quick-add**

Quick-add a recurring substance (copy from template)

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "name": "string",
  "category": "string",
  "dosage": "string"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/quick-add" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "category": "string",
  "dosage": "string"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/quick-add', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "string",
  "category": "string",
  "dosage": "string"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/quick-add'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "name": "string",
  "category": "string",
  "dosage": "string"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/health/substances/{id}

**patch /v1/workspaces/{workspace_id}/health/substances/{id}**

Update a substance log

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/health/substances/{id}

**delete /v1/workspaces/{workspace_id}/health/substances/{id}**

Delete a substance log

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/substances/stats

**get /v1/workspaces/{workspace_id}/health/substances/stats**

Get substance tracking statistics

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `period`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/stats" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/stats', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/substances/stats'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/metrics

**get /v1/workspaces/{workspace_id}/health/metrics**

List health metrics with filters

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (optional)
- `start_date`: string - (optional)
- `end_date`: string - (optional)
- `period`: string - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/metrics

**post /v1/workspaces/{workspace_id}/health/metrics**

Record a health metric

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/metrics/latest

**get /v1/workspaces/{workspace_id}/health/metrics/latest**

Get latest value for each metric type

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/latest" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/latest', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/latest'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/metrics/{type}/history

**get /v1/workspaces/{workspace_id}/health/metrics/{type}/history**

Get metric history for charts

**Path Parameters:**

- `workspace_id`: string - (required)
- `type`: string - (required)

**Query Parameters:**

- `period`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/TYPE/history" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/TYPE/history', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/TYPE/history'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/metrics/weight

**post /v1/workspaces/{workspace_id}/health/metrics/weight**

Quick log weight

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "value": 0,
  "unit": "kg"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/weight" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "value": 0,
  "unit": "kg"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/weight', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "value": 0,
  "unit": "kg"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/weight'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "value": 0,
  "unit": "kg"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/metrics/blood-pressure

**post /v1/workspaces/{workspace_id}/health/metrics/blood-pressure**

Quick log blood pressure

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "systolic": 0,
  "diastolic": 0
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/blood-pressure" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "systolic": 0,
  "diastolic": 0
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/blood-pressure', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "systolic": 0,
  "diastolic": 0
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/blood-pressure'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "systolic": 0,
  "diastolic": 0
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/health/metrics/{id}

**delete /v1/workspaces/{workspace_id}/health/metrics/{id}**

Delete a health metric

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/metrics/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/documents

**get /v1/workspaces/{workspace_id}/health/documents**

List health documents

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (optional)
- `search`: string - (optional)
- `start_date`: string - (optional)
- `end_date`: string - (optional)
- `provider`: string - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/health/documents

**post /v1/workspaces/{workspace_id}/health/documents**

Upload a health document

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/documents/{id}

**get /v1/workspaces/{workspace_id}/health/documents/{id}**

Get a health document

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/health/documents/{id}

**patch /v1/workspaces/{workspace_id}/health/documents/{id}**

Update a health document metadata

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/health/documents/{id}

**delete /v1/workspaces/{workspace_id}/health/documents/{id}**

Delete a health document

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/documents/{id}/download

**get /v1/workspaces/{workspace_id}/health/documents/{id}/download**

Get signed download URL for document

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID/download" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID/download', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/ID/download'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/health/documents/stats

**get /v1/workspaces/{workspace_id}/health/documents/stats**

Get health document statistics

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/stats" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/stats', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/health/documents/stats'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Notifications

### GET /v1/workspaces/{workspace_id}/notifications

**get /v1/workspaces/{workspace_id}/notifications**

List user's notifications

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `status`: string - (optional)
- `type`: string - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/notifications" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/notifications', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/notifications'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/notifications

**delete /v1/workspaces/{workspace_id}/notifications**

Delete notifications

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "notification_ids": [],
  "delete_all_read": false
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/notifications" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "notification_ids": [],
  "delete_all_read": false
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/notifications', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "notification_ids": [],
  "delete_all_read": false
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/notifications'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "notification_ids": [],
  "delete_all_read": false
}

response = requests.delete(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/notifications/read

**post /v1/workspaces/{workspace_id}/notifications/read**

Mark notifications as read

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "notification_ids": [],
  "mark_all": false
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/notifications/read" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "notification_ids": [],
  "mark_all": false
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/notifications/read', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "notification_ids": [],
  "mark_all": false
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/notifications/read'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "notification_ids": [],
  "mark_all": false
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

## Nutrition

### GET /v1/workspaces/{workspace_id}/nutrition-goals

**get /v1/workspaces/{workspace_id}/nutrition-goals**

Get user's nutrition goals for a workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

**Response:**

```json
{}
```

---

### PUT /v1/workspaces/{workspace_id}/nutrition-goals

**put /v1/workspaces/{workspace_id}/nutrition-goals**

Update user's nutrition goals

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X put "http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals', {
  method: 'put',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-goals'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.put(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/nutrition-summary

**get /v1/workspaces/{workspace_id}/nutrition-summary**

Get nutrition summary for a specific date

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `date`: string - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/nutrition-summary/range

**get /v1/workspaces/{workspace_id}/nutrition-summary/range**

Get nutrition summary for a date range

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `start`: string - (required)
- `end`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary/range" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary/range', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/nutrition-summary/range'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/food-search

**get /v1/workspaces/{workspace_id}/food-search**

Search for foods across saved items and Open Food Facts

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `q`: Search query - (optional)
- `barcode`: Search by barcode - (optional)
- `source`: string - (optional)
- `limit`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-search" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-search', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-search'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/food-items

**get /v1/workspaces/{workspace_id}/food-items**

List saved food items

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `favorites_only`: boolean - (optional)
- `limit`: number - (optional)
- `offset`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/food-items

**post /v1/workspaces/{workspace_id}/food-items**

Save a new food item

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/food-items/favorites

**get /v1/workspaces/{workspace_id}/food-items/favorites**

Get favorite food items for quick-add

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/favorites" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/favorites', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/favorites'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/food-items/recent

**get /v1/workspaces/{workspace_id}/food-items/recent**

Get recently used food items

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/recent" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/recent', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/recent'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/food-items/{id}

**patch /v1/workspaces/{workspace_id}/food-items/{id}**

Update a food item

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/food-items/{id}

**delete /v1/workspaces/{workspace_id}/food-items/{id}**

Delete a food item

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/food-items/{id}/increment-use

**patch /v1/workspaces/{workspace_id}/food-items/{id}/increment-use**

Increment use count when food is logged

**Path Parameters:**

- `workspace_id`: string - (required)
- `id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID/increment-use" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID/increment-use', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/food-items/ID/increment-use'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

## Observations

### GET /v1/workspaces/{workspace_id}/time-observations

**get /v1/workspaces/{workspace_id}/time-observations**

List automated time observations

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-observations" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-observations', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-observations'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Other

### GET /health

**get /health**

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/health" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/health', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/health'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/habits

**get /v1/workspaces/{workspace_id}/habits**

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/habits" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/habits', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/habits'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/habits

**post /v1/workspaces/{workspace_id}/habits**

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/habits" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/habits', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/habits'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/habits/{habit_id}/log

**post /v1/workspaces/{workspace_id}/habits/{habit_id}/log**

**Path Parameters:**

- `workspace_id`: string - (required)
- `habit_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/habits/HABIT_ID/log" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/habits/HABIT_ID/log', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/habits/HABIT_ID/log'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/milestones

**get /v1/workspaces/{workspace_id}/milestones**

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/milestones" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/milestones', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/milestones'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/milestones

**post /v1/workspaces/{workspace_id}/milestones**

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/milestones" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/milestones', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/milestones'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

## Projects

### GET /v1/workspaces/{workspace_id}/projects

**get /v1/workspaces/{workspace_id}/projects**

List projects in a workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/projects

**post /v1/workspaces/{workspace_id}/projects**

Create a new project

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/projects/{project_id}

**get /v1/workspaces/{workspace_id}/projects/{project_id}**

Get a single project by ID

**Path Parameters:**

- `workspace_id`: string - (required)
- `project_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/projects/{project_id}

**patch /v1/workspaces/{workspace_id}/projects/{project_id}**

Update a project

**Path Parameters:**

- `workspace_id`: string - (required)
- `project_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/projects/{project_id}

**delete /v1/workspaces/{workspace_id}/projects/{project_id}**

Soft-delete a project (moves to trash)

**Path Parameters:**

- `workspace_id`: string - (required)
- `project_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/projects/{project_id}/restore

**post /v1/workspaces/{workspace_id}/projects/{project_id}/restore**

Restore a soft-deleted project from trash

**Path Parameters:**

- `workspace_id`: string - (required)
- `project_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID/restore" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID/restore', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/projects/PROJECT_ID/restore'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

## Search

### GET /v1/workspaces/{workspace_id}/search

**get /v1/workspaces/{workspace_id}/search**

Search across tasks, projects, and comments

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `q`: Search query - (required)
- `types`: Comma-separated: tasks,projects,comments (default: tasks,projects) - (optional)
- `limit`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/search" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/search', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/search'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/tasks/filter

**post /v1/workspaces/{workspace_id}/tasks/filter**

Advanced task filtering with complex conditions

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "limit": 0,
  "offset": 0
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/filter" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "limit": 0,
  "offset": 0
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/filter', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "limit": 0,
  "offset": 0
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/filter'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "limit": 0,
  "offset": 0
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

## Strategic Planning

### GET /v1/workspaces/{workspace_id}/goals

**get /v1/workspaces/{workspace_id}/goals**

List strategic goals in a workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/goals

**post /v1/workspaces/{workspace_id}/goals**

Create a new strategic goal

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/goals/{goal_id}

**get /v1/workspaces/{workspace_id}/goals/{goal_id}**

Get a single strategic goal by ID

**Path Parameters:**

- `workspace_id`: string - (required)
- `goal_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/goals/{goal_id}

**patch /v1/workspaces/{workspace_id}/goals/{goal_id}**

Update a strategic goal

**Path Parameters:**

- `workspace_id`: string - (required)
- `goal_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/goals/{goal_id}/milestones

**get /v1/workspaces/{workspace_id}/goals/{goal_id}/milestones**

List milestones for a goal

**Path Parameters:**

- `workspace_id`: string - (required)
- `goal_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/goals/{goal_id}/milestones

**post /v1/workspaces/{workspace_id}/goals/{goal_id}/milestones**

Create a milestone for a goal

**Path Parameters:**

- `workspace_id`: string - (required)
- `goal_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/goals/{goal_id}/milestones/{milestone_id}

**patch /v1/workspaces/{workspace_id}/goals/{goal_id}/milestones/{milestone_id}**

Update a milestone

**Path Parameters:**

- `workspace_id`: string - (required)
- `goal_id`: string - (required)
- `milestone_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones/MILESTONE_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones/MILESTONE_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones/MILESTONE_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/goals/{goal_id}/milestones/{milestone_id}

**delete /v1/workspaces/{workspace_id}/goals/{goal_id}/milestones/{milestone_id}**

Delete a milestone

**Path Parameters:**

- `workspace_id`: string - (required)
- `goal_id`: string - (required)
- `milestone_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones/MILESTONE_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones/MILESTONE_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/milestones/MILESTONE_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/goals/{goal_id}/check-ins

**get /v1/workspaces/{workspace_id}/goals/{goal_id}/check-ins**

List check-ins for a quantitative goal

**Path Parameters:**

- `workspace_id`: string - (required)
- `goal_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/check-ins" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/check-ins', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/check-ins'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/goals/{goal_id}/check-ins

**post /v1/workspaces/{workspace_id}/goals/{goal_id}/check-ins**

Log a check-in for a quantitative goal

**Path Parameters:**

- `workspace_id`: string - (required)
- `goal_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/check-ins" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/check-ins', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/goals/GOAL_ID/check-ins'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

## Tags

### GET /v1/workspaces/{workspace_id}/tags

**get /v1/workspaces/{workspace_id}/tags**

List all tags in workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `search`: string - (optional)
- `limit`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/tags

**post /v1/workspaces/{workspace_id}/tags**

Create a new tag

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "name": "string",
  "color": "string"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "color": "string"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "string",
  "color": "string"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "name": "string",
  "color": "string"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/tags/{tag_id}

**get /v1/workspaces/{workspace_id}/tags/{tag_id}**

Get tag details including usage count

**Path Parameters:**

- `workspace_id`: string - (required)
- `tag_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags/TAG_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags/TAG_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags/TAG_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/tags/{tag_id}

**patch /v1/workspaces/{workspace_id}/tags/{tag_id}**

Update tag

**Path Parameters:**

- `workspace_id`: string - (required)
- `tag_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags/TAG_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags/TAG_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags/TAG_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/tags/{tag_id}

**delete /v1/workspaces/{workspace_id}/tags/{tag_id}**

Delete tag (removes from all tasks and projects)

**Path Parameters:**

- `workspace_id`: string - (required)
- `tag_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags/TAG_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags/TAG_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tags/TAG_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

## Task Recurrence

### GET /v1/workspaces/{workspace_id}/tasks/{task_id}/recurrence

**get /v1/workspaces/{workspace_id}/tasks/{task_id}/recurrence**

Get recurrence configuration for a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/tasks/{task_id}/recurrence

**post /v1/workspaces/{workspace_id}/tasks/{task_id}/recurrence**

Create or replace recurrence for a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/tasks/{task_id}/recurrence

**patch /v1/workspaces/{workspace_id}/tasks/{task_id}/recurrence**

Update recurrence configuration

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/tasks/{task_id}/recurrence

**delete /v1/workspaces/{workspace_id}/tasks/{task_id}/recurrence**

Remove recurrence from a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/tasks/{task_id}/recurrence/preview

**get /v1/workspaces/{workspace_id}/tasks/{task_id}/recurrence/preview**

Preview next N occurrences for a task's recurrence

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence/preview" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence/preview', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/recurrence/preview'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Task Reminders

### GET /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders

**get /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders**

List all reminders for a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders

**post /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders**

Add a reminder to a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders

**delete /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders**

Delete all reminders for a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders/bulk

**post /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders/bulk**

Add multiple reminders to a task at once

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders/bulk" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders/bulk', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders/bulk'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders/{reminder_id}

**patch /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders/{reminder_id}**

Update a reminder

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)
- `reminder_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders/REMINDER_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders/REMINDER_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders/REMINDER_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders/{reminder_id}

**delete /v1/workspaces/{workspace_id}/tasks/{task_id}/reminders/{reminder_id}**

Delete a reminder

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)
- `reminder_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders/REMINDER_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders/REMINDER_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/reminders/REMINDER_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/reminders/presets

**get /v1/workspaces/{workspace_id}/reminders/presets**

Get available reminder preset options

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/reminders/presets" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/reminders/presets', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/reminders/presets'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Tasks

### GET /v1/workspaces/{workspace_id}/tasks

**get /v1/workspaces/{workspace_id}/tasks**

List tasks in a workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/tasks

**post /v1/workspaces/{workspace_id}/tasks**

Create a new task

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/tasks/{task_id}

**get /v1/workspaces/{workspace_id}/tasks/{task_id}**

Get a single task by ID

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/tasks/{task_id}

**patch /v1/workspaces/{workspace_id}/tasks/{task_id}**

Update a task

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/tasks/{task_id}

**delete /v1/workspaces/{workspace_id}/tasks/{task_id}**

Soft-delete a task (moves to trash)

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/tasks/{task_id}/restore

**post /v1/workspaces/{workspace_id}/tasks/{task_id}/restore**

Restore a soft-deleted task from trash

**Path Parameters:**

- `workspace_id`: string - (required)
- `task_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/restore" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/restore', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/TASK_ID/restore'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/tasks/bulk

**post /v1/workspaces/{workspace_id}/tasks/bulk**

Perform bulk operations on tasks

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/bulk" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/bulk', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/tasks/bulk'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

## Teams

### GET /v1/workspaces/{workspace_id}/teams

**get /v1/workspaces/{workspace_id}/teams**

List all teams in workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `search`: string - (optional)
- `include_members`: boolean - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/teams

**post /v1/workspaces/{workspace_id}/teams**

Create a new team

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "name": "string",
  "description": "string",
  "member_ids": []
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "description": "string",
  "member_ids": []
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "string",
  "description": "string",
  "member_ids": []
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "name": "string",
  "description": "string",
  "member_ids": []
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/teams/{team_id}

**get /v1/workspaces/{workspace_id}/teams/{team_id}**

Get team details with members

**Path Parameters:**

- `workspace_id`: string - (required)
- `team_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/teams/{team_id}

**patch /v1/workspaces/{workspace_id}/teams/{team_id}**

Update team details

**Path Parameters:**

- `workspace_id`: string - (required)
- `team_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/teams/{team_id}

**delete /v1/workspaces/{workspace_id}/teams/{team_id}**

Delete team (cascade deletes members)

**Path Parameters:**

- `workspace_id`: string - (required)
- `team_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/teams/{team_id}/members

**post /v1/workspaces/{workspace_id}/teams/{team_id}/members**

Add members to team

**Path Parameters:**

- `workspace_id`: string - (required)
- `team_id`: string - (required)

**Request Body:**

```json
{
  "user_ids": []
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID/members" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "user_ids": []
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID/members', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "user_ids": []
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID/members'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "user_ids": []
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/teams/{team_id}/members

**delete /v1/workspaces/{workspace_id}/teams/{team_id}/members**

Remove members from team

**Path Parameters:**

- `workspace_id`: string - (required)
- `team_id`: string - (required)

**Request Body:**

```json
{
  "user_ids": []
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID/members" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "user_ids": []
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID/members', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "user_ids": []
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/teams/TEAM_ID/members'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "user_ids": []
}

response = requests.delete(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

## Time Tracking

### GET /v1/workspaces/{workspace_id}/time-entries

**get /v1/workspaces/{workspace_id}/time-entries**

List time entries in a workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/time-entries

**post /v1/workspaces/{workspace_id}/time-entries**

Create a manual time entry

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/time-entries/{time_entry_id}

**get /v1/workspaces/{workspace_id}/time-entries/{time_entry_id}**

Get a single time entry by ID

**Path Parameters:**

- `workspace_id`: string - (required)
- `time_entry_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/TIME_ENTRY_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/TIME_ENTRY_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/TIME_ENTRY_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/time-entries/{time_entry_id}

**patch /v1/workspaces/{workspace_id}/time-entries/{time_entry_id}**

Update a time entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `time_entry_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/TIME_ENTRY_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/TIME_ENTRY_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/TIME_ENTRY_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/time-entries/{time_entry_id}

**delete /v1/workspaces/{workspace_id}/time-entries/{time_entry_id}**

Soft-delete a time entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `time_entry_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/TIME_ENTRY_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/TIME_ENTRY_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/TIME_ENTRY_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/timers

**get /v1/workspaces/{workspace_id}/timers**

List active timers (optionally filtered by user)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/timers/active

**get /v1/workspaces/{workspace_id}/timers/active**

Get the current user's active timer (if any)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/active" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/active', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/active'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/timers/start

**post /v1/workspaces/{workspace_id}/timers/start**

Start a new timer. Fails if already running (use stop first).

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/start" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/start', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/start'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/timers/{timer_id}/stop

**post /v1/workspaces/{workspace_id}/timers/{timer_id}/stop**

Stop a running timer

**Path Parameters:**

- `workspace_id`: string - (required)
- `timer_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/stop" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/stop', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/stop'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/timers/{timer_id}/discard

**delete /v1/workspaces/{workspace_id}/timers/{timer_id}/discard**

Discard a running timer without saving the time entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `timer_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/discard" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/discard', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/discard'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/time-categories

**get /v1/workspaces/{workspace_id}/time-categories**

List time categories (workspace and/or personal)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/time-categories

**post /v1/workspaces/{workspace_id}/time-categories**

Create a time category

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-categories'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/time-entries/summary

**get /v1/workspaces/{workspace_id}/time-entries/summary**

Get time entry analytics summary

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/summary" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/summary', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-entries/summary'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/time-observations

**get /v1/workspaces/{workspace_id}/time-observations**

List automated time observations

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-observations" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-observations', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/time-observations'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Timers

### GET /v1/workspaces/{workspace_id}/timers

**get /v1/workspaces/{workspace_id}/timers**

List active timers (optionally filtered by user)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/timers/active

**get /v1/workspaces/{workspace_id}/timers/active**

Get the current user's active timer (if any)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/active" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/active', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/active'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/timers/start

**post /v1/workspaces/{workspace_id}/timers/start**

Start a new timer. Fails if already running (use stop first).

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/start" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/start', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/start'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/timers/{timer_id}/stop

**post /v1/workspaces/{workspace_id}/timers/{timer_id}/stop**

Stop a running timer

**Path Parameters:**

- `workspace_id`: string - (required)
- `timer_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/stop" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/stop', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/stop'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/timers/{timer_id}/discard

**delete /v1/workspaces/{workspace_id}/timers/{timer_id}/discard**

Discard a running timer without saving the time entry

**Path Parameters:**

- `workspace_id`: string - (required)
- `timer_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/discard" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/discard', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/timers/TIMER_ID/discard'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

## Users

### GET /v1/workspaces/{workspace_id}/users

**get /v1/workspaces/{workspace_id}/users**

List all users in workspace

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `search`: Search by name or email - (optional)
- `role`: string - (optional)
- `team_id`: string - (optional)
- `limit`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/users" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/users', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/users'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/users/me

**get /v1/users/me**

Get current user profile

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/users/me" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/users/me', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/users/me'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/users/me

**patch /v1/users/me**

Update current user profile

**Request Body:**

```json
{
  "name": "string",
  "avatar_url": "string",
  "timezone": "string"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/users/me" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "avatar_url": "string",
  "timezone": "string"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/users/me', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "string",
  "avatar_url": "string",
  "timezone": "string"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/users/me'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "name": "string",
  "avatar_url": "string",
  "timezone": "string"
}

response = requests.patch(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/users/{user_id}

**get /v1/workspaces/{workspace_id}/users/{user_id}**

Get user details in workspace context

**Path Parameters:**

- `workspace_id`: string - (required)
- `user_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/users/USER_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/users/USER_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/users/USER_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

## Webhooks

### GET /v1/workspaces/{workspace_id}/webhooks

**get /v1/workspaces/{workspace_id}/webhooks**

List all webhooks in workspace (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/webhooks

**post /v1/workspaces/{workspace_id}/webhooks**

Create a new webhook (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "url": "string",
  "events": [],
  "secret": "string",
  "enabled": false
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "string",
  "events": [],
  "secret": "string",
  "enabled": false
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "url": "string",
  "events": [],
  "secret": "string",
  "enabled": false
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "url": "string",
  "events": [],
  "secret": "string",
  "enabled": false
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/webhooks/{webhook_id}

**get /v1/workspaces/{workspace_id}/webhooks/{webhook_id}**

Get webhook details

**Path Parameters:**

- `workspace_id`: string - (required)
- `webhook_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/webhooks/{webhook_id}

**patch /v1/workspaces/{workspace_id}/webhooks/{webhook_id}**

Update webhook (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)
- `webhook_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/webhooks/{webhook_id}

**delete /v1/workspaces/{workspace_id}/webhooks/{webhook_id}**

Delete webhook (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)
- `webhook_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/webhooks/{webhook_id}/test

**post /v1/workspaces/{workspace_id}/webhooks/{webhook_id}/test**

Send test event to webhook

**Path Parameters:**

- `workspace_id`: string - (required)
- `webhook_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID/test" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID/test', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/webhooks/WEBHOOK_ID/test'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.post(url, headers=headers)
data = response.json()
```

</details>

---

## Workspaces

### GET /v1/workspaces

**get /v1/workspaces**

List all workspaces the user has access to

**Query Parameters:**

- `include_stats`: Include task/member counts - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces

**post /v1/workspaces**

Create a new workspace

**Request Body:**

```json
{
  "name": "string",
  "description": "string",
  "type": "personal"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "description": "string",
  "type": "personal"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "string",
  "description": "string",
  "type": "personal"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "name": "string",
  "description": "string",
  "type": "personal"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}

**get /v1/workspaces/{workspace_id}**

Get workspace details

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}

**patch /v1/workspaces/{workspace_id}**

Update workspace details (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}

**delete /v1/workspaces/{workspace_id}**

Delete workspace (owner only) - cascades to all data

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/members

**get /v1/workspaces/{workspace_id}/members**

List workspace members

**Path Parameters:**

- `workspace_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/members" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/members', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/members'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### POST /v1/workspaces/{workspace_id}/members

**post /v1/workspaces/{workspace_id}/members**

Add a member to workspace (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "user_id": "string",
  "role": "owner"
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X post "http://localhost:3002/v1/workspaces/WORKSPACE_ID/members" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "user_id": "string",
  "role": "owner"
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/members', {
  method: 'post',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "user_id": "string",
  "role": "owner"
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/members'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "user_id": "string",
  "role": "owner"
}

response = requests.post(url, headers=headers, json=payload)
data = response.json()
```

</details>

---

### PATCH /v1/workspaces/{workspace_id}/members/{user_id}

**patch /v1/workspaces/{workspace_id}/members/{user_id}**

Update workspace member role (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)
- `user_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X patch "http://localhost:3002/v1/workspaces/WORKSPACE_ID/members/USER_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/members/USER_ID', {
  method: 'patch',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/members/USER_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.patch(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/members/{user_id}

**delete /v1/workspaces/{workspace_id}/members/{user_id}**

Remove member from workspace (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)
- `user_id`: string - (required)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/members/USER_ID" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/members/USER_ID', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/members/USER_ID'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.delete(url, headers=headers)
data = response.json()
```

</details>

---

### GET /v1/workspaces/{workspace_id}/trash

**get /v1/workspaces/{workspace_id}/trash**

List deleted items in workspace trash

**Path Parameters:**

- `workspace_id`: string - (required)

**Query Parameters:**

- `type`: string - (optional)
- `limit`: number - (optional)

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X get "http://localhost:3002/v1/workspaces/WORKSPACE_ID/trash" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" 
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/trash', {
  method: 'get',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/trash'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

response = requests.get(url, headers=headers)
data = response.json()
```

</details>

---

### DELETE /v1/workspaces/{workspace_id}/trash

**delete /v1/workspaces/{workspace_id}/trash**

Permanently delete expired items from trash (owner/admin only)

**Path Parameters:**

- `workspace_id`: string - (required)

**Request Body:**

```json
{
  "type": "all",
  "item_ids": []
}
```

**Examples:**

<details>
<summary>HTTP (curl)</summary>

```bash
curl -X delete "http://localhost:3002/v1/workspaces/WORKSPACE_ID/trash" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "all",
  "item_ids": []
}'
```

</details>

<details>
<summary>Node.js</summary>

```javascript
const response = await fetch('http://localhost:3002/v1/workspaces/WORKSPACE_ID/trash', {
  method: 'delete',
  headers: {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "type": "all",
  "item_ids": []
}),
});

const data = await response.json();
```

</details>

<details>
<summary>Python</summary>

```python
import requests

url = 'http://localhost:3002/v1/workspaces/WORKSPACE_ID/trash'
headers = {
    'Authorization': 'Bearer YOUR_JWT_TOKEN',
    'Content-Type': 'application/json',
}

payload = {
  "type": "all",
  "item_ids": []
}

response = requests.delete(url, headers=headers, json=payload)
data = response.json()
```

</details>

---