LoguDocs
Open Logu

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).

FieldTypeRequiredNotes
userCodestringrequired0–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.

StatusCodeMeaning
400bad_requestThe request is malformed or a field is invalid (see issues).
400unknown_fieldThe body has a field the endpoint doesn't know (often a typo or snake_case).
401unauthorizedNo credentials, or the API key or session is invalid or revoked.
403forbiddenThe caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint).
409conflictThe 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.
500internal_errorSomething went wrong on Logu's side.