List your active mobile users
Read and search your agent's mobile users, with filters for name, location, role, and active status.
Every REST endpoint shares one base URL and needs a full-scope Agent API Token:
https://mcp.onkey.chat/functions/v1/rest-api
GET /users lists and searches your agent's mobile users. By default it returns your active users.
curl "https://mcp.onkey.chat/functions/v1/rest-api/users" \
-H "Authorization: Bearer okm_<your-token-here>"const res = await fetch("https://mcp.onkey.chat/functions/v1/rest-api/users", {
headers: { Authorization: "Bearer okm_<your-token-here>" },
});
if (!res.ok) {
const { error, message } = await res.json();
throw new Error(`${res.status} ${error}: ${message}`);
}
const { users, count } = await res.json();
console.log(`Found ${count} users`);You'll get back { "users": [...], "count": N }. Each user includes an is_payroll_synced flag (see the payroll note below).
Filters
All filters are optional query parameters, and they combine with AND — pass several to narrow the list further.
| Parameter | What it does |
|---|---|
query | Matches first or last name (case-insensitive, partial). |
location | Case-insensitive, partial match on location. |
role | Case-insensitive, partial match on role title. |
active | Which users to include: true (the default — active users only), false (inactive only), or all (both). |
For example, every active cashier in Glendale:
curl -G "https://mcp.onkey.chat/functions/v1/rest-api/users" \
-H "Authorization: Bearer okm_<your-token-here>" \
--data-urlencode "location=Glendale" \
--data-urlencode "role=Cashier"const params = new URLSearchParams({ location: "Glendale", role: "Cashier" });
const res = await fetch(
`https://mcp.onkey.chat/functions/v1/rest-api/users?${params}`,
{ headers: { Authorization: "Bearer okm_<your-token-here>" } },
);
const { users, count } = await res.json();For the full request and response schema, see the API Reference.
Payroll-managed rostersReading works the same whether or not your roster is payroll-synced — this endpoint always lists your users. What doesn't apply to a payroll-managed roster is managing those users: creating, editing, and deleting are blocked, because payroll is the source of truth. Each row's
is_payroll_syncedflag tells you which users are owned by the provider. See Payroll-managed rosters.
Next steps
- Send a targeted message — reach the users you just found.
- Upload a document to the Knowledge Base — add reference material your agent can answer from.
- Errors — the error format and every status code.
Updated about 1 hour ago

