Auth API · stations
Revoke a station: its device credential unlocks nothing from now on
POST /api/auth/stations/{organizationId}/{stationId}/revoke
Revoke a station: its device credential unlocks nothing from now on, and the sessions it handed out end with their short life.
Final — the device is enrolled again as a new station. 403 ViewNotOpened for a station of a view the caller's roles do not open, 404 StationNotFound for an unknown id. Appends auth.station-revoked. Idempotent by state: a station already revoked is answered as it stands and appends nothing.
Access
Requires a signed-in session: An owner or admin of the organization, or a member whose roles open the station's view, checked against its membership by the route (the BetterAuth session)
How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.
Retries
Idempotent by state: a station already revoked is answered as it stands and appends nothing.
Why every write carries a key: Idempotency and retries.
Facts appended
auth.station-revoked
What a fact is: Facts and the journal.
AI agent tool
No agent tool. Revoking a station signs a device out of the organization for good: a person's decision in Settings › Stations, never an agent's.
Connecting an agent: AI agents.
Example
From Set up a station and unlock it with a PIN, step 9: Revoke it.
curl -X POST 'https://auth.getmanifold.io/api/auth/stations/org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d/stn_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d/revoke' \
-H "Authorization: Bearer $MANIFOLD_TOKEN"const response = await fetch("https://auth.getmanifold.io/api/auth/stations/org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d/stn_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d/revoke", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}` },
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();{
"stationId": "stn_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d",
"view": "pick-pack",
"locationId": "loc_01a15852-46d1-7a3b-9c0d-1e2f3a4b5c6d",
"name": "Packing bench 2",
"enrolledAt": "2026-08-17T09:00:00.000Z",
"enrolledBy": "usr_01a15869-1d2e-7f3a-8b4c-5d6e7f8a9b0c",
"revokedAt": "2026-08-17T09:00:00.000Z",
"revokedBy": "usr_01a15869-1d2e-7f3a-8b4c-5d6e7f8a9b0c"
}The panel writes this call in other languages. It does not send it: Manifold's APIs do not take calls from a web
page on another site, so run the call from your own code or terminal. The whole API as OpenAPI: auth-service.openapi.json. Base URL https://auth.getmanifold.io.
Errors
Every refusal is a status and a JSON body whose _tag names it. A refused call changes nothing.
401
| Refusal | What it means | What to do |
|---|---|---|
Unauthorized reason | The token is missing, expired or not one Manifold issued. | Get a fresh token and send the call again. |
TokenAlreadyUsed tokenId | A single-use app token was already spent. | Mint a new token for this call. |
402
| Refusal | What it means | What to do |
|---|---|---|
SubscriptionRequired status | The organization's subscription has lapsed, so writes are refused. | An owner settles billing. Reads still work meanwhile. |
403
| Refusal | What it means | What to do |
|---|---|---|
NotAMember | The person is not a member of this organization. | Check the organization, or invite them first. |
ViewNotOpened view | The request was refused, and nothing changed. | The caller may not do this. Use a token whose roles allow it. |
TenantRequired userId | The token names no organization. | Choose the organization, then get a new token. |
ScopeRequired required | The token's roles do not grant the scope this call needs. | Ask an owner or admin for a role that grants it. |
404
| Refusal | What it means | What to do |
|---|---|---|
StationNotFound stationId | No such record in this organization. | Check the id in the path or the body. |
409
| Refusal | What it means | What to do |
|---|---|---|
MirroredFromSource source | This area is fed by your source system until the organization goes live. | Make the change in the source system, or go live first. |
503
| Refusal | What it means | What to do |
|---|---|---|
RequestLogUnavailable tokenId, reason | The service could not record the request, so it did nothing. | Send the same request again shortly. |
How refusals work everywhere: Errors.
Used in
- Set up a station and unlock it with a PIN, step 9: Revoke it