---
title: "Depot provision"
description: "Every provision operation in the Depot API, with parameters, responses and code samples in six languages."
url: "https://support.outpostplatform.com/api/generated/depot/provision/"
product: "depot"
type: "reference"
status: "reviewed"
last_reviewed: 2026-11-06
source: "https://gitlab.com/outpostplatform/docs/-/edit/main/src/content/docs/api/generated/depot/provision.mdx"
license: "CC BY 4.0"
---

# 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` {#depot.provision.provision}

**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

Required, sent as `application/json`.

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

#### Request samples

```bash
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"
}'
```

```powershell
$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 10
```

```python
import 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())
```

```go
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))
}
```

```ts
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);
```

```csharp
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());
```
