---
title: "Create a location"
method: POST
path: "/locations"
tags: ["Locations"]
---

# Create a location

`POST /locations`

## Request

- Base URL: `https://public.escape.tech/v3`
- URL: `https://public.escape.tech/v3/locations`
- Auth: API key in header `X-ESCAPE-API-KEY`

Create a Private Location.

## Request body

- object
  - `name` string, required: The name of the location.
  - `sshPublicKey` string, required: The SSH public key of the location.

## Response `200`

OK

- object
  - `id` string, uuid: The location ID.
  - `name` string: The name of the location.
  - `type` string: The type of the location.
  - `enabled` boolean: Whether the location is enabled.
  - `createdAt` string: The date and time the location was created.
  - `lastSeenAt` string, nullable: The date and time the location was last seen.
  - `ip` string, nullable: The IP address of the location.
  - `region` 'Asia' | 'Canada' | 'Europe' | 'UnitedStates' | 'null', nullable: The region of the location.
  - `isActive` boolean: Whether the location agent is currently active.
  - `tags` object[]: The tags associated with the location.
    - `id` string, uuid, required: The id of the tag
    - `name` string, required: The name of the tag
    - `color` string, required: The color of the tag
  - `links` object, required
    - `locationOverview` string, required: The URL of the location overview.
  - `runCommand` string: Command to start the location agent locally. The hosted MCP never runs this command.

## Other responses

- `400`: Bad Request
- `409`: Conflict

---

[API](https://skmtc.dev/escape/apis/escape-public-api.md) - [All operations](https://skmtc.dev/escape/apis/escape-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/escape/apis/escape-public-api/revisions/2eab35df40c7?raw)
