---
docId: doc_aadfc6e16adc48408a502a50683f477c
title: List custom fields
description: >-
  Returns the list of custom fields configured for your customers in a
  workspace.
api:
  group: campos-personalizados
  auth: bearer
  operations:
    - operationId: listCustomFields
      method: GET
      path: /v1/custom-fields
      postmanName: List custom fields
---

<script>
  import { Note, Ways } from '$lib/components';
</script>

# List custom fields

Find a field’s `id` and type to save a value on a contact or change the field settings. The response includes workspace custom fields and the built-in fields every contact has.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl https://api.platic.ai/v1/custom-fields \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.customFields.list();
```

</Ways.Way>
</Ways>

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|-----------|
| `workspace` | string | Workspace ID. Required when your credential covers several workspaces ([list workspaces](/api-reference/workspaces)); without it the answer is `400` | If the credential has several |

## Response

```json
{
  "status": "success",
  "data": [
    {
      "id": "status",
      "name": "status",
      "type": "text",
      "automatic": false,
      "overwritable": false,
      "description": "Use this field to record the current status of the customer",
      "status": "active"
    },
    {
      "id": "sales_stage",
      "name": "Sales stage",
      "type": "select",
      "automatic": false,
      "overwritable": false,
      "description": "Current stage of the customer in the funnel",
      "status": "active",
      "ordered": true,
      "options": [
        { "id": "new", "label": "New", "order": 0 },
        { "id": "contacted", "label": "Contacted", "order": 1 },
        { "id": "closed", "label": "Closed", "order": 2 }
      ]
    }
  ],
  "defaultFields": [
    {
      "name": "Nombre",
      "id": "name",
      "type": "text",
      "description": "Nombre completo del cliente"
    },
    {
      "name": "Correo electrónico",
      "id": "email",
      "type": "text",
      "description": "Email del cliente"
    }
  ]
}
```

`defaultFields` always has the same 12 fields; the example shows two.

## Response fields

`data` is the list of the workspace's custom fields. Each field has:

| Field | Description |
|-------|-------------|
| `id` | Unique custom-field identifier (slug derived from the name) |
| `name` | Original field name as defined |
| `type` | Field type (see [Create custom field](/api-reference/custom-fields/create) for the full list) |
| `automatic` | Whether the AI should fill the field automatically from the conversation |
| `overwritable` | Whether the AI can overwrite the field's existing value |
| `description` | What the field is used for |
| `status` | Field state: `active` |
| `ordered` | **`select` only.** Whether the options are an ordered sequence (stages/steps) |
| `options` | **`select` only.** Option catalog. Each option includes `id`, `label`, and optionally `color`, `order`, and `archived`. A customer's value for this field is an option `id` |

Next to `data` there is one more field:

| Field | Description |
|-------|-------------|
| `defaultFields` | The 12 built-in fields every contact has (`name`, `firstname`, `lastname`, `email`, `birthdate`, `gender`, `company`, `country`, `state`, `city`, `address`, `postalCode`). Each one has `name`, `id`, `type`, and `description`. They are the same in every workspace and cannot be created, changed, or deleted |

<Note type="note">

When using custom fields in your requests, only use lowercase characters without accents or special characters. Use underscores `_` instead of spaces.

</Note>

## Errors

| Status | `details.code` | When it happens |
|--------|----------------|-----------------|
| `400` | `INVALID_REQUEST` | Your credential covers several workspaces and you did not send `?workspace=`, or you sent one it does not cover. `details.available` lists the ones you can use |
| `401` | `UNAUTHENTICATED` | The credential is missing or invalid |
| `403` | `FORBIDDEN` | The credential does not have the Contacts module (`Missing contacts permission`) |
| `500` | `INTERNAL_ERROR` | The fields could not be read. Try again |

```json
{
  "code": 403,
  "error": "Forbidden - You don't have permission for this resource",
  "details": {
    "code": "FORBIDDEN",
    "message": "Missing contacts permission"
  }
}
```

The general error format is in [Errors](/api-reference/errors).
