API Documentation
Public
- Introduction
- Flow
- Status
- Passcode
- Password
- WebAuthn
- .well-known
- Third Party
- Token
- User Management
- Email Management
- Session Management
Admin
- Introduction
- Status
- User Management
- Email Management
- Password Management
- WebAuthn credential Management
- OTP Management
- Session Management
- Webhooks
- Audit Logs
- Metrics
Create a new user
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
Bearer authentication header of the form Bearer <token>
, where <token>
is your API key. Must only be used when using Hanko Cloud.
Body
The ID of the new user
The username of the new user
Time of creation of the user
Response
The ID of the user
Time of creation of the user
Time of last update of the user
List of registered Webauthn credentials
The ID of the credential
The public key of the credential
The attestation type the credential was registered with
The AAGUID of the authenticator the credentials was created on
Time of creation of the credential
Indicates if the credential can be backed up
Indicates if the credential is backed up
Indicates if the credential can only be used as a MFA credential
A name that the user choose
The ways the authenticator is connected
The time when the credential was last used
List of emails associated to the user
The ID of the email
The email address
Indicated the email has been verified.
Indicates it's the primary email address.
Time of creation of the email
Time of last update of the email
A list of third party provider identities
The ID of the identity
The ID of the email this identity is coupled with
The user's third party provider account/user ID
The name of the third party provider this identity coupled with
Time of creation of the password credential
Time of last update of the password credential
Was this page helpful?
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"
}
]
}