POST
/
v1
/
identities.updateIdentity
curl --request POST \
  --url https://api.unkey.dev/v1/identities.updateIdentity \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "identityId": "id_1234",
  "externalId": "user_1234",
  "environment": "default",
  "meta": {},
  "ratelimits": [
    {
      "name": "tokens",
      "limit": 10,
      "duration": 1000
    }
  ]
}'
{
  "id": "id_1234",
  "externalId": "user_1234",
  "meta": {
    "stripeSubscriptionId": "sub_1234"
  },
  "ratelimits": [
    {
      "name": "tokens",
      "limit": 10,
      "duration": 1000
    }
  ]
}

Identities are in public beta. Please report any issues to support@unkey.dev

Update an identity’s metadata or limits.

Changelog

DateChanges
Jul 17 2024Introduced endpoint

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

The identity after the update.

The response is of type object.