Skip to main content
Rezolve Ai
API ReferenceTenants

Create a tenant

POST
/tenants

Create a tenant for one of your users, and optionally mint its first key in the same call. Idempotent on externalId: a repeat returns the tenant made the first time with 200 and created false, and mints no second key. Every tenant's usage is charged to your account's credits. 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.

Request Body

application/json
  1. body
name*string
Lengthlength <= 200
externalId?string

Your own id for the tenant, for example your application id.

Lengthlength <= 255
config?

Defaults for the tenant's enrichment calls. A call that leaves a field out uses the default; a field the call sends always wins. Brand voice merges field by field.

key?

Response Body

A tenant with this externalId already existed and is returned as it is

application/json
  1. response
data?
Example Request
curl -X POST 'https://example.com/api/v1/tenants' \  -H 'Content-Type: application/json' \  -d '{  "name": "Acme Outdoor",  "externalId": "457afb25-a978-4275-80b1-cc64a9be9f13",  "config": {    "targetLanguage": "en-GB",    "brandVoice": {      "tone": "warm",      "targetAudience": "hikers"    }  },  "key": {    "env": "live"  }}'
Example Response
{  "data": {    "tenant": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "externalId": "string",      "name": "string",      "status": "active",      "config": {        "brandVoice": {          "tone": "string",          "contentStyle": "string",          "targetAudience": "string",          "languageComplexity": "string",          "language": "string"        },        "targetLanguage": "en-GB",        "creativityLevel": 1,        "contentTypes": [          "product-description",          "meta-tags"        ],        "reviewQueue": false      },      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    },    "created": false  }}