LoguDocs
Open Logu

Invitations · createInvitation

Invite someone

POST /v1/workspaces/{id}/invitations

Owners only. Invites an email address with a role: a one-time link, valid 7 days, emailed and also returned (to share it another way when email is off). Accepting requires signing in with that email. One pending invitation per email per workspace.

Who may call it
humans: Owners and up
Server
https://api.logu.dev

Parameters#

NameInTypeRequiredDescription
idpathstringrequiredThe workspace's id (wsp_…). The request acts in this workspace (the Logu-Workspace header is ignored). · e.g. wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6

Request body#

Content type application/json (required).

Who to invite, with which role. Strict.

FieldTypeRequiredNotes
emailstringrequired0–254 chars
role"owner" | "decider" | "viewer"required
{
  "email": "carla@example.com",
  "role": "viewer"
}

Example#

curl -s -X POST "https://api.logu.dev/v1/workspaces/wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6/invitations" \
  -H "Authorization: Bearer $LOGU_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"carla@example.com","role":"viewer"}'

Responses#

201

The invitation, its link, and whether the email went out.

{
  "invitation": {
    "id": "inv_01K7DB4D6F8H0K2M4P6R8T0V2X",
    "email": "carla@example.com",
    "role": "viewer",
    "status": "pending",
    "invitedBy": {
      "id": "Xq3bY7tLmN2pR8sV",
      "name": "Ana"
    },
    "expiresAt": "2026-10-19T14:03:11.000Z",
    "createdAt": "2026-10-12T14:03:11.000Z"
  },
  "url": "https://logu.dev/invite/Zk3mP9qR2sT5vW8yA1bC4dE7fG0hJ3kL",
  "emailSent": true
}
Response fields
FieldTypeRequiredNotes
invitationInvitationrequired
invitation.idstringrequired
invitation.emailstringrequired
invitation.role"owner" | "decider" | "viewer"required
invitation.status"pending" | "accepted" | "revoked" | "expired"required
invitation.invitedByMemberRef | nullrequired
invitation.invitedBy.idstringrequired
invitation.invitedBy.namestringrequired
invitation.expiresAtstringrequireddate-time
invitation.createdAtstringrequireddate-time
urlstringrequireduri
emailSentbooleanrequired

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).
403forbiddenThe caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint).
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.
429rate_limitedThis API key sent too many requests, or a human did too much too fast: sign-in attempts, workspaces created in a day, or a global daily cap on new accounts was reached.
500internal_errorSomething went wrong on Logu's side.