v1 · preview

Try webhook signature, alert.created, location_withheld or 429.

↑ ↓ moveEnter openEsc close

Reference

Workers

Workers and watches.

List workers

GET/v1/workers

Scope workers:read

Query parameters

  • site_idstring (uuid)
  • limitinteger

    Items per page (maximum 500).

    from 1 to 500 · default 100

  • cursorstring

    The next_cursor from the previous page.

Responses

  • 200

    Workers.

    application/json WorkerPage

  • 401

    The token is missing, has expired or has been revoked.

    application/problem+json Problem

  • 403

    The token lacks the scope the route requires, or the site doesn’t belong to the client.

    application/problem+json Problem

  • 429

    Too many requests, or too much query time: each client has a number of requests per minute (600 by default) and a query time per minute (30 s by default), and each request spends however long it takes, so a long list counts for more than a single alert. Retry-After says when to retry.

    application/problem+json Problem

Request · sandbox

curl "https://sandbox.api.safeonuba.com/v1/workers" \
  -H "Authorization: Bearer $SAFEONUBA_TOKEN"

Response 200

JSON
{
  "data": [
    {
      "id": "0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90",
      "external_id": "EMP-004512",
      "name": "Ana Ejemplo",
      "contractor": "Contrata Ejemplo A",
      "role": "Andamiero",
      "is_active": false,
      "device": {
        "id": "0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90",
        "serial": "OS-W-0005",
        "battery": 64,
        "date_last_seen": "2026-09-24T11:04:12Z"
      },
      "date_last_seen": "2026-09-24T11:04:12Z"
    }
  ],
  "next_cursor": "eyJ0IjoiMjAyNi0wOS0yNFQxMTowNDoxMloifQ"
}

Worker detail

GET/v1/workers/{id}

Scope workers:read

Path parameters

  • idstring (uuid)required

    Worker id.

Responses

  • 200

    The worker.

    application/json Worker

  • 401

    The token is missing, has expired or has been revoked.

    application/problem+json Problem

  • 403

    The token lacks the scope the route requires, or the site doesn’t belong to the client.

    application/problem+json Problem

  • 404

    It doesn’t exist or this identity can’t see it.

    application/problem+json Problem

  • 429

    Too many requests, or too much query time: each client has a number of requests per minute (600 by default) and a query time per minute (30 s by default), and each request spends however long it takes, so a long list counts for more than a single alert. Retry-After says when to retry.

    application/problem+json Problem

Request · sandbox

curl "https://sandbox.api.safeonuba.com/v1/workers/0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90" \
  -H "Authorization: Bearer $SAFEONUBA_TOKEN"

Response 200

JSON
{
  "id": "0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90",
  "external_id": "EMP-004512",
  "name": "Ana Ejemplo",
  "contractor": "Contrata Ejemplo A",
  "role": "Andamiero",
  "is_active": false,
  "device": {
    "id": "0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90",
    "serial": "OS-W-0005",
    "battery": 64,
    "date_last_seen": "2026-09-24T11:04:12Z"
  },
  "date_last_seen": "2026-09-24T11:04:12Z"
}

List watches

GET/v1/devices

Scope workers:read

Query parameters

  • site_idstring (uuid)
  • limitinteger

    Items per page (maximum 500).

    from 1 to 500 · default 100

  • cursorstring

    The next_cursor from the previous page.

Responses

  • 200

    Watches: battery, whether it is being worn, last connection.

    application/json DevicePage

  • 401

    The token is missing, has expired or has been revoked.

    application/problem+json Problem

  • 403

    The token lacks the scope the route requires, or the site doesn’t belong to the client.

    application/problem+json Problem

  • 429

    Too many requests, or too much query time: each client has a number of requests per minute (600 by default) and a query time per minute (30 s by default), and each request spends however long it takes, so a long list counts for more than a single alert. Retry-After says when to retry.

    application/problem+json Problem

Request · sandbox

curl "https://sandbox.api.safeonuba.com/v1/devices" \
  -H "Authorization: Bearer $SAFEONUBA_TOKEN"

Response 200

JSON
{
  "data": [
    {
      "id": "0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90",
      "serial": "OS-W-0005",
      "battery": 64,
      "date_last_seen": "2026-09-24T11:04:12Z",
      "model": "Galaxy Watch6",
      "status": "active",
      "worn": true,
      "worker": {
        "id": "0f6c2b7e-3a1d-4c55-9b0e-7d2f4a8c1e90",
        "external_id": "EMP-004512",
        "name": "Ana Ejemplo",
        "contractor": "Contrata Ejemplo A"
      }
    }
  ],
  "next_cursor": "eyJ0IjoiMjAyNi0wOS0yNFQxMTowNDoxMloifQ"
}