Quickstart
Create an API key and make your first request.
1. Get access
API keys are created in the Trio console under Settings → API Keys.
- You need permission to manage API keys in your company.
- You can only create a key for data you can already see yourself.
Create a key with the Inventory purpose. It can read devices and users, and nothing else. Give it a clear name, an owner and an expiry date.
Save the key now
The key is shown only once. Store it in a secret manager or an environment variable, never in source code. If it leaks, revoke it in Settings → API Keys and create a new one.
2. Authenticate
Send the key in the X-API-Key header on every request.
export TRIO_API_KEY="paste-your-key-here"
export TRIO_API_URL="https://coreapi.trio.so" # EU region: https://coreapi-eu.trio.so3. Make your first request
List the first device in your company:
curl --fail-with-body \
--header "X-API-Key: ${TRIO_API_KEY}" \
"${TRIO_API_URL}/external/v1/devices?limit=1"A successful response looks like this (example data):
{
"items": [
{
"id": "3f6c2a9e-8b1d-4c7a-9e2f-5a1b0c4d7e81",
"platform": "macos",
"ownership": "company_owned",
"status": "enrolled",
"serial_number": "C02EXAMPLE01",
"name": "Design MacBook 01",
"model": "MacBookPro18,3",
"os_version": "15.1",
"enrolled_at": "2026-03-14T09:21:07Z",
"updated_at": "2026-11-20T16:02:44Z"
}
],
"total": 128,
"limit": 1,
"offset": 0
}Users work the same way: GET /external/v1/users.
4. Page through results
List endpoints return one page at a time.
| Parameter | Meaning |
|---|---|
limit | Page size, 1–200. Defaults to 50; larger values are capped at 200. |
offset | How many items to skip. Defaults to 0. |
The response repeats the limit and offset the server applied and gives total, the number of
items across all pages. Keep requesting the next page until offset reaches total:
# second page of 50
curl --fail-with-body \
--header "X-API-Key: ${TRIO_API_KEY}" \
"${TRIO_API_URL}/external/v1/devices?limit=50&offset=50"Requests are limited per network address to 300 a minute. Page through large lists one request at a
time rather than in parallel. If you go over, the API answers 429 with a Retry-After header.
Invalid paging values don't cause an error: a missing, zero or non-numeric limit uses 50, and a
negative offset uses 0.
5. Handle errors
Errors use the problem details format
(application/problem+json):
{
"type": "/probs/id.invalid_api_key",
"title": "Unauthorized",
"status": 401,
"detail": "The API key is invalid, expired, or revoked.",
"instance": "/errors/4f1c9b2e0d7a4e559a3b2c8d1e6f7a90"
}| Status | What it means | What to do |
|---|---|---|
400 | The request is invalid, e.g. search text longer than 200 characters. | Fix the request. |
401 | The key is missing, invalid, expired or revoked. | Check the header and the key. |
403 | The key doesn't allow this endpoint, its owner lost the needed permission, or the company is deactivated. | Use an Inventory key, or check the owner's role. |
429 | Too many requests from your network in the last minute. | Wait the number of seconds in the Retry-After header. |
500 | Something failed on Trio's side. | Retry later. Quote the instance value if you contact support. |
503 | Trio couldn't check your company's status. | Retry after a short wait. |