Skip to main content
Use the Users API to read the users tracked in your project, delete a user, and ask a user’s device for a fresh location with a silent push. 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.

User object

A user represents a user tracked in your project. You can reference a user by Radar _id, userId, or deviceId. For what each context field represents and the events it generates, see context types. For how geofence, place, and region context is produced, see Detect geofence events and place visits.

Location insights

User insights turn a user’s location history into current context.
User insights must be enabled for your project. Contact your Radar account team.
locationInsights is omitted when Radar doesn’t have enough history to infer a usable home or work location. Inferred home and work coordinates aren’t returned. Insights are calculated separately for test and live data.

Example user

This user is on an active trip, in one geofence, and in range of one beacon.

Create a user

There is no separate create operation. To create a user, call Track. If no user matches the deviceId and userId you send, Radar creates one. On iOS and Android, use the SDK to track users.

List users

Lists users. Users are sorted descending by updatedAt.
  • Endpoint: GET /v1/users
  • Authentication: Secret key
  • Rate limit: 10 requests per second

Query parameters

Response

A 200 response contains meta, with a hasMore boolean, and users, an array of user objects. To get the next page, pass the updatedAt of the last user as updatedBefore. See Pagination.

Example

This request lists the 2 most recently updated users.
Radar returns this response:

Errors

Get a user

Gets a user. Reference the user by Radar _id, userId, or deviceId.
  • Endpoint: GET /v1/users/:id
  • Authentication: Secret key
  • Rate limit: 10 requests per second

Path parameters

Response

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

Example

This request gets the user with the userId user-123.
Radar returns this response:

Errors

A 404 response looks like this:

Delete a user

Deletes a user. Reference the user by Radar _id, userId, or deviceId. Use this operation to honor a deletion request for a single user.
  • Endpoint: DELETE /v1/users/:id
  • Authentication: Secret key
  • Rate limit: 10 requests per second

Path parameters

Response

A 200 response contains only meta.

Example

This request deletes the user with the userId user-123.
Radar returns this response:

Errors

Send remote track requests to users

Sends a remote track request to a list of users with silent push notifications. Each device that receives the push sends a fresh location update. For device setup, delivery constraints, and platform support, see Silent push.
  • Endpoint: POST /v1/users/refresh
  • Authentication: Secret key
  • Rate limit: 10 requests per second
Push credentials must be configured for your project before you call this operation.

Body parameters

Response

A 200 response contains: A 200 response can contain failed users. Check failed before you treat the request as delivered. A sent request confirms that the push was handed off, not that the device produced a location update.

Example

This request sends a remote track request to 3 users.
Radar returns this response:

Errors

A 400 response looks like this: