# createContactCustomField

Create an org-wide contact custom-field DEFINITION (name + type: TEXT | NUMBER | DOLLAR | DATE | LINK | DROPDOWN; `options` required for DROPDOWN; `allowMultiple` optional), synchronously. Returns the org custom-field catalog: find the new id by name (or listContactCustomFields), then write values via addCustomFieldValues (createContact) / updateCustomFieldValues (updateContact). A defaultValue fills every contact lacking a value, archived too, and stays if later changed; nothing counts them: ask first.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "createContactCustomField", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `input`: `CreateCustomFieldInput!` (required)
  - `name`: `String!` (required)
  - `type`: `ContactCustomFieldType!` (required, one of `DROPDOWN`, `TEXT`, `NUMBER`, `DOLLAR`, `DATE`, `LINK`)
  - `description`: `String`
  - `options`: `[String!]`
  - `defaultValue`: `String`
  - `allowMultiple`: `Boolean`
  - `allowAutomationOptions`: `Boolean`. Dropdown only: allow apply-time automation to mint new options. Default false.
  - `matchInboundTextsByValue`: `Boolean`. Text only: link an unknown number's text that quotes this value to its holder. Default false. Matches only a 6-64 character value, no spaces, mixing letters and digits.

## Response (data, an example)

```json
{
  "contactCustomFieldMutation": {
    "createCustomField": {
      "getMyOrganizationsCustomFields": [
        {
          "id": "<ID>",
          "name": "…",
          "type": "DROPDOWN"
        }
      ]
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "createContactCustomField",
    "variables": {
      "input": {
        "name": "<String>",
        "type": "DROPDOWN"
      }
    }
  }'
```
