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

# Ask a device to send or delete what it holds

> Asks one install (by its app.installation.id) or one app user (by user.hash) of the project to send what its device holds, every family's included, or to delete it (spec 15.5). The request goes into the policy of every app of the project for 1 to 7 days (7 by default), matched by a hash: the id or hash given here is never stored. At most 100 open per project (409 beyond). It never overrides a user's consent or opt-out. Owners and admins; audited as device_request.create.



## OpenAPI

````yaml /api-reference/openapi.json post /orgs/{orgId}/projects/{projectId}/device-requests
openapi: 3.1.0
info:
  title: Apsio API
  version: 0.1.0
  description: >-
    Read API v0: your projects, release health and comparisons, missing symbols,
    issues, sessions, vitals, cohort comparisons, performance (app start,
    screens, hangs, MetricKit) and network endpoints and traces for one project.
    Authenticate with a project token as a bearer token, with an OAuth access
    token from Apsio's authorization server (MCP clients), or, from the console,
    with the session cookie of a member of the project's organization.
servers:
  - url: https://api.apsio.io/v1
security: []
paths:
  /orgs/{orgId}/projects/{projectId}/device-requests:
    post:
      summary: Ask a device to send or delete what it holds
      description: >-
        Asks one install (by its app.installation.id) or one app user (by
        user.hash) of the project to send what its device holds, every family's
        included, or to delete it (spec 15.5). The request goes into the policy
        of every app of the project for 1 to 7 days (7 by default), matched by a
        hash: the id or hash given here is never stored. At most 100 open per
        project (409 beyond). It never overrides a user's consent or opt-out.
        Owners and admins; audited as device_request.create.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a001
          required: true
          name: orgId
          in: path
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a001
          required: true
          name: projectId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - send
                    - delete
                subject_kind:
                  type: string
                  enum:
                    - install
                    - user
                subject:
                  type: string
                  minLength: 1
                  maxLength: 256
                  description: The app.installation.id or the user.hash.
                families:
                  type: array
                  items:
                    type: string
                    enum:
                      - summary
                      - errors
                      - logs
                      - spans
                      - network
                      - metrics
                      - replay
                  minItems: 1
                days:
                  type: integer
                  minimum: 1
                  maximum: 7
              required:
                - kind
                - subject_kind
                - subject
      responses:
        '200':
          description: The request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceRequest'
      security:
        - session: []
components:
  schemas:
    DeviceRequest:
      type: object
      properties:
        id:
          type: string
        project_id:
          type: string
        kind:
          type: string
          enum:
            - send
            - delete
        subject_kind:
          type: string
          enum:
            - install
            - user
        subject_hint:
          type: string
          description: The install id's or user hash's last four characters.
        families:
          type:
            - array
            - 'null'
          items:
            type: string
            enum:
              - summary
              - errors
              - logs
              - spans
              - network
              - metrics
              - replay
          description: 'Null: every family.'
        created_by:
          type:
            - string
            - 'null'
        created_at:
          type: string
        expires_at:
          type: string
        canceled_at:
          type:
            - string
            - 'null'
        state:
          type: string
          enum:
            - open
            - expired
            - canceled
          description: 'Open: in the policy every device of the project fetches.'
        answers:
          type:
            - object
            - 'null'
          properties:
            devices:
              type: integer
              description: Installs that answered it.
            sent:
              type: integer
              description: Of them, those that sent what they held.
            deleted:
              type: integer
              description: Those that deleted it.
            nothing:
              type: integer
              description: Those that held nothing the request matched.
            records:
              type: integer
              description: The records they reported, each install's latest answer.
            last_at:
              type:
                - string
                - 'null'
              description: The latest answer.
          required:
            - devices
            - sent
            - deleted
            - nothing
            - records
            - last_at
          description: >-
            How devices answered (their apsio.remote_request records, spec
            15.5), by install; never the install ids. Null when the answers
            could not be read, which is not zero.
      required:
        - id
        - project_id
        - kind
        - subject_kind
        - subject_hint
        - families
        - created_by
        - created_at
        - expires_at
        - canceled_at
        - state
        - answers
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: apsio_session
      description: >-
        The console session, set by /v1/auth/callback (`__Host-apsio_session`
        when host-only).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.