Agents · denyDeviceCode
Cancel connecting an agent
POST /v1/device/deny
Refuses the user code: the client's next poll gets access_denied and stops. Nothing is created.
- Who may call it
- any signed-in human
- Server
- https://api.logu.dev
Request body#
Content type application/json (required).
| Field | Type | Required | Notes |
|---|---|---|---|
userCode | string | required | 0–32 chars |
{
"userCode": "WDJB-MJHT"
}
Example#
curl -s -X POST "https://api.logu.dev/v1/device/deny" \
-H "Authorization: Bearer $LOGU_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"userCode":"WDJB-MJHT"}'
Responses#
204
Denied.
Errors#
Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | The request is malformed or a field is invalid (see issues). |
| 400 | unknown_field | The body has a field the endpoint doesn't know (often a typo or snake_case). |
| 401 | unauthorized | No credentials, or the API key or session is invalid or revoked. |
| 403 | forbidden | The caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint). |
| 409 | conflict | The resource isn't in a state that allows this: an ask that is no longer waiting (ask has its current state), an invitation no longer pending, the last Owner. |
| 500 | internal_error | Something went wrong on Logu's side. |