Users and admin

Create a user (admin)

Creates a new WUTS platform user inside the admin's tenant. Requires the admin role; the new user inherits the caller's tenant and receives an API token. An optional webhook URL can be supplied for later device configuration.

POST
/users

Creates a new WUTS platform user inside the admin's tenant. Requires the admin role; the new user inherits the caller's tenant and receives an API token. An optional webhook URL can be supplied for later device configuration.

Authorization

bearerAuth
AuthorizationBearer <token>

Per-user API token (UUID v4) sent as Authorization: Bearer <token>. Identifies the tenant and user.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/users" \  -H "Content-Type: application/json" \  -d '{    "email": "agent@example.com",    "password": "s3cret-pass",    "role": "user",    "webhook_url": "https://app.example.com/webhook"  }'
{  "success": true,  "user": {    "id": "7c2d1e3f-9a8b-4c10-b2d3-e4f5a6b7c8d9",    "tenant_id": "1a2b3c4d-5e6f-4071-8293-a4b5c6d7e8f9",    "email": "agent@example.com",    "role": "user",    "token": "5a4b3c2d-1e0f-4a92-83b4-c5d6e7f8a9b0",    "active": true,    "created_at": "2026-06-15T14:00:00Z",    "updated_at": "2026-06-15T14:00:00Z"  },  "webhook_configured": true,  "webhook_url": "https://app.example.com/webhook",  "note": "Webhook will be configured when user connects their first WhatsApp device"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}