Skip to main content
Use the Beacons API to manage the Bluetooth beacons monitored in your project from your own systems, for example to register beacons as they are installed at a venue. For how beacons fit with the other context types, see Understand geofences, places, regions, beacons, and fraud context. The base URL is https://api.radar.io. Send your API key in the Authorization header. For key types, the error format, and rate limits, see Authentication, errors, and rate limits. For SDK setup, ranging requirements, and beacon events, see Track indoor location with beacons.

Beacon object

A beacon represents a Bluetooth beacon monitored in your project. Every beacon has a Radar _id. A beacon can also have a tag and an externalId that together identify it in your own system.

Example beacon

This beacon is an iBeacon at a store register.

List beacons

Lists beacons. Beacons are sorted descending by createdAt.
  • Endpoint: GET /v1/beacons
  • Authentication: Secret key
  • Rate limit: 10 requests per second

Query parameters

To look up a beacon by its tag and externalId, send both as filters. The matching beacon is the only item in beacons.

Response

A 200 response contains meta, with a hasMore boolean, and beacons, an array of beacon objects. To get the next page, pass the createdAt of the last beacon as createdBefore. See Pagination.

Example

This request lists the beacons with the tag store-register.
Radar returns this response:

Errors

Get a beacon

Gets a beacon by its Radar _id.
  • Endpoint: GET /v1/beacons/:id
  • Authentication: Secret key
  • Rate limit: 10 requests per second

Path parameters

Response

A 200 response contains meta and beacon, a beacon object.

Example

This request gets a beacon by its Radar _id.
Radar returns this response:

Errors

A 404 response looks like this:

Create a beacon

Creates a beacon. This operation fails if a beacon with the same tag and externalId already exists. To create or update in one call, use Upsert a beacon.
  • Endpoint: POST /v1/beacons
  • Authentication: Secret key
  • Rate limit: 10 requests per second

Body parameters

Response

A 200 response contains meta and beacon, the created beacon object.

Example

This request creates an iBeacon.
Radar returns this response:

Errors

A 409 response looks like this:

Upsert a beacon

Upserts a beacon. Reference the beacon by tag and externalId, or by Radar _id. If a beacon with the specified tag and externalId exists, Radar updates it. If not, Radar creates it. Because the result is the same when you repeat the request, this is the recommended way to sync beacons from your own system.
  • Endpoint: PUT /v1/beacons/:tag/:externalId or PUT /v1/beacons/:id
  • Authentication: Secret key
  • Rate limit: 10 requests per second
  • Used by: Track indoor location with beacons

Path parameters

Body parameters

When you reference the beacon by Radar _id, you can also send tag and externalId in the body to set them.

Response

A 200 response contains meta and beacon, the created or updated beacon object.

Example

This request creates or updates an iBeacon by tag and externalId.
Radar returns this response:

Errors

Delete a beacon

Deletes a beacon by its Radar _id.
  • Endpoint: DELETE /v1/beacons/:id
  • Authentication: Secret key
  • Rate limit: 10 requests per second

Path parameters

Response

A 200 response contains only meta.

Example

This request deletes a beacon by its Radar _id.
Radar returns this response:

Errors

CSV import columns

A beacon CSV file has a header row followed by one row per beacon. To import one, open the Beacons page, click Import, and select the file. Past imports are listed on the beacon import history page. For an example file, see Create beacons. A row with a tag and externalId that already exist updates that beacon. To replace a failed unit or rotate identifiers, import the beacon again with the same tag and externalId and the new identifiers.