Download OpenAPI specification:
Sintj Rails 8.1 API — spec-first, contract-validated.
Returns all active zones available for tenant provisioning. Requires an internal service key — not exposed to end users. Returns 409 if no zones are configured (a deployment configuration error).
{- "zones": [
- {
- "code": "eu-west",
- "name": "Europe (West)",
- "default": true,
- "active": true
}, - {
- "code": "us-east",
- "name": "US East",
- "default": false,
- "active": true
}
]
}Creates a new active zone available for tenant provisioning. Requires an internal service key — not exposed to end users.
required | object (ZoneInput) |
{- "zone": {
- "code": "ap-south",
- "name": "Asia Pacific (South)",
- "default": false,
- "active": true
}
}{- "error_code": "auth.unauthorized",
- "request_id": "550e8400-e29b-41d4-a716-446655440000"
}Returns a tenant's full record including per-step onboarding status. Requires an internal service key — not exposed to end users.
| id required | string <uuid> Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7 |
{- "tenant": {
- "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
- "company_name": "Acme Corp",
- "slug": "acme",
- "industry_name": "Technology",
- "db_shard": "eu-west",
- "status": "active",
- "onboarding_status": {
- "status": "completed",
- "steps": [
- {
- "step": "email_verification",
- "status": "completed"
}, - {
- "step": "profile_setup",
- "status": "completed"
}, - {
- "step": "billing_setup",
- "status": "completed"
}
]
}
}
}Soft-deletes a tenant by setting deleted_at. Only disabled tenants may be deleted; attempting to delete an active tenant returns 422. Requires an internal service key — not exposed to end users.
| id required | string <uuid> Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7 |
{- "error_code": "auth.unauthorized",
- "request_id": "550e8400-e29b-41d4-a716-446655440000"
}Returns all provisioned tenants with their aggregate onboarding status. Requires an internal service key — not exposed to end users.
{- "tenants": [
- {
- "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
- "company_name": "Acme Corp",
- "slug": "acme",
- "db_shard": "eu-west",
- "onboarding_status": "completed"
}
]
}Creates a tenant record and seeds pending onboarding status rows. Requires an internal service key — not exposed to end users.
required | object (TenantInput) |
{- "tenant": {
- "company_name": "Acme Corp",
- "slug": "acme",
- "industry_name": "Technology",
- "zone_code": "eu-west"
}
}{- "error_code": "auth.unauthorized",
- "request_id": "550e8400-e29b-41d4-a716-446655440000"
}Sets a tenant's status to active. Idempotent — enabling an already-active tenant is a no-op and still returns 200. Requires an internal service key.
| id required | string <uuid> Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7 |
{- "error_code": "auth.unauthorized",
- "request_id": "550e8400-e29b-41d4-a716-446655440000"
}Sets a tenant's status to disabled. Idempotent — disabling an already-disabled tenant is a no-op and still returns 200. Requires an internal service key.
| id required | string <uuid> Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7 |
{- "error_code": "auth.unauthorized",
- "request_id": "550e8400-e29b-41d4-a716-446655440000"
}Creates a new workspace under an existing tenant. Requires a valid X-Schema-Name header identifying the tenant schema.
required | object (WorkspaceInput) |
{- "workspace": {
- "name": "Engineering"
}
}{- "error_code": "api.not_found",
- "request_id": "550e8400-e29b-41d4-a716-446655440000"
}Assigns an existing user to a workspace with a given role. Duplicate assignments are rejected with a 422 validation error. Requires a valid X-Schema-Name header.
required | object (WorkspaceUserInput) |
{- "workspace_user": {
- "workspace_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
- "user_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
- "role": "member"
}
}{- "error_code": "api.not_found",
- "request_id": "550e8400-e29b-41d4-a716-446655440000"
}Records a customer user (email + name) in a tenant's schema with status "invited". Sprint 4 converts this record into a real better_auth-rb identity. Requires a valid X-Schema-Name header identifying the tenant schema.
| X-Schema-Name required | string Example: acme_1234 Stable Apartment schema name of the tenant |
required | object (UserInput) |
{- "user": {
- "email": "jane@example.com",
- "name": "Jane Smith"
}
}{- "error_code": "api.not_found",
- "request_id": "550e8400-e29b-41d4-a716-446655440000"
}