API Endpoints¶
The COORDINATOR authentication system provides comprehensive REST endpoints under /api/auth/* for managing authentication, authorization, and user data.
Base URL
All endpoints are prefixed with /api/auth/. For example: POST https://auth.getcoordinator.ai/api/auth/sign-up
Authentication Endpoints¶
Sign Up¶
Register a new user account with email and password.Sign In¶
Authenticate a user with email and password, creating a new session.Sign Out¶
Terminate the current user session.Forgot Password¶
Request a password reset email for account recovery.Reset Password¶
Reset password using a token sent via email.Email Verification Endpoints¶
Verify Email¶
Verify a user's email address using a verification token.Resend Verification Email¶
Send a new verification email to the user.Two-Factor Authentication (2FA)¶
Enable 2FA¶
Enable two-factor authentication for the user account.Verify 2FA Code¶
Verify a TOTP code during login or setup.Disable 2FA¶
Disable two-factor authentication for the user account.Passkey Endpoints¶
Register Passkey¶
Register a new WebAuthn passkey for the user.Verify Passkey¶
Authenticate using a registered passkey.Organization Endpoints¶
Create Organization¶
Create a new organization with the authenticated user as owner.Request Body:
Update Organization¶
Update organization details (name, logo, metadata).Permission: Organization owner only
Delete Organization¶
Delete an organization and all associated data.Permission: Organization owner only
List Organizations¶
List all organizations the user is a member of.Get Organization Details¶
Get detailed information about a specific organization.Team Endpoints¶
Create Team¶
Create a new team within an organization.Request Body:
Permission: Organization owner or admin
Update Team¶
Update team details (name, etc.).Permission: Organization owner or admin
Delete Team¶
Delete a team and remove all team members.Permission: Organization owner or admin
List Teams¶
List all teams within an organization.Member Management Endpoints¶
Add Member¶
Add an existing user directly to an organization.Request Body:
Permission: Organization owner only
Remove Member¶
Remove a user from an organization.Permission: Organization owner only (cannot remove yourself)
Update Member Role¶
Change a member's role within the organization.Request Body:
Permission: Organization owner only
Team Member Endpoints¶
Add Team Member¶
Add a user to a team within an organization.Request Body:
Permission: Organization owner or admin
Remove Team Member¶
Remove a user from a team.Permission: Organization owner or admin
Invitation Endpoints¶
Create Invitation¶
Send an email invitation to join an organization.Request Body:
{
"email": "[email protected]",
"organizationId": "org-id",
"role": "member"
}
Permission: Organization owner or admin Rate Limit: 50 invitations per organization per 24 hours
Accept Invitation¶
Accept a pending organization invitation.Request Body:
Reject Invitation¶
Reject a pending organization invitation.Cancel Invitation¶
Cancel a pending invitation before it's accepted.Permission: Organization owner or admin only
Session Endpoints¶
Get Session¶
Get the current user's session information including active organization and team.Response:
{
"user": {
"id": "user-id",
"name": "User Name",
"email": "[email protected]"
},
"session": {
"activeOrganizationId": "org-id",
"activeTeamId": "team-id"
}
}
Switch Organization¶
Change the active organization for the current session.Request Body:
Switch Team¶
Change the active team for the current session.Request Body:
Error Handling¶
Error Response Format
All errors return a JSON object with error and message fields.
Common Error Responses¶
Organization Errors¶
"Organization name must be between 2 and 100 characters.""Invalid slug format. Use only lowercase letters, numbers, and hyphens.""Slug "{slug}" is already taken.""Organization name "{name}" is already taken.""Insufficient permissions. Only organization owners can update organization settings."
Team Errors¶
"Team name must be between 2 and 100 characters.""You must be an organization member to create teams.""Insufficient permissions. Only organization owners can create teams.""Team name "{name}" is already taken in this organization."
Member Errors¶
"Invalid email address.""This user is already a member of the organization.""Insufficient permissions. Only organization owners can add members directly.""Cannot remove the last owner from the organization.""You cannot remove yourself from the organization."
Invitation Errors¶
"Invalid invitation role: {role}. Allowed roles: owner, admin, member""Invitation rate limit exceeded. Please try again later.""Insufficient permissions. Only organization owners and admins can send invitations.""An invitation has already been sent to this email address.""Invitation has expired"
Authentication Headers¶
All authenticated requests require a valid session token provided via:
- Cookie:
session_token(automatically handled by browsers) - Authorization Header:
Bearer <token>(for API clients)
CORS Configuration¶
The API supports CORS requests from:
- http://localhost:3000
- https://dev-app.getcoordinator.ai
- https://app.getcoordinator.ai
- https://auth.getcoordinator.ai
- https://dev.getcoordinator.ai
Allowed Methods: POST, GET, PUT, DELETE, OPTIONS
Credentials: Enabled for cross-origin requests