## List website widgets for a form

`GET /v1/crm-forms/:id/site-buttons`

List website widgets in the Bitrix24 account and check their association with a CRM form.

## Parameters

| Parameter | Type | Required | Default | Description |
|-----------|-----|--------|-----------|-------------|
| `id` (path) | number | yes | — | Positive integer form ID. Source: [List CRM forms](/docs/entities/crm-forms/list) |
| `limit` (query) | number | no | `50` | Page size, from `1` to `1000` |
| `offset` (query) | number | no | `0` | Number of records to skip, an integer of `0` or greater |

Pagination: each request retrieves one page. Increase `offset` by `limit` to retrieve the next page. Pages are not fetched automatically.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/crm-forms/1/site-buttons?limit=50&offset=0" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/crm-forms/1/site-buttons?limit=50&offset=0" \
  -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-forms/1/site-buttons?limit=50&offset=0', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data, meta } = await res.json()
console.log(data)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-forms/1/site-buttons?limit=50&offset=0', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data, meta } = await res.json()
console.log(data)
```

## Response fields

| Field | Type | Description |
|------|-----|-------------|
| `success` | boolean | Always `true` on success |
| `data` | array | Array of website widgets |
| `data[].formId` | number | Requested form ID. Source: [List CRM forms](/docs/entities/crm-forms/list) |
| `data[].id` | number | Widget ID from this list |
| `data[].name` | string | Name. Webhook URLs and secret URL parameters are removed |
| `data[].bound` | boolean | Whether the item is associated with the requested form |
| `data[].system` | boolean | Whether this is a system widget |
| `data[].formsId` | number[] | IDs of forms associated with the widget. Source: [List CRM forms](/docs/entities/crm-forms/list) |
| `data[].previewUrl` | string \| null | Public preview URL, preserved unchanged. `null` when no preview is available |
| `meta.limit` | number | Requested page size |
| `meta.offset` | number | Requested offset |
| `meta.total` | number | Total record count. Omitted when the source does not supply a count |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "formId": 1,
      "id": 1,
      "name": "Website widget",
      "system": true,
      "bound": false,
      "formsId": [
        3
      ],
      "previewUrl": "https://example.bitrix24.com/pub/form/1_contact_details/idsj00/?view=preview&preview=button&preview_id=1"
    },
    {
      "formId": 1,
      "id": 3,
      "name": "Wix",
      "system": false,
      "bound": true,
      "formsId": [
        1
      ],
      "previewUrl": "https://example.bitrix24.com/pub/form/1_contact_details/idsj00/?view=preview&preview=button&preview_id=3"
    }
  ],
  "meta": {
    "limit": 50,
    "offset": 0
  }
}
```

## Error response example

400 — the form ID is not a positive integer:

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "id must be a positive safe integer"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|-------------|
| 400 | `INVALID_PARAMS` | Invalid `id`, `limit`, or `offset` |
| 400 | `UNKNOWN_FILTER_FIELD` | Unknown query parameter |
| 401 | `TOKEN_MISSING` | Bitrix24 credentials are missing or no OAuth session was provided |
| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope |
| 403 | `ACCESS_DENIED` | The Bitrix24 user lacks read permission |
| 404 | `ENTITY_NOT_FOUND` | Form not found |
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request |
| 429 | `RATE_LIMITED` | Rate limit exceeded. Retry after the interval in `Retry-After` |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned an invalid response |
| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond within the time limit. Retry the read after the interval in `Retry-After` |

For common API errors, see [Errors](/docs/errors).

## Known specifics

The list includes all website widgets in the Bitrix24 account, including items with `bound: false`. To select associated items, keep entries with `bound: true` in the response array. A `bound` query parameter is not supported.

Requires the `crm` scope. Keys in `READONLY` mode can use this endpoint. Reading does not change item settings.

## See also

- [List CRM forms](/docs/entities/crm-forms/list)
- [Form embedding](/docs/entities/crm-forms/embedding)
- [CRM forms](/docs/entities/crm-forms)
