POST
/api/public/v1/locations/{locationId}/archive

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

locations:admin

Path Parameters

NameTypeRequiredDescription
locationIdstringRequiredLocation ID.
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/locations/{locationId}/archive" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "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.

Company menu → Locations → Archive
/dashboard
  1. Open the company menu → Locations.
  2. Open the ⋯ menu beside a location → Archive.