# Create identity

The identity creation process is necessary to enable authentication for a given user. Subsequent authentication attempts for this user will be compared against this created identity, based on the personId, while storing the user's context data. A clear selfie is required, used for facial validation.

Email and phone are optional for the API, but required if you intend to allow OTPs as a means of re-authenticating this user. In this case, in addition to enabling email or SMS in the authentication policy, users must have an email and phone number registered.

{% hint style="warning" %}
All calls to the API are authenticated and must have the token next to `Bearer` prefix in the `Authorization` header of the request. Calls with a missing or invalid access token will return status code **401** ("Unauthorized").
{% endhint %}

The token used to make requests to the API is the **access token** [generated according to these instructions.](../authentication).

{% openapi src="https://3218940882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVxCOSyBojfSIE5fcpfH%2Fuploads%2Fgit-blob-628e423d896fc5072cf17cbe7bfadd7d7e33f617%2Fcreate-identity.yaml?alt=media" path="/identities" method="post" %}
[create-identity.yaml](https://3218940882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVxCOSyBojfSIE5fcpfH%2Fuploads%2Fgit-blob-628e423d896fc5072cf17cbe7bfadd7d7e33f617%2Fcreate-identity.yaml?alt=media)
{% endopenapi %}
