> ## Documentation Index
> Fetch the complete documentation index at: https://docs.punchrescue.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List devices

> **Required permission:** `read`.

Lists devices for this org. Pass `deviceType` to filter to one type, or omit
it to list every type combined. `status` filters on the effective
online/offline state derived from the last heartbeat.



## OpenAPI

````yaml https://api.rescue-serverless.dev.back2back.team/api/public/v1/openapi.json get /orgs/{org_id}/devices
openapi: 3.1.0
info:
  title: Rescue Public API v1
  description: >-
    Stable public API for partner integrations.


    **Authentication:** `Authorization: Bearer rk_live_<8 hex><64 hex>`. Tokens
    are minted via `POST /api/v1/api-keys` (internal admin) and shown exactly
    once at creation. The same plaintext is required for every public-v1 request
    — store it securely.


    **Permissions:** v1 vocabulary is `read` | `write`. Future versions may
    introduce granular `<resource>:<action>` permissions additively.


    **Idempotency:** retries on a 5xx must be assumed to have unknown outcomes —
    check `GET /emergencies/{id}` (optionally via `externalId`) before retrying.
    An `Idempotency-Key` header will be supported in a future revision.


    **Webhook delivery:** payloads may be duplicated and out-of-order. Dedup on
    `eventId`; order events per emergency on `(emergencyId, sequence)`.
  version: 1.0.0
servers:
  - url: https://api.punchrescue.com/api/public/v1
security:
  - BearerAuth: []
paths:
  /orgs/{org_id}/devices:
    get:
      tags:
        - Devices
      summary: List devices
      description: >-
        **Required permission:** `read`.


        Lists devices for this org. Pass `deviceType` to filter to one type, or
        omit

        it to list every type combined. `status` filters on the effective

        online/offline state derived from the last heartbeat.
      operationId: devices.list
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            description: Target organization id (from the route path)
            title: Org Id
          description: Target organization id (from the route path)
        - name: deviceType
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: ^(base-station|wearable|repeater|card)$
              - type: 'null'
            description: >-
              base-station | wearable | repeater | card. Omit to list all types
              combined.
            title: Devicetype
          description: >-
            base-station | wearable | repeater | card. Omit to list all types
            combined.
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: online | offline
            title: Status
          description: online | offline
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDevicesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PaginatedDevicesResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PublicDeviceResponse'
          type: array
          title: Items
        nextCursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Nextcursor
      type: object
      required:
        - items
      title: PaginatedDevicesResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublicDeviceResponse:
      properties:
        deviceId:
          type: string
          title: Deviceid
        deviceType:
          type: string
          title: Devicetype
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        printedId:
          anyOf:
            - type: string
            - type: 'null'
          title: Printedid
        status:
          type: string
          title: Status
          description: online | offline (computed from last_seen)
        lastSeen:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastseen
        pairedDeviceCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Paireddevicecount
        alarmActive:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Alarmactive
        activeAlertId:
          anyOf:
            - type: string
            - type: 'null'
          title: Activealertid
        alarmColor:
          anyOf:
            - type: string
            - type: 'null'
          title: Alarmcolor
      type: object
      required:
        - deviceId
        - deviceType
        - status
      title: PublicDeviceResponse
      description: Curated device shape for the public device listing.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: rk_live_<8hex><64hex>

````