---
title: Create identifier
slug: data-platform/api/create-identifier
docTags: 
createdAt: 2026-09-02T14:41:00.110Z
---

{
  "id": "2RxmlE_2WpXyc5S-H_mJW",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.us1.odp.optimizely.com/v3/schema/identifiers",
    "servers": [
      {
        "url": "https://api.us1.odp.optimizely.com/v3/schema/identifiers",
        "description": "United States"
      },
      {
        "url": "https://api.eu1.odp.optimizely.com/v3/schema/identifiers",
        "description": "Europe"
      },
      {
        "url": "https://api.au1.odp.optimizely.com/v3/schema/identifiers",
        "description": "Asia-Pacific"
      }
    ],
    "name": "Create identifier",
    "description": "<p>Create an identifier in Optimizely Data Platform (ODP) to use for user resolution.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "example": "{\"name\":\"facebook_messenger_id\",\"display_name\":\"Facebook Messenger ID\",\"public_read\":false,\"merge_confidence\":\"high\",\"messaging\":true}",
          "examples": [
            {
              "label": "Example Payload",
              "value": "{\"name\":\"facebook_messenger_id\",\"display_name\":\"Facebook Messenger ID\",\"public_read\":false,\"merge_confidence\":\"high\",\"messaging\":true}"
            }
          ],
          "description": "",
          "customType": "Identifier",
          "schema": [
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "<p>The field name of the identifier, ending with one of the known suffixes: id, hash, number, token, alias, address, key.</p>"
            },
            {
              "name": "display_name",
              "kind": "required",
              "type": "string",
              "description": "<p>The human-readable name, ending with the title case version of the name suffix: ID, Hash, Number, Token, Alias, Address, Key.</p>"
            },
            {
              "name": "public_read",
              "kind": "optional",
              "type": "boolean",
              "description": "Enable access with the API public key.",
              "default": false
            },
            {
              "name": "merge_confidence",
              "kind": "required",
              "type": "string",
              "description": "<p>The level of confidence (<code>high</code> or <code>low</code>) that this identifier can be used to merge customer profiles together.</p>"
            },
            {
              "name": "messaging",
              "kind": "optional",
              "type": "boolean",
              "description": "Whether this identifier can be used to message customers in campaigns."
            }
          ],
          "modelRef": "#/components/schemas/Identifier",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "x-api-key",
          "name": "x-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Created",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"events\":[{\"name\":\"event_facebook_messenger_id\",\"display_name\":\"Event Facebook Messenger ID\",\"type\":\"identifier\"}],\"customers\":[{\"name\":\"facebook_messenger_id\",\"display_name\":\"Last Seen Facebook Messenger ID\",\"type\":\"identifier\"}]}",
            "description": "",
            "customType": "IdentifierCreated",
            "schema": [
              {
                "name": "events",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "event_facebook_messenger_id"
                  },
                  {
                    "name": "display_name",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "Event Facebook Messenger ID"
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "identifier"
                  }
                ]
              },
              {
                "name": "customers",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "facebook_messenger_id"
                  },
                  {
                    "name": "display_name",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "Last Seen Facebook Messenger ID"
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "identifier"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/IdentifierCreated",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"title\":\"Bad Request\",\"status\":400,\"timestamp\":\"2018-08-07T13:44:17.659Z\",\"detail\":{\"invalids\":[{\"field\":\"customers.name\",\"reason\":\"already used by another object\"},{\"field\":\"customers.display_name\",\"reason\":\"already used by another object\"}]}}",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "title",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "Bad Request"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "integer",
                "description": "",
                "example": 400,
                "default": 0
              },
              {
                "name": "timestamp",
                "kind": "optional",
                "type": "string",
                "description": "",
                "example": "2018-08-07T13:44:17.659Z"
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "invalids",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "field",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "name"
                      },
                      {
                        "name": "reason",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "already used by another object"
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "y_K_sWGb5bJCdjaMJE58h",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.us1.odp.optimizely.com/v3/schema/identifiers \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"name\": \"\",\n     \"display_name\": \"\",\n     \"merge_confidence\": \"\"\n     }'"
        },
        {
          "id": "vfOuZdYw9gtGtXqmMoOtH",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"name\": \"\",\n   \"display_name\": \"\",\n   \"merge_confidence\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.us1.odp.optimizely.com/v3/schema/identifiers\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "x4LSqBOAHh-exwjFolMj5",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.us1.odp.optimizely.com/v3/schema/identifiers\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"name\": \"\",\n   \"display_name\": \"\",\n   \"merge_confidence\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "_73JSqhATHCRLcUKgvfAq",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.us1.odp.optimizely.com/v3/schema/identifiers\"\n\npayload = json.dumps({\n   \"name\": \"\",\n   \"display_name\": \"\",\n   \"merge_confidence\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "y_K_sWGb5bJCdjaMJE58h"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "// Created\n{\n  \"events\": [\n    {\n      \"name\": \"event_facebook_messenger_id\",\n      \"display_name\": \"Event Facebook Messenger ID\",\n      \"type\": \"identifier\"\n    }\n  ],\n  \"customers\": [\n    {\n      \"name\": \"facebook_messenger_id\",\n      \"display_name\": \"Last Seen Facebook Messenger ID\",\n      \"type\": \"identifier\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n{\n  \"title\": \"Bad Request\",\n  \"status\": 400,\n  \"timestamp\": \"2018-08-07T13:44:17.659Z\",\n  \"detail\": {\n    \"invalids\": [\n      {\n        \"field\": \"name\",\n        \"reason\": \"already used by another object\"\n      }\n    ]\n  }\n}"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}