Update Identity
Update an identity's metadata and rate limits. Only specified fields are modified - others remain unchanged.
Perfect for subscription changes, plan upgrades, or updating user information. Changes take effect immediately.
Important
Requiresidentity.*.update_identitypermission
Rate limit changes propagate within 30 seconds
Authorization
Body
application/jsonLength: min 1
Replaces all existing metadata with this new metadata object.
Omitting this field preserves existing metadata, while providing an empty object clears all metadata.
Avoid storing sensitive data here as it's returned in verification responses.
Large metadata objects increase verification latency and should stay under 10KB total size.
Replaces all existing identity rate limits with this complete list of rate limits.
Omitting this field preserves existing rate limits, while providing an empty array removes all rate limits.
These limits are shared across all keys belonging to this identity, preventing abuse through multiple keys.
Rate limit changes take effect immediately but may take up to 30 seconds to propagate across all regions.
Items: max 50
Show child attributesHide child attributes
The name of this rate limit. This name is used to identify which limit to check during key verification.
Best practices for limit names:
- Use descriptive, semantic names like 'api_requests', 'heavy_operations', or 'downloads'
- Be consistent with naming conventions across your application
- Create separate limits for different resource types or operation costs
- Consider using namespaced names for better organization (e.g., 'files.downloads', 'compute.training')
You will reference this exact name when verifying keys to check against this specific limit.
Length: 3–128
The maximum number of operations allowed within the specified time window.
When this limit is reached, verification requests will fail with code=RATE_LIMITED until the window resets. The limit should reflect:
- Your infrastructure capacity and scaling limitations
- Fair usage expectations for your service
- Different tier levels for various user types
- The relative cost of the operations being limited
Higher values allow more frequent access but may impact service performance.
Range: >= 1
The duration for each ratelimit window in milliseconds.
This controls how long the rate limit counter accumulates before resetting. Common values include:
- 1000 (1 second): For strict per-second limits on high-frequency operations
- 60000 (1 minute): For moderate API usage control
- 3600000 (1 hour): For less frequent but costly operations
- 86400000 (24 hours): For daily quotas
Shorter windows provide more frequent resets but may allow large burst usage. Longer windows provide more consistent usage patterns but take longer to reset after limit exhaustion.
Range: >= 1000
Default: false
Responses
Show child attributesHide child attributes
Show child attributesHide child attributes
Length: 8–255Pattern: ^rl_[a-zA-Z0-9_]+$
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).Show child attributesHide child attributes
JSON path indicating exactly where in the request the error occurred. This helps pinpoint the problematic field or parameter. Examples include:
- 'body.name' (field in request body)
- 'body.items[3].tags' (nested array element)
- 'path.apiId' (path parameter)
- 'query.limit' (query parameter)
Use this location to identify exactly which part of your request needs correction.
requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).requestId is particularly important when troubleshooting issues with the Unkey support team.Show child attributesHide child attributes
Show child attributesHide child attributes
400 (Bad Request), 401 (Unauthorized), 403 (Forbidden), 404 (Not Found), 409 (Conflict), and 500 (Internal Server Error).