# Custom Fields API

> Contact custom field definitions (text, number, date, boolean, select). Slugs are unique per workspace.

Base URL: `https://api.socialit.com/v1`. Authenticate with `Authorization: Bearer <API key or OAuth token>`.

## List custom fields

`GET /custom-fields`

Access: `read` · MCP tool: `list-custom-fields` · Zernio: `GET /v1/custom-fields`

### Query parameters

- `page` (integer; ≥ 1): Page number
- `limit` (integer; 1–100): Items per page (max 100)
- `sort` (string; one of created_at, name, slug)
- `order` (string; one of asc, desc)
- `match` (string; one of all, or): Combine filters with AND (default) or OR
- `profile_id` (string)
- `type` (string)

```bash
curl "https://api.socialit.com/v1/custom-fields" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "list",
  "data": [
    {
      "object": "custom_field",
      "id": "string",
      "profile_id": "string",
      "name": "string",
      "slug": "string",
      "type": "text",
      "options": [
        "string"
      ],
      "created_at": "2026-10-13T09:00:00.000Z",
      "updated_at": "2026-10-13T09:00:00.000Z"
    }
  ],
  "page": 1,
  "limit": 1,
  "total": 1,
  "has_more": true,
  "next_page_url": "https://example.com",
  "previous_page_url": "https://example.com"
}
```

## Create a custom field

`POST /custom-fields`

slug defaults to the name in snake_case; 409 slug_taken when used. options are required for select.

Access: `write` · MCP tool: `create-custom-field` · Zernio: `POST /v1/custom-fields`

### Headers

- `Idempotency-Key` (string; ≤ 255 characters): Unique key (for example a UUID) that makes retries safe: a repeated request with the same key and body returns the first response (Idempotent-Replayed: true) for 24 hours.

### Body

- `profile_id` (string)
- `name` (string; required; 1–120 characters)
- `slug` (string; 1–120 characters)
- `type` (string; required; one of text, number, date, boolean, select)
- `options` (array of string; ≤ 200 items)

```bash
curl -X POST "https://api.socialit.com/v1/custom-fields" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "profile_id": "string",
    "name": "string",
    "slug": "string",
    "type": "text",
    "options": [
      "string"
    ]
  }'
```

Response 201:

```json
{
  "object": "custom_field",
  "id": "string",
  "profile_id": "string",
  "name": "string",
  "slug": "string",
  "type": "text",
  "options": [
    "string"
  ],
  "created_at": "2026-10-13T09:00:00.000Z",
  "updated_at": "2026-10-13T09:00:00.000Z"
}
```

## Get a custom field

`GET /custom-fields/{id}`

Access: `read` · MCP tool: `get-custom-field`

### Path parameters

- `id` (string; required; 1–80 characters): customField id (cf_…)

```bash
curl "https://api.socialit.com/v1/custom-fields/cf_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "custom_field",
  "id": "string",
  "profile_id": "string",
  "name": "string",
  "slug": "string",
  "type": "text",
  "options": [
    "string"
  ],
  "created_at": "2026-10-13T09:00:00.000Z",
  "updated_at": "2026-10-13T09:00:00.000Z"
}
```

## Update a custom field

`PATCH /custom-fields/{id}`

Name and options only (type and slug are immutable).

Access: `write` · MCP tool: `update-custom-field` · Zernio: `PATCH /v1/custom-fields/{fieldId}`

### Path parameters

- `id` (string; required; 1–80 characters): customField id (cf_…)

### Body

- `name` (string; 1–120 characters)
- `options` (array of string; ≤ 200 items)

```bash
curl -X PATCH "https://api.socialit.com/v1/custom-fields/cf_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "options": [
      "string"
    ]
  }'
```

Response 200:

```json
{
  "object": "custom_field",
  "id": "string",
  "profile_id": "string",
  "name": "string",
  "slug": "string",
  "type": "text",
  "options": [
    "string"
  ],
  "created_at": "2026-10-13T09:00:00.000Z",
  "updated_at": "2026-10-13T09:00:00.000Z"
}
```

## Delete a custom field

`DELETE /custom-fields/{id}`

Deletes the definition and every stored value.

Access: `write` · MCP tool: `delete-custom-field` · Zernio: `DELETE /v1/custom-fields/{fieldId}`

### Path parameters

- `id` (string; required; 1–80 characters): customField id (cf_…)

```bash
curl -X DELETE "https://api.socialit.com/v1/custom-fields/cf_2Jx0Fq5Pz8vYkB3mN6rT1wQ9sLd" \
  -H "Authorization: Bearer $SOCIALIT_API_KEY"
```

Response 200:

```json
{
  "object": "custom_field",
  "id": "string",
  "deleted": true
}
```


---

Source: https://socialit.com/docs/api-reference/custom-fields/
