LoguDocs
Open Logu

Invitations · acceptInvitation

Accept an invitation

POST /v1/invitations/accept

The signed-in human joins the workspace with the invited role; their email must be the invited one, and verified (a magic-link sign-in or the confirmation link verifies it: POST /api/auth/verify-email sends one). An unverified email is a 403 email_not_verified. An invitation as Owner also needs the account to own fewer shared workspaces than an account may (402; the invitation stays pending).

Who may call it
any signed-in human
Server
https://api.logu.dev

Request body#

Content type application/json (required).

The token from the invitation link. Strict.

FieldTypeRequiredNotes
tokenstringrequired16–200 chars
{
  "token": "Zk3mP9qR2sT5vW8yA1bC4dE7fG0hJ3kL"
}

Example#

curl -s -X POST "https://api.logu.dev/v1/invitations/accept" \
  -H "Authorization: Bearer $LOGU_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"token":"Zk3mP9qR2sT5vW8yA1bC4dE7fG0hJ3kL"}'

Responses#

200

The workspace joined.

{
  "workspace": {
    "id": "wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6",
    "name": "Acme ops",
    "personal": false,
    "role": "viewer",
    "plan": "pro",
    "createdAt": "2026-10-02T12:00:00.000Z"
  }
}
Response fields
FieldTypeRequiredNotes
workspaceWorkspacerequired
workspace.idstringrequired
workspace.namestringrequired
workspace.personalbooleanrequired
workspace.role"owner" | "decider" | "viewer"required
workspace.plan"free" | "pro"required
workspace.createdAtstringrequireddate-time

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.
402plan_limitThis is over one of the workspace's plan quotas: asks, events or metric reports this month, stored images, projects or metric names (Free and Pro), or on Free its agents, members and webhook endpoints (only on servers that enforce plan limits), or a Free account that already owns its shared workspaces (always).
402ceiling_reachedThe workspace reached one of Logu's cost ceilings (asks, events, metric reports, test traffic or images this month, stored image bytes, projects, metric names or API keys). Unlike plan_limit, upgrading doesn't lift it. An account that already owns the most shared workspaces an account may own gets it too.
403forbiddenThe caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint).
403email_not_verifiedThe signed-in human's email isn't verified yet, and this needs it (accepting an invitation, creating a shared workspace, or becoming the Owner of one).
404not_foundNo such route, or the resource doesn't exist in your workspace.
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.