Create Tenant
POST
/user/{userId}/tenant
const url = 'https://api.exolink.cloud/user/example/tenant';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.exolink.cloud/user/example/tenant \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "password": "example" }'Create a new tenant for the user
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
password
required
User password for confirmation
string
Examplegenerated
{ "password": "example"}Responses
Section titled “Responses”Tenant created successfully
Media typeapplication/json
object
id
Unique identifier for the tenant
integer
name
Tenant display name
string
domainPrefix
Unique domain prefix for the tenant (used in URLs and subdomains)
string
stripeCustomerId
Stripe customer ID for billing
string
connectUrl
WebSocket connection URL for IoT/OCPP
string
customDomain
Custom domain WebSocket URL (if configured)
string
createdAt
When the tenant was created
string format: date-time
updatedAt
When the tenant was last updated
string format: date-time
deletedAt
When the tenant was deleted (null if active)
string format: date-time
Example
{ "id": 1, "name": "My Company", "domainPrefix": "abc123", "connectUrl": "wss://abc123.broker.exolink.cloud/", "customDomain": "wss://chargers.company.com/"}