Docs/Account/API/Tenants

Tenants API

Manage tenants (organizations) in Vyntech Account. Tenants are the top-level isolation boundary — each tenant has its own users, roles, sessions, settings, and policies.

Base URL: https://id.vyntech.com.au/api/v1 — Tenant creation requires platform-level access. Other operations require authentication within the tenant or platform scope for cross-tenant access.

Create Tenant

Creates a new tenant with default settings. Requires platform-level API key or admin token. The slug must be unique and URL-safe.

POST/api/v1/tenants🔒 Auth

Create a new tenant (platform admin only).

curl -X POST https://id.vyntech.com.au/api/v1/tenants \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d '{ "name": "Acme Corporation", "slug": "acme-corp", "plan": "pro", "contact_email": "admin@acme-corp.com" }'
Request Body
{
  "name": "Acme Corporation",
  "slug": "acme-corp",
  "plan": "pro",
  "contact_email": "admin@acme-corp.com"
}

Register Tenant (Self-Service)

Self-service tenant registration — creates a tenant and its first admin user in one call. This is the endpoint you use for "Sign up your organization" flows.

POST/api/v1/tenants/registerPublic

Register a new tenant with an admin user (public).

curl -X POST https://id.vyntech.com.au/api/v1/tenants/register \ -H "Content-Type: application/json" \ -d '{ "tenant_name": "Beta Inc", "tenant_slug": "beta-inc", "admin_email": "founder@beta-inc.com", "admin_password": "SecureP@ss2024!", "admin_display_name": "Alex Founder" }'
Request Body
{
  "tenant_name": "Beta Inc",
  "tenant_slug": "beta-inc",
  "admin_email": "founder@beta-inc.com",
  "admin_password": "SecureP@ss2024!",
  "admin_display_name": "Alex Founder"
}

List Tenants

Returns a paginated list of all tenants. Requires platform-level access.

GET/api/v1/tenants🔒 Auth

List all tenants (platform admin only).

curl "https://id.vyntech.com.au/api/v1/tenants?page=1&per_page=20" \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

Get Tenant

Returns a specific tenant by ID. Users can access their own tenant; platform admins can access any.

GET/api/v1/tenants/:id🔒 Auth

Get a tenant by ID.

curl https://id.vyntech.com.au/api/v1/tenants/tnt_01H7ABCD9E8F4G2H1J3K5L7M \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

Get Tenant by Slug

Looks up a tenant by its URL-safe slug. Useful for resolving tenant context from subdomains or URL paths in your frontend.

GET/api/v1/tenants/by-slug/:slug🔒 Auth

Get a tenant by slug.

curl https://id.vyntech.com.au/api/v1/tenants/by-slug/acme-corp \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..."

Update Tenant

Updates a tenant's name, contact email, or plan. Requires settings:write permission within the tenant, or platform-level access.

PATCH/api/v1/tenants/:id🔒 Auth

Update tenant details (partial update).

curl -X PATCH https://id.vyntech.com.au/api/v1/tenants/tnt_01H7ABCD9E8F4G2H1J3K5L7M \ -H "Authorization: Bearer eyJhbGciOiJFZERTQSIs..." \ -H "Content-Type: application/json" \ -d '{"name": "Acme Corp International", "contact_email": "support@acme-corp.com"}'
Request Body
{
  "name": "Acme Corp International",
  "contact_email": "support@acme-corp.com"
}

Check Slug Availability

Checks whether a slug is available for use. Useful for real-time validation in registration forms. This is a public endpoint — no authentication required.

GET/api/v1/tenants/check-slug/:slugPublic

Check if a tenant slug is available.

curl https://id.vyntech.com.au/api/v1/tenants/check-slug/acme-corp

What's Next

We use cookies and similar technologies to measure traffic and improve the site. You can choose which categories to allow. Manage Preferences.