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

# Creates a location

`POST /locations/v4`

Creates a new location.
A location consists of latitude/longitude coordinate pair and/or geofenceId.
A name, description, and address of the location may be provided.

## Request body

- union — Body for creating a location.
  - object
    - `address` object — Location address.
      - `city` string — City
      - `country` string — Country
      - `postalCode` string — Postal code
      - `state` string — State
      - `street` string — Street address
    - `description` string — Description of the location.
    - `externalLocationId` string — External location id in external cloud
    - `geofenceId` string, uuid — Optional geofence ID associated with the location. A geofence with the specified ID must exist.
    - `location` object, required — Location coordinates.
      - `lat` number, required — Latitude in WGS-84 format, decimal representation ranging from -90 to 90.
      - `lng` number, required — Longitude in WGS-84 format, decimal representation ranging from -180 to 180.
    - `name` string — Name of the location.
  - object
    - `address` object — Location address.
      - `city` string — City
      - `country` string — Country
      - `postalCode` string — Postal code
      - `state` string — State
      - `street` string — Street address
    - `description` string — Description of the location.
    - `externalLocationId` string — External location id in external cloud
    - `geofenceId` string, uuid, required — Optional geofence ID associated with the location. A geofence with the specified ID must exist.
    - `location` object — Location coordinates.
      - `lat` number, required — Latitude in WGS-84 format, decimal representation ranging from -90 to 90.
      - `lng` number, required — Longitude in WGS-84 format, decimal representation ranging from -180 to 180.
    - `name` string — Name of the location.

## Response `201`

Created.

The location has been successfully created.

- object
  - `locationId` string, required — Location ID

## Other responses

- `400` — Bad request The request object is in an incorrect format or has values that are invalid or out of range. If available, further error details are provided in the response body.
- `401` — Unauthorized The request did not provide correct authentication details
- `403` — Forbidden The account does not have the correct privileges

---

[API](https://skmtc.net/here/apis/tracking.md) · [All operations](https://skmtc.net/here/apis/tracking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/tracking/revisions/efa162f7023c/schema)
