Sintj API (1.13.0)

Download OpenAPI specification:

Sintj Rails 8.1 API — spec-first, contract-validated.

Health

Service health and liveness

Health check

Returns 200 when the service is running. No authentication required.

Responses

Response samples

Content type
application/json
{
  • "status": "ok"
}

Zones

Data residency zone catalogue (internal admin API)

List data residency zones

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).

Authorizations:
ServiceKey

Responses

Response samples

Content type
application/json
{
  • "zones": [
    ]
}

Add a data residency zone

Creates a new active zone available for tenant provisioning. Requires an internal service key — not exposed to end users.

Authorizations:
ServiceKey
Request Body schema: application/json
required
required
object (ZoneInput)

Responses

Request samples

Content type
application/json
{
  • "zone": {
    }
}

Response samples

Content type
application/json
{
  • "error_code": "auth.unauthorized",
  • "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Tenants

Tenant provisioning (internal admin API)

Get tenant detail

Returns a tenant's full record including per-step onboarding status. Requires an internal service key — not exposed to end users.

Authorizations:
ServiceKey
path Parameters
id
required
string <uuid>
Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7

Responses

Response samples

Content type
application/json
{
  • "tenant": {
    }
}

Soft-delete a tenant

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.

Authorizations:
ServiceKey
path Parameters
id
required
string <uuid>
Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7

Responses

Response samples

Content type
application/json
{
  • "error_code": "auth.unauthorized",
  • "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

List all tenants

Returns all provisioned tenants with their aggregate onboarding status. Requires an internal service key — not exposed to end users.

Authorizations:
ServiceKey

Responses

Response samples

Content type
application/json
{
  • "tenants": [
    ]
}

Provision a new tenant

Creates a tenant record and seeds pending onboarding status rows. Requires an internal service key — not exposed to end users.

Authorizations:
ServiceKey
Request Body schema: application/json
required
required
object (TenantInput)

Responses

Request samples

Content type
application/json
{
  • "tenant": {
    }
}

Response samples

Content type
application/json
{
  • "error_code": "auth.unauthorized",
  • "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Enable a tenant

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.

Authorizations:
ServiceKey
path Parameters
id
required
string <uuid>
Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7

Responses

Response samples

Content type
application/json
{
  • "error_code": "auth.unauthorized",
  • "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Disable a tenant

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.

Authorizations:
ServiceKey
path Parameters
id
required
string <uuid>
Example: 7c9e6679-7425-40de-944b-e07fc1f90ae7

Responses

Response samples

Content type
application/json
{
  • "error_code": "auth.unauthorized",
  • "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Workspaces

Workspace management within a tenant (internal admin API)

Create a workspace for a tenant

Creates a new workspace under an existing tenant. Requires a valid X-Schema-Name header identifying the tenant schema.

Request Body schema: application/json
required
required
object (WorkspaceInput)

Responses

Request samples

Content type
application/json
{
  • "workspace": {
    }
}

Response samples

Content type
application/json
{
  • "error_code": "api.not_found",
  • "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Assign a user to a workspace

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.

Request Body schema: application/json
required
required
object (WorkspaceUserInput)

Responses

Request samples

Content type
application/json
{
  • "workspace_user": {
    }
}

Response samples

Content type
application/json
{
  • "error_code": "api.not_found",
  • "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

WorkspaceUsers

Assign users to workspaces within a tenant (internal admin API)

Users

Customer user management within a tenant schema (internal admin API)

Record a user as invited

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.

header Parameters
X-Schema-Name
required
string
Example: acme_1234

Stable Apartment schema name of the tenant

Request Body schema: application/json
required
required
object (UserInput)

Responses

Request samples

Content type
application/json
{
  • "user": {
    }
}

Response samples

Content type
application/json
{
  • "error_code": "api.not_found",
  • "request_id": "550e8400-e29b-41d4-a716-446655440000"
}