# API Documentation

## POST /app/api/v1/investigation-user-notes/{investigation_id}/create
### Add a new investigation note

### Authorizations
- ApiKeyAuth

### Path parameters
- **investigation_id**: integer (Required)

### Body
- `application/json`
  - `text`: string (Optional)

### Responses
- **200**: New investigation note
  - `application/json`
    - `created_at`: string · date-time (Read-only, Required)
    - `id`: integer (Read-only, Required)
    - `investigation`: integer (Required)
    - `text`: string (Optional)
    - `updated_at`: string · date-time (Read-only, Required)
    - `user`: object · CustomUser (Required)
      - Basic serializer to pass CustomUser details to the front end.
      - Extend with any fields your app needs.

### Example Request
```
POST /app/api/v1/investigation-user-notes/{investigation_id}/create HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "text": "text"
}
```

### Example Response
```
{
  "created_at": "2026-07-27T03:06:08.246Z",
  "id": 1,
  "investigation": 1,
  "text": "text",
  "updated_at": "2026-07-27T03:06:08.246Z",
  "user": {
    "email": "name@gmail.com",
    "first_name": "text",
    "id": 1,
    "last_name": "text",
    "oidc_user_id": "text",
    "role": "admin"
  }
}
```

## GET /app/api/v1/investigation-user-notes/{investigation_id}/list
### List user notes for an investigation

### Authorizations
- ApiKeyAuth

### Path parameters
- **investigation_id**: integer (Required)

### Responses
- **200**: Investigation user notes
  - `application/json`
    - `created_at`: string · date-time (Read-only, Required)
    - `id`: integer (Read-only, Required)
    - `investigation`: integer (Required)
    - `text`: string (Optional)
    - `updated_at`: string · date-time (Read-only, Required)
    - `user`: object · CustomUser (Required)
      - Basic serializer to pass CustomUser details to the front end.
      - Extend with any fields your app needs.

### Example Request
```
GET /app/api/v1/investigation-user-notes/{investigation_id}/list HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
```

### Example Response
```
[
  {
    "created_at": "2026-07-27T03:06:08.246Z",
    "id": 1,
    "investigation": 1,
    "text": "text",
    "updated_at": "2026-07-27T03:06:08.246Z",
    "user": {
      "email": "name@gmail.com",
      "first_name": "text",
      "id": 1,
      "last_name": "text",
      "oidc_user_id": "text",
      "role": "admin"
    }
  }
]
```

## DELETE /app/api/v1/investigation-user-notes/{investigation_note_id}/delete
### Delete an investigation note

### Authorizations
- ApiKeyAuth

### Path parameters
- **investigation_note_id**: integer (Required)

### Responses
- **200**: Delete success
```
No content
```
- **401**: Unauthorized
  - `application/json`
- **403**: Access denied
  - `application/json`
- **404**: Resource not found
  - `application/json`
- **500**: System error
  - `application/json`
- **503**: System not ready for requests
  - `application/json`

### Example Request
```
DELETE /app/api/v1/investigation-user-notes/{investigation_note_id}/delete HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
```

### Example Response
```
No content
```

## PATCH /app/api/v1/investigation-user-notes/{investigation_note_id}/update
### Update an investigation note

### Authorizations
- ApiKeyAuth

### Path parameters
- **investigation_note_id**: integer (Required)

### Body
- `application/json`
  - `text`: string (Optional)

### Responses
- **200**: Updated investigation note
  - `application/json`
    - `created_at`: string · date-time (Read-only, Required)
    - `id`: integer (Read-only, Required)
    - `investigation`: integer (Required)
    - `text`: string (Optional)
    - `updated_at`: string · date-time (Read-only, Required)
    - `user`: object · CustomUser (Required)
      - Basic serializer to pass CustomUser details to the front end.
      - Extend with any fields your app needs.

### Example Request
```
PATCH /app/api/v1/investigation-user-notes/{investigation_note_id}/update HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "text": "text"
}
```
