## CRM address types

`GET /v1/crm-enums/address-types`

Reference list of address types on the Bitrix24 account: actual, legal, delivery address and others. Use it to pick a type before writing an address.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/crm-enums/address-types" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

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

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

### JavaScript — OAuth application

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

const { data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` on a successful request |
| `data` | array | The Bitrix24 account's address types |
| `data[].id` | number | Type ID. Pass it as `typeId` to the [address methods](/docs/entities/addresses) |
| `data[].name` | string | Type name in the Bitrix24 account language |
| `data[].symbolCode` | string \| null | Symbolic type code. On the test Bitrix24 account it is `null` for every type |
| `data[].symbolCodeShort` | string \| null | Short symbolic code. On the test Bitrix24 account it is `null` for every type |

## Response example

```json
{
  "success": true,
  "data": [
    { "id": 11, "name": "Delivery address", "symbolCode": null, "symbolCodeShort": null },
    { "id": 1, "name": "Actual address", "symbolCode": null, "symbolCodeShort": null },
    { "id": 6, "name": "Legal address", "symbolCode": null, "symbolCodeShort": null },
    { "id": 4, "name": "Registration address", "symbolCode": null, "symbolCodeShort": null },
    { "id": 8, "name": "Mailing address", "symbolCode": null, "symbolCodeShort": null },
    { "id": 9, "name": "Beneficiary address", "symbolCode": null, "symbolCodeShort": null }
  ]
}
```

## Error response example

401 — the `X-Api-Key` header is missing:

```json
{
  "success": false,
  "error": {
    "code": "MISSING_API_KEY",
    "message": "API key required. Pass via X-Api-Key header."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 403 | `BITRIX_ACCESS_DENIED` | The key's user has no permission to read the reference list in Bitrix24 |
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request; the reason is in `message` |
| 429 | `RATE_LIMITED` | Bitrix24 request rate exceeded; retry in 1-2 seconds |
| 502 | `BITRIX_RESPONSE_INVALID` | Bitrix24 returned the reference list in an unexpected shape |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable: it returned a server error or the connection dropped |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 tokens configured |
| 403 | `SCOPE_DENIED` | The API key lacks the `crm` scope |

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

## Known specifics

- **The Bitrix24 account defines the set and order of types.** The list is not sorted by `id`. Match types by `id`, not by name or position in the array.
- **Query parameters are ignored.** The method takes no parameters; any passed in the URL do not affect the response.

## See also

- [Addresses](/docs/entities/addresses)
- [CRM entity types](/docs/entities/crm-enums/owner-types)
- [CRM reference lists](/docs/entities/crm-enums)
