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

`POST /company_fields`

Only admins can create company fields.

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

## Request

```bash
curl -X POST "https://app.onepagecrm.com/api/v3/company_fields" \
  -u $user_id:$api_key \
  -H "Content-Type: application/json" \
  -d '{
    "id": "5aad9b039007ba28c9ebad56",
    "name": "Company size",
    "type": "select_box",
    "position": 2,
    "choices": [
      "Small",
      "Medium",
      "Large"
    ]
  }'
```

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 company field |
| `name` | string | yes | Name of the company field |
| `type` | string | yes | Type of the company 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 company 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 company 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": {
    "company_field": {
      "id": "5aad9b039007ba28c9ebad56",
      "name": "Company size",
      "type": "select_box",
      "position": 2,
      "choices": [
        "Small",
        "Medium",
        "Large"
      ]
    }
  }
}
```

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/)
