Decline a pending invitation addressed to the caller

Turns down one of the invitations GET /api/me/invitations lists, by its id. The invitation becomes declined, a terminal state: its link no longer joins (410 invitation_declined) and its inviter sees it declined in the organization's invitations, from where the address can be invited again. Same rule as the listing: a dashboard session only (any other credential: 403 dashboard_session_required), whose account holds the invited address, verified. Does NOT require X-Org-Id.

POST/api/me/invitations/{id}/decline

Authorization

better-auth.session_token<token>

Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.

In: cookie

Path Parameters

id*string
Formatuuid
curl -X POST "https://your-instance/api/me/invitations/497f6eca-6276-4993-bfeb-53cbbbba6f08/decline"
Empty
{
  "type": "https://docs.appstrate.dev/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Invalid or missing session",
  "code": "unauthorized",
  "request_id": "req_abc123"
}
{
  "type": "about:blank",
  "title": "Email not verified",
  "status": 403,
  "detail": "Verify this account's email address to answer the invitations sent to it",
  "code": "email_not_verified",
  "request_id": "req_stu901"
}
{
  "type": "about:blank",
  "title": "Not Found",
  "status": 404,
  "detail": "Invitation not found",
  "code": "invitation_not_found",
  "request_id": "req_mno345"
}
{
  "type": "about:blank",
  "title": "Gone",
  "status": 410,
  "detail": "Invitation already accepted",
  "code": "invitation_accepted",
  "request_id": "req_pqr678"
}