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.

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


TenantAuth

Create a new tenant (platform admin only).

Payload Example

{
  "name": "Acme Corporation",
  "slug": "acme-corp",
  "plan": "pro",
  "contact_email": "admin@acme-corp.com"
}

Status Codes

  • Name
    201
    Type
    HTTP
    Description
    Tenant created
  • Name
    401
    Type
    HTTP
    Description
    Invalid or expired access token
  • Name
    403
    Type
    HTTP
    Description
    Platform-level access required
  • Name
    409
    Type
    HTTP
    Description
    Slug already taken
  • Name
    422
    Type
    HTTP
    Description
    Invalid slug format or plan
Request
POST/api/v1/tenants
Response 201

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.


Register Tenant (Self-Service)

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

Payload Example

{
  "tenant_name": "Beta Inc",
  "tenant_slug": "beta-inc",
  "admin_email": "founder@beta-inc.com",
  "admin_password": "SecureP@ss2024!",
  "admin_display_name": "Alex Founder"
}

Status Codes

  • Name
    201
    Type
    HTTP
    Description
    Tenant and admin user created, tokens returned
  • Name
    409
    Type
    HTTP
    Description
    Slug already taken or email already registered
  • Name
    422
    Type
    HTTP
    Description
    Invalid slug format or password doesn't meet default policy
  • Name
    429
    Type
    HTTP
    Description
    Rate limit exceeded
Request
POST/api/v1/tenants/register
Response 201

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


TenantsAuth

List all tenants (platform admin only).

Status Codes

  • Name
    200
    Type
    HTTP
    Description
    Tenants list returned
  • Name
    401
    Type
    HTTP
    Description
    Invalid or expired access token
  • Name
    403
    Type
    HTTP
    Description
    Platform-level access required
Request
GET/api/v1/tenants
Response 200

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


TenantAuth

Get a tenant by ID.

Status Codes

  • Name
    200
    Type
    HTTP
    Description
    Tenant returned
  • Name
    401
    Type
    HTTP
    Description
    Invalid or expired access token
  • Name
    403
    Type
    HTTP
    Description
    Access denied (not your tenant and no platform scope)
  • Name
    404
    Type
    HTTP
    Description
    Tenant not found
Request
GET/api/v1/tenants/:id
Response 200

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


Tenant by SlugAuth

Get a tenant by slug.

Status Codes

  • Name
    200
    Type
    HTTP
    Description
    Tenant returned
  • Name
    401
    Type
    HTTP
    Description
    Invalid or expired access token
  • Name
    404
    Type
    HTTP
    Description
    No tenant with this slug
Request
GET/api/v1/tenants/by-slug/:slug
Response 200

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


TenantAuth

Update tenant details (partial update).

Payload Example

{
  "name": "Acme Corp International",
  "contact_email": "support@acme-corp.com"
}

Status Codes

  • Name
    200
    Type
    HTTP
    Description
    Tenant updated
  • Name
    401
    Type
    HTTP
    Description
    Invalid or expired access token
  • Name
    403
    Type
    HTTP
    Description
    Missing settings:write permission
  • Name
    404
    Type
    HTTP
    Description
    Tenant not found
Request
PATCH/api/v1/tenants/:id
Response 200

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


Check Slug Availability

Check if a tenant slug is available.

Status Codes

  • Name
    200
    Type
    HTTP
    Description
    Availability check returned
  • Name
    422
    Type
    HTTP
    Description
    Invalid slug format (must be lowercase, alphanumeric, hyphens)
Request
GET/api/v1/tenants/check-slug/:slug
Response 200

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.