Identities

Create a New Identity

Changed on

To create an identity, send a POST request to /v1/tenants/$TENANT_ID/realms/$REALM_ID/identities. Values in the request body for read-only fields will be ignored. If the request conflicts with an existing resource, you will receive a 409 error.

post/v1/tenants/{tenant_id}/realms/{realm_id}/identities

Request

Path parameters

tenant_idstring required
Example:000176d94fd7b4d1

A unique identifier for a tenant.

realm_idstring required
Example:19a95130480dfa79

A unique identifier for a realm.

Request body

Example request

{
  "identity": {
    "id": "e372db224c06e850",
    "realm_id": "8f5bec58229e6f29",
    "tenant_id": "0001f1f460b1ace6",
    "display_name": "Test Display",
    "create_time": "2022-04-12T05:53:07.119Z",
    "update_time": "2022-06-16T14:31:03.770Z",
    "status": "active",
    "traits": {
      "type": "traits_v0",
      "username": "test",
      "primary_email_address": "test@example.com"
    },
    "enrollment_status": "ENROLLED"
  }
}

Response

The response will be a JSON object containing the standard attributes associated with an identity.

idstring

A unique identifier for the identity. This is automatically generated on creation. This field is immutable and read-only. This field is unique within the realm.

realm_idstring

A unique identifier for the identity's realm. This is automatically set on creation. This field is immutable and read-only.

tenant_idstring

A unique identifier for the identity's tenant. This is automatically set on creation. This field is immutable and read-only.

display_namestring

A human-readable name for the identity. This name is used for display purposes.

create_timestring date-time

A time value given in ISO8601 combined date and time format that represents when the identity was created. This is automatically generated on creation. This field is read-only.

update_timestring date-time

A time value given in ISO8601 combined date and time format that represents when the identity was last updated. This is automatically updated when the identity is updated. This field is read-only.

statusstring

Indicator for the identity's administrative status. If 'active', the identity is able to generate passkeys and login. If 'suspended', the identity is unable to generate passkeys or login.

enrollment_status'ENROLLED' | 'PENDING' | 'INVITE_FAILED' | 'UNENROLLED'

Indicator for the identity's enrollment status.

If 'ENROLLED', the identity has 1 or more active passkeys. If 'PENDING', the identity has no active passkeys and 1 or more pending enrollments. If 'INVITE_FAILED', the identity has no active passkeys, no pending enrollments, and 1 or more failed enrollments. If 'UNENROLLED', the identity is not enrolled in the organization.

May be undefined. This field is output-only.

Example response

{
  "id": "e372db224c06e850",
  "realm_id": "8f5bec58229e6f29",
  "tenant_id": "0001f1f460b1ace6",
  "display_name": "Test Display",
  "create_time": "2022-04-12T05:53:07.119Z",
  "update_time": "2022-06-16T14:31:03.770Z",
  "status": "active",
  "traits": {
    "type": "traits_v0",
    "username": "test",
    "primary_email_address": "test@example.com"
  },
  "enrollment_status": "ENROLLED"
}

Changes