---
updatedAt: 2026-06-18T17:51:45.000Z
agentTools:
  projectIndex: https://marketing.developer.dotdigital.com/llms.txt
---

# Create contact data field

Creates a contact data field within the account

Use this operation to create a contact data field within your account.

You can't create a contact data field that already exists. If you are unsure which data fields currently exist, call [Get Contact Data Fields](get-contact-data-fields).

The amount of contact data fields you can create is limited by your account type.

<span class="callRateMedium" />

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Contact data fields",
    "version": "2.0.1",
    "description": "Manage the custom data fields used to store structured attributes against contacts. Use this API to create new fields (string, numeric, date, or boolean), list all fields defined in the account, and delete fields that are no longer needed. Contact data fields drive personalisation, segmentation, and targeting across your marketing activity.\n"
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "x-samples-languages": [
    "curl",
    "csharp",
    "java",
    "javascript",
    "node",
    "python",
    "php",
    "ruby"
  ],
  "externalDocs": {
    "description": "Learn more about Dotdigital APIs",
    "url": "https://developer.dotdigital.com"
  },
  "servers": [
    {
      "url": "https://{region}-api.dotdigital.com",
      "variables": {
        "region": {
          "default": "r1",
          "enum": [
            "r1",
            "r2",
            "r3"
          ],
          "description": "The Dotdigital region id your account belongs to"
        }
      }
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "paths": {
    "/v2/data-fields": {
      "parameters": [
        {
          "in": "header",
          "name": "x-ddg-integration-token",
          "required": false,
          "description": "If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here.",
          "schema": {
            "type": "string",
            "pattern": "/^(?:\\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\\}{0,1})$/",
            "example": "5a96bc79-19a7-4544-973b-e2da0c9136f9"
          }
        }
      ],
      "post": {
        "summary": "Create contact data field",
        "deprecated": false,
        "description": "Creates a contact data field within the account",
        "operationId": "create-contact-data-field",
        "tags": [
          "Contact data fields"
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 20,
                    "pattern": "[a-zA-Z0-9_-]{1,20}",
                    "description": "The name of the contact data field being created. It can be a maximum of 20 characters in length and must contain alphanumeric characters only, with hyphens and underscores if required."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "String",
                      "Numeric",
                      "Date",
                      "Boolean"
                    ],
                    "description": "The data type of the contact data field you''re creating.",
                    "examples": [
                      "Date"
                    ]
                  },
                  "visibility": {
                    "type": "string",
                    "description": "Choose for your data field to be either private or public",
                    "default": "Private",
                    "enum": [
                      "Private",
                      "Public"
                    ]
                  },
                  "defaultValue": {
                    "type": "string",
                    "description": "The default value of your data field. It can be any data type."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "name": "BIRTHDAY",
                    "type": "Date"
                  },
                  "summary": "Request Example"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "examples": [
                        "BIRTHDAY"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "String",
                        "Numeric",
                        "Date",
                        "Boolean"
                      ],
                      "description": "The data type of the contact data field you''re creating.",
                      "examples": [
                        "Date"
                      ]
                    },
                    "visibility": {
                      "type": "string",
                      "enum": [
                        "Public",
                        "Private"
                      ],
                      "examples": [
                        "Public"
                      ]
                    },
                    "defaultValue": {}
                  }
                },
                "examples": {
                  "Result": {
                    "summary": "Result",
                    "value": {
                      "name": "BIRTHDAY",
                      "type": "Date",
                      "visibility": "Private",
                      "defaultValue": null
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```

# Sibling pages

* [Get contact data fields](https://marketing.developer.dotdigital.com/reference/get-contact-data-fields.md)
* [Delete contact data field](https://marketing.developer.dotdigital.com/reference/delete-contact-data-field.md)