Revoke a worker join token
POST https://weights.fyi/run/v1/nodes/join-tokens/<join_token_id>/revoke
Authorization: Bearer <token> scope: manage- Available since
- 2026-10-19 worker enrollment: answered only where this service enrolls your own workers (otherwise the path answers 404); see Bring your own model.
- Answer time
- synchronous: the token is turned off at once.
Turns off a join token that no worker has used yet. A join token is the single-use secret, beginning wjt_, that lets one worker of your own enroll into the workspace; a worker that presents a revoked token is refused. Use this when a token was pasted somewhere it should not be, or a setup was abandoned before the token expired. The call takes no body and is safe to repeat: a token already revoked answers its first revoked_at again.
A token a worker has already enrolled with is spent and cannot be revoked. That worker now holds its own certificate, so end its enrollment with the worker's revoke call instead. The worker's own enrollment and certificate calls are made by the weights agent with its join token, not with a workspace key, and are not part of this reference.
Request
| Name | Where | Required | Meaning |
|---|---|---|---|
Authorization | header | yes | Bearer and a token with manage. |
join_token_id | path | yes | The token's id from the answer that made it; GET /v1/nodes also shows it as join_token_id on a worker that used one. |
Return value
200 OK:
| Field | Meaning |
|---|---|
id | The token's number. |
workspace_id | Its workspace. |
revoked_at | When it was revoked; the first time, when the call is repeated. |
Errors
| Status | Code | When it happens | What to do |
|---|---|---|---|
401 | unauthorized, invalid_token, token_revoked, token_expired | No token, or one that does not work (any more). | Use a valid token. |
403 | scope_required, account_suspended | The token lacks manage, or the account is suspended. | Use a token with manage. |
404 | join_token_not_found | Your workspace has no join token of that number, or the id is not a positive whole number. | Use the id from the answer that made the token. |
409 | join_token_used | A worker already enrolled with it. | Revoke the worker instead. |
503 | byoc_unavailable | Worker enrollment is not available on this service right now. | Retry later. |
Examples
curl -s -X POST https://weights.fyi/run/v1/nodes/join-tokens/JOIN_TOKEN_ID/revoke \
-H "Authorization: Bearer $WEIGHTS_API_KEY"{"id": 12, "workspace_id": 7, "revoked_at": "2026-11-14T09:45:00+00:00"}History
- 2026-10-19: built.
- 2026-11-16: this page added.
See also
POST /v1/nodes/join-tokensto make a new token.- Bring your own model, the topic.