POST
/
users
/
{id}
/
emails
curl --request POST \
  --url https://{tenant_id}.hanko.io/admin/users/{id}/emails \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "jsmith@example.com",
  "is_primary": true,
  "is_verified": true
}'
{
  "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"
}

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.

Path Parameters

id
string
required

UUID of the requested object

Body

application/json
Request Body for creating an email for a user
address
string
required
is_primary
boolean
is_verified
boolean

Response

201
application/json
Created
id
string
required

The ID of the email

address
string
required

The email address

is_verified
boolean
required

Indicated the email has been verified.

is_primary
boolean
required

Indicates it's the primary email address.

created_at
string
required

Time of creation of the email

updated_at
string
required

Time of last update of the email