{
  "components": {
    "schemas": {
      "Device": {
        "properties": {
          "enrolled_at": {
            "description": "EnrolledAt is the UTC timestamp when the device completed enrollment.",
            "example": "2026-03-14T09:21:07Z",
            "type": "string"
          },
          "id": {
            "description": "ID is the canonical managed-device UUID (stable, never reassigned).",
            "example": "3f6c2a9e-8b1d-4c7a-9e2f-5a1b0c4d7e81",
            "type": "string"
          },
          "model": {
            "description": "Model is the hardware model (e.g. \"MacBookPro18,3\").",
            "example": "MacBookPro18,3",
            "type": "string"
          },
          "name": {
            "description": "Name is the device name as reported by the device.",
            "example": "Design MacBook 01",
            "type": "string"
          },
          "os_version": {
            "description": "OSVersion is the operating system version string reported at last check-in.",
            "example": "15.1",
            "type": "string"
          },
          "ownership": {
            "description": "Ownership indicates whether the device is company_owned or personal.",
            "example": "company_owned",
            "type": "string"
          },
          "platform": {
            "description": "Platform is the OS family: macos | ios | ipados | tvos | windows | linux | android.",
            "example": "macos",
            "type": "string"
          },
          "serial_number": {
            "description": "SerialNumber is the hardware serial number, when the platform reports one.",
            "example": "C02EXAMPLE01",
            "type": "string"
          },
          "status": {
            "description": "Status is the enrollment lifecycle state: enrolling | enrolled | unenrolling | unenrolled | disabled.",
            "example": "enrolled",
            "type": "string"
          },
          "updated_at": {
            "description": "UpdatedAt is the UTC timestamp of the last metadata update.",
            "example": "2026-11-20T16:02:44Z",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DeviceList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Device"
            },
            "type": "array"
          },
          "limit": {
            "description": "Limit is the page size the server applied.",
            "example": 50,
            "type": "integer"
          },
          "offset": {
            "description": "Offset is the number of devices skipped before this page.",
            "example": 0,
            "type": "integer"
          },
          "total": {
            "description": "Total is the number of devices across all pages.",
            "example": 128,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "FieldError": {
        "properties": {
          "detail": {
            "type": "string"
          },
          "pointer": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Problem": {
        "properties": {
          "detail": {
            "type": "string"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/FieldError"
            },
            "type": "array"
          },
          "instance": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "User": {
        "properties": {
          "blocked": {
            "description": "Blocked is true while an administrator has blocked the account's access (separate from Status).",
            "example": false,
            "type": "boolean"
          },
          "created_at": {
            "description": "CreatedAt is the UTC time the user was added.",
            "example": "2025-06-02T10:00:00Z",
            "type": "string"
          },
          "department": {
            "description": "Department is the user's department, when set.",
            "example": "Design",
            "type": "string"
          },
          "email": {
            "description": "Email is the user's sign-in email.",
            "example": "alex.morgan@example.com",
            "type": "string"
          },
          "first_name": {
            "description": "FirstName is the user's given name.",
            "example": "Alex",
            "type": "string"
          },
          "groups": {
            "description": "Groups are the names of the user groups the person belongs to.",
            "example": [
              "Design",
              "Berlin office"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "description": "ID is the user's UUID (stable, never reassigned).",
            "example": "7d2e4b10-5c3a-4f8e-a6b9-0e1d2c3b4a59",
            "type": "string"
          },
          "job_title": {
            "description": "JobTitle is the user's job title, when set.",
            "example": "Product Designer",
            "type": "string"
          },
          "last_login": {
            "description": "LastLogin is the UTC time of the last sign-in; absent when the person never signed in.",
            "example": "2026-11-19T08:45:12Z",
            "type": "string"
          },
          "last_name": {
            "description": "LastName is the user's family name.",
            "example": "Morgan",
            "type": "string"
          },
          "mfa_status": {
            "description": "MFAStatus is enrolled | not_enrolled | required | reset_required.",
            "example": "enrolled",
            "type": "string"
          },
          "name": {
            "description": "Name is the display name: first and last name, or the email when both are empty.",
            "example": "Alex Morgan",
            "type": "string"
          },
          "role": {
            "description": "Role is the user's first access role in the company (owner, admin, employee, a custom role …).",
            "example": "employee",
            "type": "string"
          },
          "status": {
            "description": "Status is the account lifecycle state: active | inactive | pending | deactivated.",
            "example": "active",
            "type": "string"
          },
          "updated_at": {
            "description": "UpdatedAt is the UTC time of the user's last change.",
            "example": "2026-10-30T13:27:51Z",
            "type": "string"
          }
        },
        "type": "object"
      },
      "UserList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/User"
            },
            "type": "array"
          },
          "limit": {
            "description": "Limit is the page size the server applied.",
            "example": 50,
            "type": "integer"
          },
          "offset": {
            "description": "Offset is the number of users skipped before this page.",
            "example": 0,
            "type": "integer"
          },
          "total": {
            "description": "Total is the number of users across all pages.",
            "example": 42,
            "type": "integer"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "description": "An Inventory API key created in Settings → API Keys. Send it in the X-API-Key header on every request.",
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Read your Trio company's devices and users from your own tools. Every request is authenticated with an API key created in Settings → API Keys, and only ever returns data from the company that owns the key.",
    "title": "Trio API",
    "version": "v1"
  },
  "openapi": "3.0.3",
  "paths": {
    "/external/v1/devices": {
      "get": {
        "description": "Returns the managed devices of the company the API key belongs to, one page at a time. The company comes from the key, never from the request. Requires the device:read scope (an Inventory key).",
        "operationId": "listDevices",
        "parameters": [
          {
            "description": "Page size, 1-200. Missing, zero or invalid values use 50; larger values are capped at 200.",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of devices to skip. Missing, negative or invalid values use 0.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceList"
                }
              }
            },
            "description": "OK"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API key is missing, invalid, expired or revoked"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks the device:read scope, or the organization is deactivated"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Trio could not check the organization's status; retry shortly"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List devices",
        "tags": [
          "Devices"
        ]
      }
    },
    "/external/v1/users": {
      "get": {
        "description": "Returns the people in the company the API key belongs to, newest first, one page at a time. The company comes from the key, never from the request. Requires the users:read scope (an Inventory key); the key's owner must also still hold permission to read users.",
        "operationId": "listUsers",
        "parameters": [
          {
            "description": "Page size, 1-200. Missing, zero or invalid values use 50; larger values are capped at 200.",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Number of users to skip. Missing, negative or invalid values use 0.",
            "in": "query",
            "name": "offset",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Search text matched against name, email or username. At most 200 characters.",
            "in": "query",
            "name": "q",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          },
          {
            "description": "Filter by account state: active, inactive, pending, deactivated or blocked. Comma-separate to combine.",
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserList"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The search text is longer than 200 characters"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API key is missing, invalid, expired or revoked"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The key lacks the users:read scope, its owner can no longer read users, or the organization is deactivated"
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Internal server error"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Trio could not check the organization's status; retry shortly"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "List users",
        "tags": [
          "Users"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Default region",
      "url": "https://coreapi.trio.so"
    },
    {
      "description": "EU region",
      "url": "https://coreapi-eu.trio.so"
    }
  ],
  "tags": [
    {
      "name": "Devices"
    },
    {
      "name": "Users"
    }
  ]
}
