Accept an invitation
POST
/api/users/me/invitations/{id}/accept
Accepts the invitation for the authenticated user: creates their organization membership with the invited role and marks the invitation "accepted" (setting acceptedAt). Rejected with 400 when the invitation is not addressed to the caller's email, is no longer pending, or has expired; returns 409 if the caller is already a member. No request body is required.
Authorizations
ApiToken
Long-lived API token created via POST /api/api-tokens (returned once in plaintext).
Type
API Key (header: X-API-TOKEN)
or
JWT
JWT access token obtained via POST /api/auth/login. Send as: Authorization: Bearer
Type
HTTP (bearer)
Parameters
Path Parameters
id*
invitation identifier
Type
Requiredstring
Request Body
JSON "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "organization": "/api/organizations/1", "email": "alice@example.com", "role": "MANAGER", "status": "pending", "invitedBy": "https://example.com/", "createdAt": "2026-07-01T10:15:30+00:00", "expiresAt": "2026-07-08T10:15:30+00:00", "acceptedAt": "2026-07-02T09:00:00+00:00", "expired": true
{
}
Responses
invitation resource created
JSON "@context": "string", "@id": "string", "@type": "string", "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "organization": { "@context": "string", "@id": "string", "@type": "string", "name": "Acme GmbH" }, "email": "alice@example.com", "role": "MANAGER", "status": "pending", "invitedBy": { "@context": "string", "@id": "string", "@type": "string", "firstName": "Jane", "lastName": "Doe" }, "createdAt": "2026-07-01T10:15:30+00:00", "expiresAt": "2026-07-08T10:15:30+00:00", "acceptedAt": "2026-07-02T09:00:00+00:00"
{
}
