Create a workspace
Creates a workspace owned by the account key’s user and mints its PRIMARY workspace key, returned only in this response. A regular user’s workspace is born on Free; a reseller’s (marked by the Pilot Status team) on Pay As You Go, billed from the wallet, with the reseller’s prices. Each user owns up to 10 workspaces by default (409 WORKSPACE_LIMIT_REACHED, with limit). shareCard: true links the new workspace to your reserve card (the shared card whose source workspace the Pilot Status team configured for you); false or ABSENT means NOT shared. Behavior change (2026-10-29): before, a reseller’s workspace inherited the reserve card automatically. With shareCard: true the card is checked first and, on 409 SHARED_CARD_NOT_CONFIGURED, SOURCE_ARCHIVED or NO_SHARED_OWNER, no workspace is created. name and shareCard are the only accepted fields. If the key cannot be minted the answer is still 201 with apiKey: null — rotate the primary with POST /v1/api-keys/regenerate (account key + x-workspace-id). Not idempotent: two calls create two workspaces.
Requires an account key (ps_account_, created in Profile → API). Workspace keys, number keys and OAuth/MCP tokens get 403 ACCOUNT_KEY_REQUIRED. Sent with Cache-Control: no-store.
curl --request POST \
--url https://pilotstatus.com.br/v1/workspaces \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Bakery Downtown",
"shareCard": true
}
'import requests
url = "https://pilotstatus.com.br/v1/workspaces"
payload = {
"name": "Bakery Downtown",
"shareCard": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Bakery Downtown', shareCard: true})
};
fetch('https://pilotstatus.com.br/v1/workspaces', 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://pilotstatus.com.br/v1/workspaces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Bakery Downtown',
'shareCard' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/workspaces"
payload := strings.NewReader("{\n \"name\": \"Bakery Downtown\",\n \"shareCard\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/v1/workspaces")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Bakery Downtown\",\n \"shareCard\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/workspaces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Bakery Downtown\",\n \"shareCard\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "cmh2a9z8y0002ws8example1q",
"name": "Bakery Downtown",
"plan": "PAY_AS_YOU_GO",
"createdAt": "2026-10-28T09:15:00.000Z",
"role": "OWNER",
"apiKey": {
"id": "cmh2aa0010003ak8example4d",
"name": "Workspace API Key",
"key": "ps_workspace_9f3c1a7e5b2d8f4a6c0e9b1d7f3a5c8e2b4d6f8a0c1e3b5d",
"prefix": "ps_workspace_",
"last4": "3b5d",
"isPrimary": true,
"createdAt": "2026-10-28T09:15:00.000Z"
},
"sharedCard": {
"linked": true,
"sourceWorkspaceId": "cmh2a1b2c0001ws8example7k"
}
}{
"error": "The name is required | O nome é obrigatório",
"code": "NAME_REQUIRED"
}{
"error": "Invalid API key"
}{
"error": "This endpoint requires an account API key (ps_account_…), created in Profile → API. Workspace keys, number keys and OAuth tokens cannot use it | Este endpoint exige uma API key de conta (ps_account_…), criada em Perfil → API. Chaves de workspace, de número e tokens OAuth não podem usá-lo",
"code": "ACCOUNT_KEY_REQUIRED"
}{
"error": "You already own 10 workspaces, which is the limit | Você já é dono de 10 workspaces, que é o limite",
"code": "WORKSPACE_LIMIT_REACHED",
"limit": 10
}ps_account_). See Create workspaces.Authorizations
Your ps_ API key
Body
Response
Created — apiKey.key is returned only this once
Was this page helpful?
curl --request POST \
--url https://pilotstatus.com.br/v1/workspaces \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Bakery Downtown",
"shareCard": true
}
'import requests
url = "https://pilotstatus.com.br/v1/workspaces"
payload = {
"name": "Bakery Downtown",
"shareCard": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Bakery Downtown', shareCard: true})
};
fetch('https://pilotstatus.com.br/v1/workspaces', 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://pilotstatus.com.br/v1/workspaces",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Bakery Downtown',
'shareCard' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/workspaces"
payload := strings.NewReader("{\n \"name\": \"Bakery Downtown\",\n \"shareCard\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/v1/workspaces")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Bakery Downtown\",\n \"shareCard\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/workspaces")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Bakery Downtown\",\n \"shareCard\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "cmh2a9z8y0002ws8example1q",
"name": "Bakery Downtown",
"plan": "PAY_AS_YOU_GO",
"createdAt": "2026-10-28T09:15:00.000Z",
"role": "OWNER",
"apiKey": {
"id": "cmh2aa0010003ak8example4d",
"name": "Workspace API Key",
"key": "ps_workspace_9f3c1a7e5b2d8f4a6c0e9b1d7f3a5c8e2b4d6f8a0c1e3b5d",
"prefix": "ps_workspace_",
"last4": "3b5d",
"isPrimary": true,
"createdAt": "2026-10-28T09:15:00.000Z"
},
"sharedCard": {
"linked": true,
"sourceWorkspaceId": "cmh2a1b2c0001ws8example7k"
}
}{
"error": "The name is required | O nome é obrigatório",
"code": "NAME_REQUIRED"
}{
"error": "Invalid API key"
}{
"error": "This endpoint requires an account API key (ps_account_…), created in Profile → API. Workspace keys, number keys and OAuth tokens cannot use it | Este endpoint exige uma API key de conta (ps_account_…), criada em Perfil → API. Chaves de workspace, de número e tokens OAuth não podem usá-lo",
"code": "ACCOUNT_KEY_REQUIRED"
}{
"error": "You already own 10 workspaces, which is the limit | Você já é dono de 10 workspaces, que é o limite",
"code": "WORKSPACE_LIMIT_REACHED",
"limit": 10
}