> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.hellotracks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Place

> Create a new place (location/site) in your organization.

Create a new place to represent customer sites, warehouses, offices, or any fixed location. Places can have check-in radii, custom data fields, and be assigned to specific teams.

### REQUEST

```shell theme={null}
POST https://api.hellotracks.com/api/createplace

{
   "data": {
      "name": "Station 101",
      "radius": 200,
      "address": "Laguna Street 123",
      "city": "San Francisco",
      "postalcode": "94123",
      "state": "CA",
      "country_code": "US",
      "email": "station@email.com",
      "phone": "+14151234567",
      "color": "#22c328",
      "location": {
        "lat": 37.7578149,
        "lng": -122.5078122
      },
      "linkedForms": "",
      "teams": [1, 2],
      "extended_data": [
        {"key": "manager", "val": "John Doe"},
        {"key": "capacity", "val": "50"}
      ]
   }
}
```

<ParamField body="name" type="string" required>
  Name of the place. This is the only required field.
</ParamField>

<ParamField body="location" type="object">
  Location coordinates object with `lat` and `lng` properties. If not provided, the system will attempt to geocode based on the address fields.
</ParamField>

<ParamField body="radius" type="integer" default={0}>
  Check-in radius in meters. Determines how close a worker needs to be to check in at this location.
</ParamField>

<ParamField body="address" type="string">
  Street address
</ParamField>

<ParamField body="city" type="string">
  City name
</ParamField>

<ParamField body="postalcode" type="string">
  Postal or ZIP code
</ParamField>

<ParamField body="state" type="string">
  State, province, or region
</ParamField>

<ParamField body="country_code" type="string">
  ISO country code (e.g., "US", "GB", "DE")
</ParamField>

<ParamField body="email" type="string">
  Contact email for this location
</ParamField>

<ParamField body="phone" type="string">
  Contact phone number for this location
</ParamField>

<ParamField body="color" type="string">
  Color code in hexadecimal format (e.g., "#22c328")
</ParamField>

<ParamField body="linkedForms" type="string">
  Comma-separated form IDs to link to this place
</ParamField>

<ParamField body="teams" type="array">
  Array of team numbers (integers) that can access this place. When the caller belongs to a company, Hellotracks assigns the created place to the caller's current teams after processing request fields. Use `/api/editplace` after creation if you need to set explicit teams.
</ParamField>

<ParamField body="extended_data" type="array">
  Array of custom key-value pair objects for additional data. Each object should have `key` and `val` properties.

  Example: `[{"key": "manager", "val": "John Doe"}, {"key": "hours", "val": "9-5"}]`
</ParamField>

### Permissions

* **Company Members:** Can create places if they're not workers, or if `workers_create_places` setting is enabled
* **Personal Accounts:** Can always create places
* **Team Assignment:** For company callers, the place will automatically be assigned to the caller's teams after creation

### Automatic Geocoding

If you provide address fields without coordinates, the system will attempt to geocode the location automatically. For best results, provide at least:

* address + city + country\_code, or
* city + state + country\_code

### RESPONSE

```shell theme={null}
{
  "status": 0,
  "uid": "<uid-of-created-place>",
  "place": {
    "uid": "<uid-of-created-place>",
    "name": "Station 101",
    "creator": "Acme Dispatch",
    "data": []
  }
}
```

<ResponseField name="status" type="integer" required>
  Status code. `0` indicates success.
</ResponseField>

<ResponseField name="uid" type="string" required>
  Unique identifier of the newly created place. Use this UID to reference the place in other API calls.
</ResponseField>

<ResponseField name="place" type="object" required>
  Created place object. See the [Place API Object](/api-reference/place-object) for the complete structure.
</ResponseField>

### Example

<RequestExample>
  ```bash Create Place Example theme={null}
  curl -X POST https://api.hellotracks.com/api/createplace \
    --header 'API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    -d '{
      "data": {
        "name": "Downtown Office",
        "address": "123 Main Street",
        "city": "San Francisco",
        "state": "CA",
        "postalcode": "94105",
        "country_code": "US",
        "radius": 100,
        "phone": "+14155551234",
        "email": "office@company.com",
        "extended_data": [
          {"key": "floor", "val": "5"},
          {"key": "suite", "val": "500"}
        ]
      }
    }'
  ```
</RequestExample>
