## Get DoD settings

`GET /v1/scrum/groups/:groupId/dod/settings`

Returns the Definition of Done types of a scrum project: the name, order, whether the checklist is required, and the participants of each type.

## Parameters

| Parameter | Type | Required | Default | Description |
|----------|-----|-------|-----------|----------|
| `groupId` (path) | number | yes | — | Scrum project ID. List: [`GET /v1/workgroups`](/docs/entities/workgroups/list) |
| `saveRequest` (query) | string | no | `Y` | Accepts `Y` or `N`. On the projects checked, the response is the same for both values |

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/scrum/groups/45/dod/settings" \
  -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/dod/settings', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { data } = await res.json()
for (const type of data.types) {
  console.log(type.id, type.name, type.dodRequired)
}
```

### JavaScript — OAuth application

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

const { data } = await res.json()
for (const type of data.types) {
  console.log(type.id, type.name, type.dodRequired)
}
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | Always `true` on success |
| `data.types` | array | The project's DoD types. A non-scrum workgroup the user belongs to returns success with an empty array |
| `data.types[].id` | number | Type ID. Accepted by [saving the type's settings](/docs/scrum/dod/save-settings) and [saving a task's DoD list](/docs/scrum/dod/save-list) |
| `data.types[].entityId` | number | ID of the scrum project backlog the type belongs to |
| `data.types[].name` | string | Type name |
| `data.types[].sort` | number | Position of the type in the list |
| `data.types[].dodRequired` | string | `Y` — the DoD checklist is required for tasks of this type, `N` — it is not |
| `data.types[].participants` | array | Type participants in the format `{ "id": 1, "entityId": "user" }` |
| `data.activeTypeId` | number | `0` when reading project settings |

## Response example

```json
{
  "success": true,
  "data": {
    "types": [
      {
        "id": 1,
        "entityId": 1,
        "name": "Product task",
        "sort": 1,
        "dodRequired": "Y",
        "participants": []
      },
      {
        "id": 3,
        "entityId": 1,
        "name": "Technical task",
        "sort": 2,
        "dodRequired": "N",
        "participants": []
      }
    ],
    "activeTypeId": 0
  }
}
```

## Error response example

422 — the project does not exist or the user has no access to it:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "You don't have access.",
    "b24Code": "TASKS_SDC_02"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | `groupId` is not a positive integer |
| 400 | `INVALID_PARAMS` | `saveRequest` is not `Y` or `N` |
| 400 | `INVALID_PARAMS` | The query contains a parameter other than `saveRequest`, such as `taskId` |
| 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` | The project does not exist or the user has no access to it. `error.b24Code` is `TASKS_SDC_02` |

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

## See also

- [Save DoD settings](/docs/scrum/dod/save-settings)
- [Save a task's DoD list](/docs/scrum/dod/save-list)
- [Check whether a task needs DoD](/docs/scrum/dod/necessary)
- [Definition of Done in Scrum](/docs/scrum/dod)
