PATCH
/
users
/
{id}
/
metadata
curl --request PATCH \
  --url https://{tenant_id}.hanko.io/admin/users/{id}/metadata \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "public_metadata": {
    "role": "admin"
  },
  "private_metadata": {
    "internal_id": "e6c19cfb-09a2-41e5-a908-e33193b7ca0a"
  },
  "unsafe_metadata": {
    "birthday": "2025-05-12"
  }
}'
{
  "public_metadata": {
    "role": "admin"
  },
  "private_metadata": {
    "internal_id": "e6c19cfb-09a2-41e5-a908-e33193b7ca0a"
  },
  "unsafe_metadata": {
    "birthday": "2025-05-12"
  }
}

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

The user metadata patch

Response

200
application/json

OK

User metadata