Skip to main content
The co-mind.ai API supports two authentication methods. Both use the Authorization: Bearer <token> header.

JWT Authentication Flow

Login

POST /v1/auth/login
Response:
LDAP/AD routing: If the user’s email domain matches an IdP configuration, the login request is automatically routed to the configured LDAP/AD directory for authentication. No client-side changes are needed.

SSO Login (Microsoft Entra ID)

POST /v1/auth/sso

Refresh Token

POST /v1/auth/refresh
The refresh endpoint validates the user’s current status — suspended or disabled users are blocked from refreshing tokens.

Logout

POST /v1/auth/logout

Get Current User

GET /v1/auth/me
Returns user info including privileges, group memberships, and user version.

Registration & Password Reset

Registration Flow

1

Check Registration

2

Register

3

Confirm Email

Password Reset Flow

1

Request Reset

2

Execute Reset

Authentication Endpoints Reference

Security Best Practices

PATs are long-lived and scoped — much better than JWTs for automated workflows. Reserve JWTs for interactive sessions.
Never send tokens over HTTP. All production deployments should enforce TLS.
Use environment variables or secret managers (AWS Secrets Manager, HashiCorp Vault) — never commit tokens to source control.
Only request the permissions you need. A read-only integration should not have write scopes.
Use the POST /v1/api-tokens/{id}/rotate endpoint for seamless rotation without downtime.
Delete tokens that are no longer needed using DELETE /v1/api-tokens/{id}.
Use .env files, CI/CD secrets, or secret managers instead.