# List custom code blocks

`GET https://api.cademi.com.br/api/v3/settings/custom-code`

Operation ID: `custom_code.list` · API v3

Returns the metadata of the account's custom code blocks, using cursor-based pagination.

By default, only blocks that are not in the trash are returned. Set `deleted=true` to list only blocks in the trash.

The `content` object is never included in this collection. To read a block's code, use the retrieve operation with the `custom_code.read_content` permission.

Required permissions: `custom_code.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `limit` | query | integer | no |  |
| `cursor` | query | string | no |  |
| `deleted` | query | boolean | no |  |

## Responses

### 200

Returns the collection of custom code blocks.

Body: `data`: array of CustomCode.

Fields of CustomCode:

| Field | Type | Required | Description |
|---|---|---|---|
| `content` | object or null | no | Code content. Returned only when retrieving a single custom code block with a credential that has the customcode.readcontent permission. |
| `created_at` | string (date-time) | yes |  |
| `deleted` | boolean | yes |  |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `object` | string, one of `custom_code` | yes |  |
| `position` | string, one of `head`, `body` | yes |  |
| `revision` | string | yes |  |
| `status` | string, one of `active`, `inactive` | yes |  |
| `type` | string, one of `active-campaign`, `custom`, `facebook-pixel`, `analytics`, `tagmanager`, `pushalertco`, `whats` | yes |  |
| `updated_at` | string (date-time) | yes |  |

### 400

The cursor is invalid or the request contains an unsupported query parameter.

Body: Error.

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
