Queue tenant provisioning
curl --request POST \
--url https://api.example.com/admin/tenants/{tenant_id}/provisionimport requests
url = "https://api.example.com/admin/tenants/{tenant_id}/provision"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/admin/tenants/{tenant_id}/provision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/admin/tenants/{tenant_id}/provision",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/admin/tenants/{tenant_id}/provision"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/admin/tenants/{tenant_id}/provision")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/admin/tenants/{tenant_id}/provision")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Staff Onboarding
Queue tenant provisioning
Requires onboarding_admin + CSRF. Returns 409 unless the tenant’s lifecycle state is draft, provisioning, or onboarding. Enqueues (or resumes) a durable provision_tenant platform job — idempotency key provision:{tenant_id} — that creates the tenant’s Postgres schema, runs the tenant_template migrations into it, grants the app_rw role, seeds default role profiles, verifies object storage, and finally flips lifecycle state to onboarding. Every step is independently idempotent, so a retried or resumed job skips already-completed steps. Returns 202 with the job id immediately; poll GET .../provision/status for progress.
POST
/
admin
/
tenants
/
{tenant_id}
/
provision
Queue tenant provisioning
curl --request POST \
--url https://api.example.com/admin/tenants/{tenant_id}/provisionimport requests
url = "https://api.example.com/admin/tenants/{tenant_id}/provision"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/admin/tenants/{tenant_id}/provision', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/admin/tenants/{tenant_id}/provision",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/admin/tenants/{tenant_id}/provision"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/admin/tenants/{tenant_id}/provision")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/admin/tenants/{tenant_id}/provision")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Response
Successful Response
The response is of type Response Provision Admin Tenants Tenant Id Provision Post · object.