---
title: "Create a new custom field"
description: "POST /custom_fields — Only admins can create custom fields."
canonical_url: https://developer.onepagecrm.com/api/reference/custom-fields/post-custom_fields/
source: Markdown mirror of https://developer.onepagecrm.com/api/reference/custom-fields/post-custom_fields/
---

`POST /custom_fields`

Only admins can create custom fields.

Resource: [Custom Fields](https://developer.onepagecrm.com/api/reference/custom-fields/) · [API Reference](https://developer.onepagecrm.com/api/reference/)

## Request

```bash
curl -X POST "https://app.onepagecrm.com/api/v3/custom_fields" \
  -u $user_id:$api_key \
  -H "Content-Type: application/json" \
  -d '{
    "id": "5aad9b039007ba18c9ebad13",
    "name": "Favorite season",
    "type": "select_box",
    "position": 2,
    "choices": [
      "Spring",
      "Summer",
      "Autumn",
      "Winter"
    ]
  }'
```

Authentication is HTTP Basic — `user_id` as username, `api_key` as password.
See https://developer.onepagecrm.com/api/authentication/.

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (bson-id) |  | ID of the custom field |
| `name` | string | yes | Name of the custom field |
| `type` | string | yes | Type of the custom field. There are several types of custom fields that may store data in different formats. External ID type is a special type introduced for referencing entities in the external systems. Its value is unique amid the whole system. Section divider type is introduced just for visual purpose: it allows grouping custom fields. If custom fields in the section don't have values then they are hidden in the 'view' UI (but always shown in 'edit' UI). This logic is applied in the API: if a contact doesn't have values for all the custom fields in the section then this section divider custom field isn't exposed in the API (along with other custom fields inside the section). |
| `position` | integer (int32) |  | The position of the custom field in the list |
| `choices` | array<string> |  | A list of possible choices (for fields of type `multiple_choice` or `select_box`) |

## Responses

### 201

Created

```json
{
  "status": 0,
  "message": "OK",
  "timestamp": 1528373119,
  "data": {
    "custom_field": {
      "id": "5aad9b039007ba18c9ebad13",
      "name": "Favorite season",
      "type": "select_box",
      "position": 2,
      "choices": [
        "Spring",
        "Summer",
        "Autumn",
        "Winter"
      ]
    }
  }
}
```

Standard error responses: 400, 401, 403, 404, 409, 500 — shared across the API. See https://developer.onepagecrm.com/api/errors/.

## Related guides

- [Authentication](https://developer.onepagecrm.com/api/authentication/)
- [Errors](https://developer.onepagecrm.com/api/errors/)
- [Rate limits](https://developer.onepagecrm.com/api/rate-limits/)
