Skip to main content
Rezolve Ai
API ReferenceTenantsIdKeys

Create a tenant key

POST
/tenants/{id}/keys

Mint a key that works only for this tenant. Give it to the system that calls for this tenant, or keep it in your gateway and use it instead of X-Tenant-Id. The secret is returned once. Partner accounts only: call it with your partner account's account-wide key, which needs the admin scope, and without X-Tenant-Id.

Authorization

headerAuthorizationBearer <API key>

API key in the Authorization header: Authorization: Bearer ace_live_.... Use an ace_test_... key for the free, rate-capped sandbox.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
name?string
Lengthlength <= 100
env?string
Default"live"
Value in"live""test"
scopes?array<>

Defaults to enrichment:read, enrichment:write and utils:read. A tenant key cannot hold admin or webhooks scopes.

Items1 <= items
rateLimitPerMinute?integer

Defaults to 120 for a live key. A test key is capped at 20.

Range1 <= value <= 6000
expiresAt?|
Formatdate-time

Response Body

Created. data.key is the secret, shown only this once.

application/json
  1. response
data?
Example Request
curl -X POST 'https://example.com/api/v1/tenants/497f6eca-6276-4993-bfeb-53cbbbba6f08/keys' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",    "name": "string",    "env": "live",    "keyPrefix": "ace_live_Ab12Cd34",    "scopes": [      "string"    ],    "rateLimitPerMinute": 0,    "expiresAt": "2019-08-24T14:15:22Z",    "lastUsedAt": "2019-08-24T14:15:22Z",    "rotatedAt": "2019-08-24T14:15:22Z",    "graceExpiresAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "key": "string"  }}