Depot provision
Registers the tenant provisioning route.
This page is generated from the Depot route table. Every operation carries the permission it needs and the anchor an agent can link to.
POST /api/v1/provision
Section titled “POST /api/v1/provision”POSTpublic facehostedNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
provision creates a tenant: its database, its roster row, its schema, its owner, and a single-use link that opens the console as that owner.
Idempotent on hostname. Core retries this call from the browser while the customer watches a spinner, so a second attempt must not fail on work the first one finished. A replay returns 200 with a FRESH handoff token, because the first token is single use and may already have been spent or expired - the customer who refreshed the page still has to get in.
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
channelrequired | string | |
coreClientPublicIdrequired | string | |
hostnamerequired | string | |
namerequired | string | |
ownerDisplayNamerequired | string | |
ownerEmailrequired | string | |
ownerPhonerequired | string | |
partnerGrantrequired | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, ProvisionResponse | Success. |
201 | application/json, ProvisionResponse | Created. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
422 | application/problem+json, ProblemDetails | This deployment does not host MSP partners. |
500 | application/problem+json, ProblemDetails | Could not check hostname availability. |
502 | application/problem+json, ProblemDetails | The practice was created but its database could not be prepared. Retry provisioning. |
200 response body
| Field | Type | Description |
|---|---|---|
clientPublicIdrequired | string | |
handoffTokenrequired | string | |
handoffUrlrequired | string |
Request samples
Section titled “Request samples”curl -X POST 'https://depot.example.com/api/v1/provision' \ -H 'Authorization: Bearer <provision-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ --data '{ "channel": "string", "coreClientPublicId": "string", "hostname": "string", "name": "string", "ownerDisplayName": "string", "ownerEmail": "string", "ownerPhone": "string", "partnerGrant": "string"}'$headers = @{ 'Authorization' = 'Bearer <provision-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json'}
$body = @'{ "channel": "string", "coreClientPublicId": "string", "hostname": "string", "name": "string", "ownerDisplayName": "string", "ownerEmail": "string", "ownerPhone": "string", "partnerGrant": "string"}'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/provision' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10import requests
url = "https://depot.example.com/api/v1/provision"headers = { "Authorization": "Bearer <provision-token>", "Accept": "application/json", "Content-Type": "application/json",}payload = { "channel": "string", "coreClientPublicId": "string", "hostname": "string", "name": "string", "ownerDisplayName": "string", "ownerEmail": "string", "ownerPhone": "string", "partnerGrant": "string",}
response = requests.post(url, headers=headers, json=payload, timeout=30)response.raise_for_status()print(response.json())package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "channel": "string", "coreClientPublicId": "string", "hostname": "string", "name": "string", "ownerDisplayName": "string", "ownerEmail": "string", "ownerPhone": "string", "partnerGrant": "string"}`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/provision", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("Authorization", "Bearer <provision-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}const url = "https://depot.example.com/api/v1/provision";
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <provision-token>", "Accept": "application/json", "Content-Type": "application/json", }, body: JSON.stringify({ "channel": "string", "coreClientPublicId": "string", "hostname": "string", "name": "string", "ownerDisplayName": "string", "ownerEmail": "string", "ownerPhone": "string", "partnerGrant": "string" }),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{ "channel": "string", "coreClientPublicId": "string", "hostname": "string", "name": "string", "ownerDisplayName": "string", "ownerEmail": "string", "ownerPhone": "string", "partnerGrant": "string"}""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/provision");request.Headers.TryAddWithoutValidation("Authorization", "Bearer <provision-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.