Create Tenants

Create multiple tenants with users. Accepts JSON array of tenants. Package or template must be a HashID.

Body·AdminCreateTenantsInput
required
application/json
  • tenants
    Type: array object[] · Tenants 1…100
    required

    List of tenants to create

Responses
  • application/json
  • 400

    Validation error - duplicate tenant names or emails, or invalid package/template ID

  • application/json
Request Example for post/admin/tenants
curl https://ai.hatz.ai/v1/admin/tenants \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: YOUR_SECRET_TOKEN' \
  --data '{
  "tenants": [
    {
      "tenant_name": "",
      "package_id": "",
      "template_id": "",
      "users": []
    }
  ]
}'
{
  "message": "string",
  "total_tenants_created": 1,
  "total_tenants_failed": 1,
  "tenants": [
    {}
  ]
}