Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/hack4impact-umd/breastfeeding-center-gw/llms.txt

Use this file to discover all available pages before exploring further.

User accounts on the BCGW Dashboard are created only through invitations. These endpoints let authorized users generate invite tokens and retrieve invite details. The registration step itself is handled by POST /auth/register/invite/:inviteId. All write endpoints require the ADMIN or DIRECTOR role. The invite retrieval endpoint is public (used by the registration page to pre-fill the invitee’s email). Base URL: https://us-east4-breastfeeding-center-gw.cloudfunctions.net/api

POST /invites/send

Creates a new invite record in Firestore and sends an email to the invitee containing a unique registration link. The link points to /register/:inviteId in the dashboard frontend. Auth required: Yes — ADMIN or DIRECTOR role required Role restrictions apply to the role field in the request body: a user cannot invite someone to a role higher than their own. An ADMIN can only invite VOLUNTEERs; a DIRECTOR can invite ADMINs or VOLUNTEERs.

Body

firstName
string
required
First name of the person being invited.
lastName
string
required
Last name of the person being invited.
email
string
required
Email address the invite will be sent to. Must not already be registered as a dashboard user.
role
string
Role to assign when the invitee registers. One of "VOLUNTEER" or "ADMIN". Defaults to "VOLUNTEER" if omitted. Cannot exceed the inviting user’s own role level.

Example

curl -X POST \
  https://us-east4-breastfeeding-center-gw.cloudfunctions.net/api/invites/send \
  -H "Authorization: Bearer <id_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Jane",
    "lastName": "Doe",
    "email": "jane.doe@example.org",
    "role": "VOLUNTEER"
  }'

Response

Returns 200 OK with the string "Invite successfully created" on success.

Error codes

StatusReason
400Missing required fields, or a user with that email already exists, or the invite email could not be sent
403Missing or invalid auth token, insufficient role, or trying to invite someone to a higher role than your own

GET /invites/id/:inviteId

Retrieves an invite record by its UUID. This endpoint is public (no auth required) and is used by the registration page to validate the invite and pre-fill the invitee’s email address. Auth required: No

Path parameters

inviteId
string
required
The UUID of the invite document in Firestore. Included in the registration link sent by email.

Example

curl https://us-east4-breastfeeding-center-gw.cloudfunctions.net/api/invites/id/01930b4e-1234-7abc-8def-000000000000

Response

Returns the invite document with an additional computed valid field.
id
string
The invite UUID.
email
string
The email address this invite was sent to.
firstName
string
First name of the invited person.
lastName
string
Last name of the invited person.
role
string
Role to assign on registration: "VOLUNTEER", "ADMIN", or "DIRECTOR".
used
boolean
Whether this invite has already been used to create an account.
createdAt
Timestamp
Firestore Timestamp indicating when the invite was created.
valid
boolean
Computed field — true if the invite is unused and has not exceeded the configured expiration window (INVITE_EXPIRE_DAYS, default 7 days).

Error codes

StatusReason
404No invite found for the given inviteId

Build docs developers (and LLMs) love