/api/public/v1/locations/{locationId}/archiveArchive a location
Archive a location: its site stops serving, its free subdomain is released, and it drops off the next bill. It hands nothing else back. A location that still rents a phone number, hosts a custom website, or has a domain pointed at it is refused with a 500 naming what to cancel first — each of those is its own subscription, ended deliberately from Billing → Cancel subscriptions. Needs `locations:admin` rather than the write scope that adds and edits one.
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.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
locationId | string | Required | Location ID. |
curl -X POST "https://www.pxb.app/api/public/v1/locations/{locationId}/archive" \
-H "Authorization: Bearer your_access_token"{
"message": "Downtown archived.",
"content": {
"name": "Downtown"
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.
- Open the company menu → Locations.
- Open the ⋯ menu beside a location → Archive.