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#
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | required | The 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.
| Field | Type | Required | Notes |
|---|---|---|---|
email | string | required | 0–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
| Field | Type | Required | Notes |
|---|---|---|---|
invitation | Invitation | required | |
invitation.id | string | required | |
invitation.email | string | required | |
invitation.role | "owner" | "decider" | "viewer" | required | |
invitation.status | "pending" | "accepted" | "revoked" | "expired" | required | |
invitation.invitedBy | MemberRef | null | required | |
invitation.invitedBy.id | string | required | |
invitation.invitedBy.name | string | required | |
invitation.expiresAt | string | required | date-time |
invitation.createdAt | string | required | date-time |
url | string | required | uri |
emailSent | boolean | required |
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. |
| 402 | plan_limit | This 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). |
| 403 | forbidden | The caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint). |
| 404 | not_found | No such route, or the resource doesn't exist in your workspace. |
| 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. |
| 429 | rate_limited | This 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. |
| 500 | internal_error | Something went wrong on Logu's side. |