POST
/
v1
/
identities.updateIdentity

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
headerrequired

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

Body

application/json
identityId
string

The id of the identity to update, use either identityId or externalId, if both are provided, identityId takes precedence.

externalId
string

The externalId of the identity to update, use either identityId or externalId, if both are provided, identityId takes precedence.

environment
string
default: default

This is not yet used but here for future compatibility.

meta
object

Attach metadata to this identity that you need to have access to when verifying a key.

Set to {} to clear.

This will be returned as part of the verifyKey response.

ratelimits
object[]

Attach ratelimits to this identity.

This overwrites all existing ratelimits on this identity. Setting an empty array will delete all existing ratelimits.

When verifying keys, you can specify which limits you want to use and all keys attached to this identity, will share the limits.

Response

200 - application/json
id
string
required

The id of the identity.

externalId
string
required

The externalId of the identity.

meta
object
required

The metadata attached to this identity.

ratelimits
object[]
required