Locations
5 endpointsPlaces a campaign can target — a circle or a polygon. A location is only ever created by importing a GeoJSON FeatureCollection (see the import endpoint); this resource lists, reads, updates and deletes ones already imported.
List locations#
/locationsNewest first. Each comes back with its shape as GeoJSON — a Point with a radius_meters for a circle, a Polygon otherwise — and the names of any location groups it belongs to.
Query parameters
An opaque value from a previous page's meta.next_cursor. Omit for the first page.
How many to return, up to 100.
20Only locations updated at or after this ISO 8601 timestamp.
Responses
200
{
"data": [
{
"id": "0192f0a4-6b1e-7c3a-9d2f-5e8b1a4d3001",
"name": "Harbour Coffee, Quay Street",
"external_id": "store-014",
"type": "circle",
"geometry": {
"type": "Point",
"coordinates": [
-2.5879,
51.4545
]
},
"radius_meters": 150,
"groups": [
"Bristol stores"
],
"created_at": "2026-09-20T09:12:00Z",
"updated_at": "2026-09-27T14:03:00Z"
}
],
"meta": {
"next_cursor": "eyJpZCI6IjAxOTJmMGE0In0"
}
}Response fields
401The token is missing, expired or revoked.
unauthenticated
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}403The token can't do this.
missing_abilityplatform_api_not_enabledwrong_environment
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}422
{
"error": [
null
]
}429Too many requests. Wait for the number of seconds in Retry-After.
rate_limited
Retry-After.{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}curl 'https://api.bubbl.tech/platform/v1/locations?limit=20' \
-H 'Accept: application/json'const response = await fetch('https://api.bubbl.tech/platform/v1/locations?limit=20', {
method: 'GET',
headers: {
Accept: 'application/json',
},
});
const data = await response.json();import requests
response = requests.request(
'GET',
'https://api.bubbl.tech/platform/v1/locations?limit=20',
headers={
'Accept': 'application/json',
},
)
response.raise_for_status()
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.bubbl.tech/platform/v1/locations?limit=20', [
'headers' => [
'Accept' => 'application/json',
],
]);
$data = json_decode((string) $response->getBody(), true);Get a location#
/locations/{location}Path parameters
The location ID
Responses
200
{
"data": {
"id": "0192f0a4-6b1e-7c3a-9d2f-5e8b1a4d3001",
"name": "Harbour Coffee, Quay Street",
"external_id": "store-014",
"type": "circle",
"geometry": {
"type": "Point",
"coordinates": [
-2.5879,
51.4545
]
},
"radius_meters": 150,
"groups": [
"Bristol stores"
],
"created_at": "2026-09-20T09:12:00Z",
"updated_at": "2026-09-27T14:03:00Z"
}
}Response fields
401The token is missing, expired or revoked.
unauthenticated
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}403The token can't do this.
missing_abilityplatform_api_not_enabledwrong_environment
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}404Nothing with that ID in this workspace.
not_found
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}429Too many requests. Wait for the number of seconds in Retry-After.
rate_limited
Retry-After.{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}curl 'https://api.bubbl.tech/platform/v1/locations/{location}' \
-H 'Accept: application/json'const response = await fetch('https://api.bubbl.tech/platform/v1/locations/{location}', {
method: 'GET',
headers: {
Accept: 'application/json',
},
});
const data = await response.json();import requests
response = requests.request(
'GET',
'https://api.bubbl.tech/platform/v1/locations/{location}',
headers={
'Accept': 'application/json',
},
)
response.raise_for_status()
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.bubbl.tech/platform/v1/locations/{location}', [
'headers' => [
'Accept' => 'application/json',
],
]);
$data = json_decode((string) $response->getBody(), true);Update a location#
/locations/{location}Only its name, address and external_id — not its shape. To change a location's shape, re-import it with the same properties.external_id (see the import endpoint).
Path parameters
The location ID
Request body
application/jsonUpdateLocationRequestResponses
200
{
"data": {
"id": "0192f0a4-6b1e-7c3a-9d2f-5e8b1a4d3001",
"name": "Harbour Coffee, Quay Street",
"external_id": "store-014",
"type": "circle",
"geometry": {
"type": "Point",
"coordinates": [
-2.5879,
51.4545
]
},
"radius_meters": 150,
"groups": [
"Bristol stores"
],
"created_at": "2026-09-20T09:12:00Z",
"updated_at": "2026-09-27T14:03:00Z"
}
}Response fields
401The token is missing, expired or revoked.
unauthenticated
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}403The token can't do this.
missing_abilityplatform_api_not_enabledwrong_environment
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}404Nothing with that ID in this workspace.
not_found
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}422Some fields aren't valid. fields says which, with the dashboard's wording.
validation_failed
fields says which, with the dashboard's wording.{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}429Too many requests. Wait for the number of seconds in Retry-After.
rate_limited
Retry-After.{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}curl -X PATCH 'https://api.bubbl.tech/platform/v1/locations/{location}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"name": "Harbour Coffee, Quay St",
"radius": 200
}'const response = await fetch('https://api.bubbl.tech/platform/v1/locations/{location}', {
method: 'PATCH',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Harbour Coffee, Quay St',
radius: 200,
}),
});
const data = await response.json();import requests
response = requests.request(
'PATCH',
'https://api.bubbl.tech/platform/v1/locations/{location}',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
},
json={
'name': 'Harbour Coffee, Quay St',
'radius': 200,
},
)
response.raise_for_status()
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('PATCH', 'https://api.bubbl.tech/platform/v1/locations/{location}', [
'headers' => [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'Harbour Coffee, Quay St',
'radius' => 200,
],
]);
$data = json_decode((string) $response->getBody(), true);Delete a location#
/locations/{location}Path parameters
The location ID
Responses
200
{
"data": {
"id": "0192f0a4-6b1e-7c3a-9d2f-5e8b1a4d3001",
"deleted": true
}
}Response fields
401The token is missing, expired or revoked.
unauthenticated
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}403The token can't do this.
missing_abilityplatform_api_not_enabledwrong_environment
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}404Nothing with that ID in this workspace.
not_found
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}429Too many requests. Wait for the number of seconds in Retry-After.
rate_limited
Retry-After.{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}curl -X DELETE 'https://api.bubbl.tech/platform/v1/locations/{location}' \
-H 'Accept: application/json'const response = await fetch('https://api.bubbl.tech/platform/v1/locations/{location}', {
method: 'DELETE',
headers: {
Accept: 'application/json',
},
});
const data = await response.json();import requests
response = requests.request(
'DELETE',
'https://api.bubbl.tech/platform/v1/locations/{location}',
headers={
'Accept': 'application/json',
},
)
response.raise_for_status()
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://api.bubbl.tech/platform/v1/locations/{location}', [
'headers' => [
'Accept' => 'application/json',
],
]);
$data = json_decode((string) $response->getBody(), true);Import locations#
/locations/importA GeoJSON FeatureCollection. Each feature needs properties.name; a Point geometry also needs properties.radius (metres, 50–1000) and becomes a circle, a Polygon becomes a polygon. properties.external_id makes a re-import update the same location instead of creating a new one; properties.group adds it to a location group (created if it doesn't exist).
The response gives one result per feature — created, updated, skipped (over the plan's location limit) or failed, with reasons for the latter two. Send ?dry_run=1 to see what would happen without writing anything, and an Idempotency-Key header so a retried request after a lost response doesn't import the same features twice.
Request body
application/jsonImportLocationsRequestrequiredFeatureCollectionResponses
200
{
"data": {
"dry_run": false,
"results": [
{
"index": 0,
"status": "created",
"name": "Riverside Store",
"id": "0192f0a4-6b1e-7c3a-9d2f-5e8b1a4d2001",
"reasons": null
},
{
"index": 1,
"status": "failed",
"name": null,
"reasons": [
"Name is missing (properties.name)"
]
}
],
"summary": {
"created": 1,
"updated": 0,
"skipped": 0,
"failed": 1
}
}
}Response fields
updated, created401The token is missing, expired or revoked.
unauthenticated
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}403The token can't do this.
missing_abilityplatform_api_not_enabledwrong_environment
{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}422Some fields aren't valid. fields says which, with the dashboard's wording.
validation_failed
fields says which, with the dashboard's wording.{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}429Too many requests. Wait for the number of seconds in Retry-After.
rate_limited
Retry-After.{
"error": {
"code": "string",
"message": "string",
"fields": {}
}
}curl -X POST 'https://api.bubbl.tech/platform/v1/locations/import' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data '{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-2.5879,
51.4545
]
},
"properties": {
"name": "Harbour Coffee, Quay Street",
"radius": 150,
"external_id": "store-014",
"group": "Bristol stores"
}
}
]
}'const response = await fetch('https://api.bubbl.tech/platform/v1/locations/import', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
type: 'FeatureCollection',
features: [
{
type: 'Feature',
geometry: {
type: 'Point',
coordinates: [
-2.5879,
51.4545,
],
},
properties: {
name: 'Harbour Coffee, Quay Street',
radius: 150,
external_id: 'store-014',
group: 'Bristol stores',
},
},
],
}),
});
const data = await response.json();import requests
response = requests.request(
'POST',
'https://api.bubbl.tech/platform/v1/locations/import',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
},
json={
'type': 'FeatureCollection',
'features': [
{
'type': 'Feature',
'geometry': {
'type': 'Point',
'coordinates': [
-2.5879,
51.4545,
],
},
'properties': {
'name': 'Harbour Coffee, Quay Street',
'radius': 150,
'external_id': 'store-014',
'group': 'Bristol stores',
},
},
],
},
)
response.raise_for_status()
data = response.json()<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.bubbl.tech/platform/v1/locations/import', [
'headers' => [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'type' => 'FeatureCollection',
'features' => [
[
'type' => 'Feature',
'geometry' => [
'type' => 'Point',
'coordinates' => [
-2.5879,
51.4545,
],
],
'properties' => [
'name' => 'Harbour Coffee, Quay Street',
'radius' => 150,
'external_id' => 'store-014',
'group' => 'Bristol stores',
],
],
],
],
]);
$data = json_decode((string) $response->getBody(), true);