Register a new tenant
Provisions a brand-new WUTS tenant together with its first administrator user and authentication token. The first user of a tenant is always promoted to the admin role, and an optional webhook URL can be pre-staged to auto-configure when the tenant connects its first WhatsApp device. This is a master-token-only operation.
Provisions a brand-new WUTS tenant together with its first administrator user and authentication token. The first user of a tenant is always promoted to the admin role, and an optional webhook URL can be pre-staged to auto-configure when the tenant connects its first WhatsApp device. This is a master-token-only operation.
Authorization
masterToken Platform master token sent as Authorization: Bearer <master-token>. Required only for Super Admin (cross-tenant) endpoints.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/register" \ -H "Content-Type: application/json" \ -d '{ "tenant_name": "Acme Atendimento", "email": "admin@acme.com.br", "password": "s3nh4-f0rte", "role": "admin", "webhook_url": "https://acme.com.br/wuts/webhook" }'{ "success": true, "user": { "id": "8f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f", "tenant_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", "email": "admin@acme.com.br", "role": "admin", "token": "wuts_tok_3EB0A1B2C3D4E5F6", "active": true, "created_at": "2026-06-15T12:00:00Z", "updated_at": "2026-06-15T12:00:00Z" }, "tenant": { "id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", "name": "Acme Atendimento", "created_at": "2026-06-15T12:00:00Z", "updated_at": "2026-06-15T12:00:00Z" }, "token": "wuts_tok_3EB0A1B2C3D4E5F6", "webhook_configured": true, "webhook_url": "https://acme.com.br/wuts/webhook", "note": "Webhook will be auto-configured when WhatsApp device is connected"}{ "success": false, "error": "tenant already exists - please contact your administrator to create an account"}{ "success": false, "error": "master token required"}List all tenants GET
Returns every tenant registered on the WUTS platform. This master-token-only endpoint is used by platform operators to audit and manage the full tenant base.
Update a user PUT
Updates a WUTS user's active flag and/or role. The caller must have permission to manage the target user; changing a role additionally requires permission for that specific role transition.