---
title: "Location Hub"
description: "Manage physical locations, in-person events, and the segments that target them."
url: "https://developers.klaviyo.com/en/reference/location-hub-beta"
revision: "2026-10-15.pre"
llmsTxt: "https://developers.klaviyo.com/en/reference/location-hub-beta/llms.txt"
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15.pre/openapi/beta/categories/location_hub.json"
---

# Location Hub

Manage physical locations, in-person events, and the segments that target them.

## Before you begin

Check out our [general API overview](https://developers.klaviyo.com/en/reference.md) to make sure you're ready to get started with specific endpoints.

> [!WARNING]
> **Beta**
> The Location Hub API is in beta. Send the `revision: 2026-10-15.pre` header to call these endpoints. Endpoints may change before general availability.

Use the Location Hub API to manage physical locations and in-person events, and the segments that target profiles near them.

## Use cases

Here are example use cases supported by the Location Hub API:

- Sync your store list from a point-of-sale or store locator system.
- Create a pop-up event and a segment of profiles within 10 miles of it.
- Show which segments target a given store.

## Required scopes

| Endpoints | Scopes |
|---|---|
| Locations, live events, and Location Hub settings | `locations:read`, `locations:write` |
| Get a location's segments, and `?include=segments` | `locations:read` and `segments:read` |
| Query a proximity segment definition | `locations:read` and `segments:read` |
| Link and unlink segments | `locations:write` and `segments:write` |

## Resources

| Resource | Path | Description |
|---|---|---|
| `location` | `/api/locations` | A physical location, such as a store or venue. |
| `location-live-event` | `/api/location-live-events` | An in-person event, such as a pop-up. |
| `segment` | `/api/locations/{id}/segments` | The segments linked to a location. |
| `proximity-segment-definition` | `/api/proximity-segment-definitions` | A segment definition that targets profiles near a location. Nothing is stored. |
| `location-hub-setting` | `/api/location-hub-settings/{id}` | Account-level settings. The `id` is your account ID. |

Locations and live events are separate resources. Requesting a live event ID at `/api/locations/{id}`, or a location ID at `/api/location-live-events/{id}`, returns a `404`.

## Create a location

A location must be placeable on a map. Include at least one of the following:

- `address1`
- `city` and `region`
- `latitude` and `longitude`

Klaviyo geocodes the address and fills in the fields it can resolve. Until geocoding finishes, `latitude` and `longitude` may be `null`; check `geocode_status`, which is `pending`, `queued`, `successful`, or `failed`. A location that fails geocoding can't be used for proximity segmentation.

```curl Request
curl --request POST \
  --url 'https://a.klaviyo.com/api/locations' \
  --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
  --header 'accept: application/vnd.api+json' \
  --header 'content-type: application/vnd.api+json' \
  --header 'revision: 2026-10-15.pre' \
  --data '
{
  "data": {
    "type": "location",
    "attributes": {
      "name": "Klaviyo Boston",
      "address1": "125 Summer St",
      "address2": "Floor 6",
      "city": "Boston",
      "region": "MA",
      "zip": "02110",
      "country": "US",
      "type_label": "Flagship store",
      "phone_number": "+16175551234"
    }
  }
}
'
```

## Update a location or live event

`PATCH` changes only the fields you send:

- Omit a field to leave it unchanged.
- Send `null` to clear an optional field, such as `description`, `url`, or `phone_number`.
- `name`, the address fields (`address1`, `address2`, `city`, `region`, `zip`, `country`), `latitude`, and `longitude` can't be set to `null`, and neither can `starts_at` on a live event. Sending `null` for any of them returns a `400`.
- Send `latitude` and `longitude` together.

Sending any address or coordinate field re-geocodes the record, which resets `geocode_status`.

```curl Request
curl --request PATCH \
  --url 'https://a.klaviyo.com/api/locations/01HQ8V5X9K2M4N6P8R0T2W4Y6A' \
  --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
  --header 'accept: application/vnd.api+json' \
  --header 'content-type: application/vnd.api+json' \
  --header 'revision: 2026-10-15.pre' \
  --data '
{
  "data": {
    "type": "location",
    "id": "01HQ8V5X9K2M4N6P8R0T2W4Y6A",
    "attributes": {
      "phone_number": "+16175559876",
      "description": null
    }
  }
}
'
```

## Create a live event

Live events follow the same placement and geocoding rules as locations, and also require `starts_at`. `timezone` is read-only and is resolved from the event's address.

Use the `host-locations` relationship to link the locations hosting the event. On `PATCH`, `host-locations` replaces the full list; send an empty `data` array to remove all host locations.

```curl Request
curl --request POST \
  --url 'https://a.klaviyo.com/api/location-live-events' \
  --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
  --header 'accept: application/vnd.api+json' \
  --header 'content-type: application/vnd.api+json' \
  --header 'revision: 2026-10-15.pre' \
  --data '
{
  "data": {
    "type": "location-live-event",
    "attributes": {
      "name": "Summer Pop-Up",
      "starts_at": "2026-07-01T18:00:00Z",
      "ends_at": "2026-07-01T22:00:00Z",
      "address1": "125 Summer St",
      "city": "Boston",
      "region": "MA"
    },
    "relationships": {
      "host-locations": {
        "data": [
          {
            "type": "location",
            "id": "01HQ8V5X9K2M4N6P8R0T2W4Y6A"
          }
        ]
      }
    }
  }
}
'
```

## Target profiles near a location

To create a segment of profiles near a location and link it:

1. Call `POST /api/proximity-segment-definitions` to get a suggested `name` and `definition`. `radius` defaults to `30` and `unit` to `miles` (or `kilometers`). The location needs a `zip` and `country`.
2. Call [Create Segment](https://developers.klaviyo.com/en/reference/create_segment.md) (`POST /api/segments`) with the returned `name` and `definition`.
3. Call `POST /api/locations/{id}/relationships/segments` with the new segment's ID.

### Query a proximity segment definition

```curl Request
curl --request POST \
  --url 'https://a.klaviyo.com/api/proximity-segment-definitions' \
  --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
  --header 'accept: application/vnd.api+json' \
  --header 'content-type: application/vnd.api+json' \
  --header 'revision: 2026-10-15.pre' \
  --data '
{
  "data": {
    "type": "proximity-segment-definition",
    "attributes": {
      "radius": 10,
      "unit": "miles"
    },
    "relationships": {
      "location": {
        "data": {
          "type": "location",
          "id": "01HQ8V5X9K2M4N6P8R0T2W4Y6A"
        }
      }
    }
  }
}
'
```

### Link segments to a location

```curl Request
curl --request POST \
  --url 'https://a.klaviyo.com/api/locations/01HQ8V5X9K2M4N6P8R0T2W4Y6A/relationships/segments' \
  --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
  --header 'accept: application/vnd.api+json' \
  --header 'content-type: application/vnd.api+json' \
  --header 'revision: 2026-10-15.pre' \
  --data '
{
  "data": [
    {
      "type": "segment",
      "id": "UUvyMc"
    }
  ]
}
'
```

Linking and unlinking work as follows:

- A segment targets at most one location. Linking a segment that's already linked to another location moves it to this one.
- Link and unlink are idempotent. Segments already linked are left alone, and unlinking a segment that isn't linked is ignored.
- Unlinking doesn't delete the segment.
- A location can have up to 20 linked segments. Each request accepts 1 to 100 segment IDs.
- Segment endpoints only accept location IDs. A live event ID returns a `404`.

### Get a location's segments

`GET /api/locations/{id}/segments` returns each linked segment's `name`, `definition`, and `linked_at`. Segment details are cached for up to five minutes.

To get only the segment IDs and a count, use `?include=segments` on Get Location or Get Live Event (not supported on list endpoints).

```curl Request
curl --request GET \
  --url 'https://a.klaviyo.com/api/locations/01HQ8V5X9K2M4N6P8R0T2W4Y6A?include=segments' \
  --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
  --header 'accept: application/vnd.api+json' \
  --header 'revision: 2026-10-15.pre'
```

## Pagination and sorting

List endpoints use cursor pagination. Pass `page[size]` (default 25, maximum 100) and follow the `links.next` URL for the next page.

Get Locations and Get Live Events sort newest first by default. Pass `sort` with `name`, `created_at`, or `updated_at` (and `starts_at` for live events), prefixed with `-` for descending order. Changing `sort` while paginating returns a `400`; restart from the first page instead.

```curl Request
curl --request GET \
  --url 'https://a.klaviyo.com/api/locations?sort=name&page%5Bsize%5D=50' \
  --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
  --header 'accept: application/vnd.api+json' \
  --header 'revision: 2026-10-15.pre'
```

## Limitations

- **No filtering.** List endpoints support sorting and pagination only.
- **No `hours` field.** Opening hours aren't exposed yet.

## Additional resources

- [Segments API overview](https://developers.klaviyo.com/en/reference/segments.md)
- [Rate limits, status codes, and errors](https://developers.klaviyo.com/en/docs/rate_limits_and_error_handling.md)

## Endpoints

### Live Events

- [Get Location Live Events](https://developers.klaviyo.com/en/reference/get_location_live_events_beta.md): `GET /api/location-live-events`
- [Get Location Live Event](https://developers.klaviyo.com/en/reference/get_location_live_event_beta.md): `GET /api/location-live-events/{id}`
- [Create Location Live Event](https://developers.klaviyo.com/en/reference/create_location_live_event_beta.md): `POST /api/location-live-events`
- [Update Location Live Event](https://developers.klaviyo.com/en/reference/update_location_live_event_beta.md): `PATCH /api/location-live-events/{id}`
- [Delete Location Live Event](https://developers.klaviyo.com/en/reference/delete_location_live_event_beta.md): `DELETE /api/location-live-events/{id}`
- [Get Segment IDs for Location Live Event](https://developers.klaviyo.com/en/reference/get_segment_ids_for_location_live_event_beta.md): `GET /api/location-live-events/{id}/relationships/segments`
- [Add Segments to Location Live Event](https://developers.klaviyo.com/en/reference/add_segments_to_location_live_event_beta.md): `POST /api/location-live-events/{id}/relationships/segments`
- [Remove Segments from Location Live Event](https://developers.klaviyo.com/en/reference/remove_segments_from_location_live_event_beta.md): `DELETE /api/location-live-events/{id}/relationships/segments`
- [Get Segments for Location Live Event](https://developers.klaviyo.com/en/reference/get_segments_for_location_live_event_beta.md): `GET /api/location-live-events/{id}/segments`

### Locations

- [Get Locations](https://developers.klaviyo.com/en/reference/get_locations_beta.md): `GET /api/locations`
- [Get Location](https://developers.klaviyo.com/en/reference/get_location_beta.md): `GET /api/locations/{id}`
- [Create Location](https://developers.klaviyo.com/en/reference/create_location_beta.md): `POST /api/locations`
- [Update Location](https://developers.klaviyo.com/en/reference/update_location_beta.md): `PATCH /api/locations/{id}`
- [Delete Location](https://developers.klaviyo.com/en/reference/delete_location_beta.md): `DELETE /api/locations/{id}`
- [Get Location Hub Setting](https://developers.klaviyo.com/en/reference/get_location_hub_setting_beta.md): `GET /api/location-hub-settings/{id}`
- [Update Location Hub Setting](https://developers.klaviyo.com/en/reference/update_location_hub_setting_beta.md): `PATCH /api/location-hub-settings/{id}`
- [Create Proximity Segment Definition](https://developers.klaviyo.com/en/reference/query_proximity_segment_definition_beta.md): `POST /api/proximity-segment-definitions`
- [Get Segment IDs for Location](https://developers.klaviyo.com/en/reference/get_segment_ids_for_location_beta.md): `GET /api/locations/{id}/relationships/segments`
- [Add Segments to Location](https://developers.klaviyo.com/en/reference/add_segments_to_location_beta.md): `POST /api/locations/{id}/relationships/segments`
- [Remove Segments from Location](https://developers.klaviyo.com/en/reference/remove_segments_from_location_beta.md): `DELETE /api/locations/{id}/relationships/segments`
- [Get Segments for Location](https://developers.klaviyo.com/en/reference/get_segments_for_location_beta.md): `GET /api/locations/{id}/segments`
