Tenant Host
List the caller's tenant hostnames
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/tenant/domains"{
"$schema": "/api/v1/schemas/TenantDomainsOutputBody.json",
"domains": [
{
"$schema": "/api/v1/schemas/DomainBody.json",
"domain": "string",
"domain_type": "string",
"is_primary": true,
"verification_token": "string",
"verified": true,
"verified_at": "2019-08-24T14:15:22Z"
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}List a tenant's hostnames
Authorization
bearerClerk Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....
In: header
Path Parameters
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/tenants/string/domains"{
"$schema": "/api/v1/schemas/ListTenantDomainsResponse.json",
"domains": [
{
"$schema": "/api/v1/schemas/DomainBody.json",
"domain": "string",
"domain_type": "string",
"is_primary": true,
"verification_token": "string",
"verified": true,
"verified_at": "2019-08-24T14:15:22Z"
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Claim a hostname for a tenant
Authorization
bearerClerk Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/tenants/string/domains" \ -H "Content-Type: application/json" \ -d '{ "domain_type": "subdomain" }'{
"$schema": "/api/v1/schemas/DomainBody.json",
"domain": "string",
"domain_type": "string",
"is_primary": true,
"verification_token": "string",
"verified": true,
"verified_at": "2019-08-24T14:15:22Z"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Remove a tenant hostname
Authorization
bearerClerk Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....
In: header
Path Parameters
Response Body
application/problem+json
curl -X DELETE "https://loading/api/v1/tenants/string/domains/string"{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Verify custom-domain ownership via TXT record
Authorization
bearerClerk Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....
In: header
Path Parameters
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/tenants/string/domains/string/verify"{
"$schema": "/api/v1/schemas/DomainBody.json",
"domain": "string",
"domain_type": "string",
"is_primary": true,
"verification_token": "string",
"verified": true,
"verified_at": "2019-08-24T14:15:22Z"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Get a tenant's manifest
Authorization
bearerClerk Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....
In: header
Path Parameters
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/tenants/string/manifest"{
"$schema": "/api/v1/schemas/ManifestVersionOutputBody.json",
"manifest": null,
"tenant_id": "string",
"version": 0
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Create or update a tenant's manifest
Authorization
bearerClerk Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The full tenant manifest JSON (schema v1). Unknown top-level keys are rejected.
Response Body
application/json
application/problem+json
curl -X PUT "https://loading/api/v1/tenants/string/manifest"{
"$schema": "/api/v1/schemas/ManifestVersionOutputBody.json",
"manifest": null,
"tenant_id": "string",
"version": 0
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Mint a short-lived workspace handoff session
Authorization
bearerClerk Clerk session JWT from an authenticated dashboard user. Format: Bearer eyJ....
In: header
Path Parameters
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/tenants/string/workspace-session"{
"$schema": "/api/v1/schemas/WorkspaceSessionOutputBody.json",
"token": "string",
"workspace_url": "string"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}