POST
/api/public/v1/locationsCreate a location
Create a new location in your company.
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Dev Tools → API, to an assistant or CLI sign-in when you approve or edit it under Dev Tools, and to a teammate under Employee → Permissions.
locations:write
Request Body
| Property | Type | Description |
|---|---|---|
reference | string | Display name. |
subdomain | string | Free subdomain. |
tagline | string | Tagline. |
code | string | Internal reference code. |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/locations" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"reference": "Acme Corp",
"subdomain": "acme",
"tagline": "We build things"
}'200Example response
json
{
"message": "Location created successfully!",
"content": {
"location": {
"id": "loc_abc123"
}
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.
Company menu → Locations → Add location
/dashboard- Open the company menu → Locations.
- Add location.
- Give it a reference (and, optionally, a code). It takes on the company’s industry.