## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://developer.mindbridge.ai/llms.txt)

Use this file to discover all available pages before exploring further.

### Create Task

**Endpoint:** `POST /v1/tasks`

**cURL Example:**

```bash
curl --request POST \
  --url https://{tenant}.mindbridge.ai/api/v1/tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "engagementId": "<string>",
  "analysisResultId": "<string>",
  "rowId": 123,
  "transactionId": 123,
  "assignedId": "<string>",
  "description": "<string>",
  "sample": "<string>",
  "auditAreas": [
    "<string>"
  ],
  "assertions": [
    "<string>"
  ],
  "dueDate": "2023-12-25",
  "tags": [
    "<string>"
  ]
}
'
```

**Python Example:**

```python
import requests

url = "https://{tenant}.mindbridge.ai/api/v1/tasks"

payload = {
    "engagementId": "<string>",
    "analysisResultId": "<string>",
    "rowId": 123,
    "transactionId": 123,
    "assignedId": "<string>",
    "description": "<string>",
    "sample": "<string>",
    "auditAreas": ["<string>"],
    "assertions": ["<string>"],
    "dueDate": "2023-12-25",
    "tags": ["<string>"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.text)
```

**JavaScript Example:**

```javascript
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    engagementId: '<string>',
    analysisResultId: '<string>',
    rowId: 123,
    transactionId: 123,
    assignedId: '<string>',
    description: '<string>',
    sample: '<string>',
    auditAreas: ['<string>'],
    assertions: ['<string>'],
    dueDate: '2023-12-25',
    tags: ['<string>']
  })
};

fetch('https://{tenant}.mindbridge.ai/api/v1/tasks', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Request Body
```json
{
  "engagementId": "<string>",
  "analysisResultId": "<string>",
  "rowId": 123,
  "transactionId": 123,
  "assignedId": "<string>",
  "description": "<string>",
  "sample": "<string>",
  "auditAreas": [
    "<string>"
  ],
  "assertions": [
    "<string>"
  ],
  "dueDate": "2023-12-25",
  "tags": [
    "<string>"
  ]
}
```

### Response Example
```json
{
  "id": "<string>",
  "version": 123,
  "creationDate": "2023-11-07T05:31:56Z",
  "lastModifiedDate": "2023-11-07T05:31:56Z",
  "engagementId": "<string>",
  "analysisResultId": "<string>",
  "rowId": 123,
  "transactionId": 123,
  "assignedId": "<string>",
  "description": "<string>",
  "sample": "<string>",
  "auditAreas": ["<string>"],
  "assertions": ["<string>"],
  "dueDate": "2023-12-25",
  "tags": ["<string>"]
}
```

### Authorizations
```text
Authorization: Bearer <token>
```

### Body Parameters
- `engagementId`: string (required) - Identifies the associated engagement.
- `analysisResultId`: string (required)
- `rowId`: integer (required)
- `transactionId`: integer (required)
- `assignedId`: string
- `description`: string
- `sample`: string
- `auditAreas`: array of strings
- `assertions`: array of strings
- `dueDate`: string (date)
- `tags`: array of strings

### Available Options for Task Status
- `OPEN`
- `NORMAL`
- `COMPLETED`
- `DISMISSED`
- `RESOLVED`

### Available Options for Task Type
- `ENTRY`
- `TRANSACTION`
- `AP_ENTRY`
- `AR_ENTRY`
- `AP_OUTSTANDING_ENTRY`
- `AR_OUTSTANDING_ENTRY`
- `TRA_ENTRY`
- `SUBLEDGER_ENTRY`
