## Check whether a task needs DoD

`GET /v1/scrum/groups/:groupId/tasks/:taskId/dod/necessary`

Checks whether a task in a scrum project needs a Definition of Done (DoD) checklist, given the project ID and the task ID.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|-------|----------|
| `groupId` (path) | number | yes | Scrum project ID. List: [`GET /v1/workgroups`](/docs/entities/workgroups/list) |
| `taskId` (path) | number | yes | Task ID. Project tasks: [`GET /v1/tasks?filter[groupId]=45`](/docs/entities/tasks/list) |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/scrum/groups/45/tasks/2143/dod/necessary" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/scrum/groups/45/tasks/2143/dod/necessary" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/scrum/groups/45/tasks/2143/dod/necessary', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { data: needsDod } = await res.json()
console.log(needsDod ? 'DoD checklist required' : 'DoD checklist not required')
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/scrum/groups/45/tasks/2143/dod/necessary', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { data: needsDod } = await res.json()
console.log(needsDod ? 'DoD checklist required' : 'DoD checklist not required')
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | Always `true` on success |
| `data` | boolean | `true` — the task needs a DoD checklist, `false` — it does not |

## Response example

```json
{
  "success": true,
  "data": true
}
```

## Error response example

400 — `taskId` is not a positive integer:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "groupId and taskId must be positive integers"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | `groupId` or `taskId` is not a positive integer |
| 401 | `MISSING_API_KEY` | `X-Api-Key` is missing |
| 401 | `TOKEN_MISSING` | The key has no configured tokens |
| 403 | `SCOPE_DENIED` | The key lacks the `task` scope |
| 422 | `BITRIX_ERROR` | Bitrix24 refused the check |

Full list of common API errors — [Errors](/docs/errors).

## Known specifics

- A `false` response does not confirm that the task and the project exist. A nonexistent task, a nonexistent project, and a project the user has no access to all return `data: false`, not an error. Check the task beforehand with [`GET /v1/scrum/tasks/:taskId`](/docs/scrum/tasks/get).

## See also

- [Get DoD settings](/docs/scrum/dod/settings)
- [Save a task's DoD list](/docs/scrum/dod/save-list)
- [Get a task's scrum placement](/docs/scrum/tasks/get)
- [Definition of Done in Scrum](/docs/scrum/dod)
