Manage

Invitations

Invite people to a Pro organization by email.

Invitations are a Pro feature. They require organizations and a working mail setup when you run in production.

To invite someone, an org owner or admin may post:

curl -X POST http://127.0.0.1:3000/api/orgs/{id}/invitations \
  -H "Authorization: Bearer crt_…" \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","role":"member"}'

Charter stores a hashed token and queues an email with an accept link. The invitee then posts POST /api/orgs/invitations/accept with token, and optionally name and password when they do not already have an account.

Turn it on or off#

Invitations are on by default when organizations are on. Disable them with:

CHARTER_DISABLE_INVITATIONS=1
# or
charter serve --no-invitations

Create and accept#

  1. An org owner or admin calls POST /api/orgs/{id}/invitations with email and optional role (admin or member).
  2. Charter stores a hashed token and queues an email with an accept link.
  3. The invitee posts POST /api/orgs/invitations/accept with token, and optionally name and password when they do not already have an account.

You may resend with POST /api/orgs/{id}/invitations/{invitationId}/resend. Revoke with DELETE /api/orgs/{id}/invitations/{invitationId}.

Warning

In production, if invitations are enabled, MAIL_MAILER must be smtp with a valid MAIL_FROM_ADDRESS, or charter serve will refuse to start.

Next steps#

Configure the outbound transport on Mail, or point people at SSO when the organization should sign in through OpenID Connect instead.