POST
/
users
curl --request POST \
  --url https://{tenant_id}.hanko.io/admin/users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
  "emails": [
    {
      "address": "<string>",
      "is_primary": true,
      "is_verified": true
    }
  ],
  "username": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}'
{
  "id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "webauthn_credentials": [
    {
      "id": "f9bebc04-b894-4018-bdb8-8b520a532fef",
      "name": "<string>",
      "public_key": "<string>",
      "attestation_type": "<string>",
      "aaguid": "<string>",
      "transports": [
        "<string>"
      ],
      "created_at": "2023-11-07T05:31:56Z",
      "last_used_at": "2023-11-07T05:31:56Z",
      "backup_eligible": true,
      "backup_state": true,
      "mfa_only": true
    }
  ],
  "emails": [
    {
      "id": "802df042-1ac2-496d-af81-6ace729ed055",
      "address": "jsmith@example.com",
      "is_verified": true,
      "is_primary": true,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "username": {
    "id": "8cbed467-554b-4d17-b23f-bce1b4f1db92",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "password": {
    "id": "28a7206b-e789-435a-b87c-108e034135c2",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "identities": [
    {
      "id": "77f8d594-9765-4891-ab2b-f31a797b531d",
      "email_id": "d4095586-8318-4a40-a840-b4260496f85a",
      "provider_id": "<string>",
      "provider_name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your API key. Must only be used when using Hanko Cloud.

Body

application/json
emails
object[]
required

The email addresses of the new user

id
string

The ID of the new user

username
string

The username of the new user

created_at
string

Time of creation of the user

Response

200
application/json
Details of the newly created user
id
string
required

The ID of the user

created_at
string
required

Time of creation of the user

updated_at
string
required

Time of last update of the user

webauthn_credentials
object[]

List of registered Webauthn credentials

emails
object[]

List of emails associated to the user

username
object

The username of the user

password
object

The password credential of a user

identities
object[]

A list of third party provider identities