## Participant statuses

`GET /v1/call-lists/statuses`

Returns the reference list of call-list participant statuses, used to turn a participant's status code into a human-readable name.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/call-lists/statuses" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/call-lists/statuses" \
  -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/call-lists/statuses', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
const statusNames = Object.fromEntries(data.map((s) => [s.statusId, s.name]))
console.log(statusNames.IN_WORK)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/call-lists/statuses', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()
const statusNames = Object.fromEntries(data.map((s) => [s.statusId, s.name]))
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | Always `true` on success |
| `data` | array | Participant statuses |
| `data[].id` | number | Internal number of the reference record. Not used to match a participant — use `statusId` for that |
| `data[].statusId` | string | Status code: `IN_WORK`, `SUCCESS`, `WRONG_NUMBER`, `STOP_CALLING`. Matches the participant's `status` field from [`GET /v1/call-lists/:id/items`](/docs/entities/call-lists/items) |
| `data[].name` | string | Human-readable status name, for example "In progress". Do not use it to match a participant |
| `data[].sort` | number | Status order in the list, ascending |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 61,
      "name": "In progress",
      "sort": 10,
      "statusId": "IN_WORK"
    },
    {
      "id": 63,
      "name": "Successful",
      "sort": 20,
      "statusId": "SUCCESS"
    },
    {
      "id": 65,
      "name": "Wrong number",
      "sort": 30,
      "statusId": "WRONG_NUMBER"
    },
    {
      "id": 67,
      "name": "Do not call again",
      "sort": 40,
      "statusId": "STOP_CALLING"
    }
  ]
}
```

## Error response example

400 — a query parameter is passed, but the method accepts none:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "This operation has no query parameters"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 400 | `INVALID_PARAMS` | A query string parameter is passed. The method accepts none |
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. The reason is in `message` |
| 502 | `BITRIX_RESPONSE_INVALID` | Bitrix24 returned a response that could not be parsed |
| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope |
| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens configured |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |

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

## Known specifics

**The reference list is shared by all call lists of the Bitrix24 account.** One call returns status names for participants of any list.

## See also

- [Call list participants](/docs/entities/call-lists/items)
- [List call lists](/docs/entities/call-lists/list)
- [Get a call list](/docs/entities/call-lists/get)
- [Call lists](/docs/entities/call-lists)
