Revoke an invitation
POST /v1/invitations/{invitation_id}:revoke · permission invitations:write
Revokes a pending invitation: its link stops working and its e-mail is erased. The write is audited as invitation.revoked.
Request
| Field | Type | Required | Description |
|---|---|---|---|
invitation_id |
path | yes | Invitation ID (inv_…). |
No request body.
Response
200 OK with the revoked invitation.
{
"id": "inv_01j9xt9v3w4y8z0a2b4c6d8e0g",
"organization_id": "org_01j9xk3m7q8r2s4t6v8w0y2z4a",
"email": null,
"role_ids": [
"rol_01j9xr7s1t2w6x8y0z2a4b6c8e"
],
"application_id": null,
"delivery": "link_only",
"delivery_status": "not_sent",
"status": "revoked",
"send_count": 1,
"last_sent_at": "2026-10-12T09:31:00.123456Z",
"expires_at": "2026-10-19T09:31:00.123456Z",
"accepted_user_id": null,
"accepted_at": null,
"revoked_at": "2026-10-12T10:00:00Z",
"created_at": "2026-10-12T09:31:00.123456Z",
"updated_at": "2026-10-12T09:31:00.123456Z",
"version": 2
}
Errors
| HTTP | code | When |
|---|---|---|
| 404 | not_found |
The invitation does not exist in this environment. |
| 409 | conflict |
The invitation is not pending. |
| 401 | unauthenticated |
The credential is missing, invalid or revoked. |
| 403 | insufficient_permissions |
The credential lacks the required permission. |
| 429 | rate_limited |
The rate limit was exceeded; retry after the Retry-After period. |
| 503 | service_unavailable |
A dependency is temporarily unavailable; retry after the Retry-After period. |
Example
curl -i -X POST "https://api.eu.keenauth.com/v1/invitations/inv_01j9xt9v3w4y8z0a2b4c6d8e0g:revoke" \
-H "Authorization: Bearer $KEENAUTH_SECRET_KEY"
Personal data
This endpoint carries personal data: organization memberships and invitations. Personal data in the KeenAuth APIs describes what is stored, how long it is kept and how it is deleted. Do not send special categories of personal data (health, biometric data, religion, political opinions, sexual orientation) in any field.