---
updatedAt: 2026-03-01T18:39:48.000Z
---

# Create an entity type

[block:html]
{
  "html": "<div class=\"AkaRecipe-Button\" role=\"button\">    \n    <div class=\"AkaRecipe-Title\">Create an entity type</div>\n  <a class=\"AkaRecipe-Link\" href=\"https://techdocs.akamai.com/identity-cloud-entity/recipes/create-an-entity-type\">Open Recipe<i class=\"icon-chevron-rightward\"></i></a>\n</div>"
}
[/block]

Creates a new entity type (user profile data store) using the specified set of attributes.

Refer to the [Registration error codes](https://techdocs.akamai.com/identity-cloud-entity/reference/registration-error-codes) page for details on error codes.

## Description

Creates a new entity type schema. Note that each entity type you create automatically includes these required attributes:

* **id**
* **uuid**
* **created**
* **lastUpdated**

## API client permissions

The following table indicates the API clients that can and can't be used to call this operation:

| owner          | access\_issuer | direct\_access | direct\_access\_read | login\_client  |
| :------------- | :------------- | :------------- | :------------------- | :------------- |
| ✓ | ✗ | ✗ | ✗       | ✗ |

## Authentication

This operation supports both Basic authentication (recommended) and janrain-signed authentication. See [Get started](https://techdocs.akamai.com/identity-cloud-entity/reference/get-started) for more information.

## Base URL

The base URL for this operation is your Identity Cloud Capture domain; for example:

`https://educationcenter.us-dev.janraincapture.com`

Your Capture domain (also known as a Registration domain) can be found in Console on the **Manage Application** page.

## Examples

### Example 1: Create an entity type with two string attributes

This command creates a new entity type named **user\_test**. The new entity type contains two attributes:

* **name**, a string attribute.
* **description**, a case-insensitive string attribute with a maximum length of 1,000 characters.

```curl
curl -X POST \
  -H "Authorization: Basic c2dueXZ1czZwYzRqbTdraHIybmVxNWdzODlnYnIyZXE6d3Q0YzN1bjl3a2tjZnZ5a25xeDQ0eW5jNDc2YWZzNjg"\
  --data-urlencode type_name=user_test \
  --data-urlencode attr_defs='[{"name":"name","type":"string","case-sensitive":false},{"name":"description","type":"string","length":1000,"case-sensitive":false}]' \
    https://my-app.janraincapture.com/entityType.create
```

**Example 1 response**

If your API call succeeds, the response contains information about all the attributes in the entity type, including the four attributes automatically added to each schema:

```json
{
  "schema": {
    "attr_defs": [
      {
        "name": "id",
        "description": "simple identifier for this entity",
        "type": "id"
      },
      {
        "name": "uuid",
        "description": "globally unique identifier for this entity",
        "type": "uuid"
      },
      {
        "name": "created",
        "description": "when this entity was created",
        "type": "dateTime"
      },
      {
        "name": "lastUpdated",
        "description": "when this entity was last updated",
        "type": "dateTime"
      },
      {
        "length": 1000,
        "name": "description",
        "type": "string",
        "case-sensitive": false
      },
      {
        "length": null,
        "name": "name",
        "type": "string",
        "case-sensitive": false
      }
    ],
    "name": "user_test"
  },
  "stat": "ok"
}
```

### Example 2: Create an entity type that includes a plural attribute

The following command creates a new entity type named **user2**. This entity type includes the following attributes:

* **consent**, a 200-character string value that's required and must be unique throughout the entity type
* **consentDescription**, a 1,000-character string value
* **consentAttributes**, a plural value containing a single child attribute (**consentName**)

```curl
curl -X POST \
  -H "Authorization: Basic dXQ0YmdycmE3dzI4MmpjZm15cGZxeDlwemhxaGpqMmI6dW5qemU5bndrZnV5NmpwdzgzOHFwYTdhZDNoZG55YTY=" \
  --data-urlencode type_name=user2 \
  --data-urlencode attr_defs='[{"name":"consent","type":"string","length":200,"description": "The name of the consent in the user entity.","constraints":["unique", "required"]},{"name": "consentDescription","type":"string","length":1000,"description":"A short description of the consent."},{"name":"consentAttributes","type":"plural","description":"Attributes associated with the consent.","attr_defs":[{"name":"consentName","type": "string","length":200,"description":"An attribute name from the user entity.","features":["primary-key"],"constraints":["locally-unique", "required"]}]}]' \
    https://my-app.janraincapture.com/entityType.create
```

**Example 2 response**

If your API call succeeds, the response contains information about all the attributes in the entity type, including the four attributes automatically added to each schema:

```json
{
    "schema": {
        "name": "user2",
        "attr_defs": [{
            "name": "id",
            "type": "id",
            "description": "simple identifier for this entity"
        }, {
            "name": "uuid",
            "type": "uuid",
            "description": "globally unique identifier for this entity"
        }, {
            "name": "created",
            "type": "dateTime",
            "description": "when this entity was created"
        }, {
            "name": "lastUpdated",
            "type": "dateTime",
            "description": "when this entity was last updated"
        }, {
            "length": 200,
            "case-sensitive": true,
            "constraints": ["unique", "required"],
            "name": "consent",
            "type": "string",
            "description": "The name of the consent in the user entity."
        }, {
            "name": "consentAttributes",
            "attr_defs": [{
                "name": "id",
                "type": "id",
                "description": "simple identifier for this sub-entity"
            }, {
                "length": 200,
                "case-sensitive": true,
                "constraints": ["locally-unique", "required"],
                "name": "consentName",
                "features": ["primary-key"],
                "type": "string",
                "description": "An attribute name from the user entity."
            }],
            "type": "plural",
            "description": "Attributes associated with the consent."
        }, {
            "length": 1000,
            "case-sensitive": true,
            "name": "consentDescription",
            "type": "string",
            "description": "A short description of the consent."
        }]
    },
    "stat": "ok"
}
```

## Parameters

All parameters need to be configured as **x-www-form-urlencoded** body parameters.

[block:parameters]
{
  "data": {
    "h-0": "Parameter",
    "h-1": "Type",
    "h-2": "Required",
    "h-3": "Description",
    "0-0": "attr_defs",
    "0-1": "JSON object",
    "0-2": "✓",
    "0-3": "Initial set of attributes for the entity type.  \n  \nThe JSON for the **attr_defs** parameter needs to be formatted similar to this:  \n  \n`[{\"name\":\"Name\",\"type\":\"string\",\"case-sensitive\":false}, {\"name\":\"Description\",\"type\":\"string\",\"length\":1000,\"case-sensitive\":false}]`  \n  \nSee [Schema data types](https://techdocs.akamai.com/identity-cloud/docs/identity-cloud-schema-data-types) for more information.",
    "1-0": "type_name",
    "1-1": "string",
    "1-2": "✓",
    "1-3": "Name of the new entity type."
  },
  "cols": 4,
  "rows": 2,
  "align": [
    "left",
    "left",
    "left",
    "left"
  ]
}
[/block]

# Sibling pages

* [View your entity types](https://techdocs.akamai.com/identity-cloud/docs/view-your-entity-types.md)
* [View an entity type](https://techdocs.akamai.com/identity-cloud/docs/view-an-entity-type.md)
* [Create an attribute](https://techdocs.akamai.com/identity-cloud/docs/create-an-attribute.md)
* [Delete an attribute](https://techdocs.akamai.com/identity-cloud/docs/delete-an-attribute.md)
* [View your validation rules](https://techdocs.akamai.com/identity-cloud/docs/view-your-validation-rules.md)
* [Create a validation rule](https://techdocs.akamai.com/identity-cloud/docs/create-a-validation-rule.md)
* [Delete a validation rule](https://techdocs.akamai.com/identity-cloud/docs/delete-a-validation-rule.md)
* [Assign constraints to an attribute](https://techdocs.akamai.com/identity-cloud/docs/assign-constraints-to-an-attribute.md)
* [Manage password history settings](https://techdocs.akamai.com/identity-cloud/docs/manage-password-history-settings.md)