API reference
Authentication
Organization sign-in, sessions and password changes
For concepts and a walkthrough, read Authentication.
Sign in and receive an access token
/auth/loginExchange the credentials issued at provisioning for a token, then send it as Authorization: Bearer <token> on every other endpoint.
Every failure returns the same 401 with the same message. Distinguishing "no such account" from "wrong password" would turn this into an account-enumeration oracle, so the specific reason is logged rather than returned.
mustChangePassword is true while the password is the one an administrator issued.
- Auth
- None
- Body
- application/json
Request body
emailstring (email)requiredMax 320 characters
passwordstringrequiredMax 512 characters
organizationIdstring (uuid)Required only when the account belongs to more than one organization.
Response fields 200
accessTokenstringrequiredSend as
Authorization: Bearer <token>on every other endpoint. Revocable, unlike a self-contained token.expiresAtstring (date-time)requiredmustChangePasswordbooleanrequiredTrue while the password is the one an administrator issued.
userobjectrequireduser.idstring (uuid)requireduser.emailstring (email)requireduser.namestring | nullrequiredorganizationobjectrequiredorganization.idstring (uuid)requiredorganization.namestringrequiredorganization.slugstringrequiredorganization.rolestringrequired
LoginResult
accessTokenstringrequiredSend as
Authorization: Bearer <token>on every other endpoint. Revocable, unlike a self-contained token.expiresAtstring (date-time)requiredmustChangePasswordbooleanrequiredTrue while the password is the one an administrator issued.
userobjectrequireduser.idstring (uuid)requireduser.emailstring (email)requireduser.namestring | nullrequiredorganizationobjectrequiredorganization.idstring (uuid)requiredorganization.namestringrequiredorganization.slugstringrequiredorganization.rolestringrequired
Responses
- 200Signed in.
- 401Invalid email or password.
curl -X POST "https://api.getengageai.app/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "manager@copperkettle.example",
"password": "mFGVaAer-jKcyPp34-qxmLNojm"
}'{
"accessToken": "eng_sess_76bc0bae.2DrK9vYw…",
"expiresAt": "2026-10-16T09:30:00.000Z",
"mustChangePassword": true,
"user": {
"id": "3f6c2a1e-8b4d-4e7a-9c15-2d0b7e6f4a91",
"email": "owner@acme.example",
"name": "Trailhead Mid GTX Boot"
},
"organization": {
"id": "3f6c2a1e-8b4d-4e7a-9c15-2d0b7e6f4a91",
"name": "Trailhead Mid GTX Boot",
"slug": "copper-kettle-cafe",
"role": "string"
}
}End the current session
/auth/logoutIdempotent. Takes effect on the next request; there is no grace period.
Response fields 200
loggedOuttruerequired
Responses
- 200Signed out.
- 401Missing, expired or already-revoked credential.
- 409The credential is an API key, which has no session.
curl -X POST "https://api.getengageai.app/auth/logout" \
-H "Authorization: Bearer $ENGAGE_API_KEY"{
"loggedOut": true
}Describe the current credential
/auth/meUseful for a client that holds a token and needs to know what it is — which tenant, whether it is a session or an API key, and whether a password change is outstanding.
Response fields 200
organizationIdstring (uuid)requiredkindenumrequiredWhich credential authenticated this request.
One of
session,api_keyscopesstring[]requireduserIdstring (uuid) | nullrequiredmustChangePasswordboolean | nullrequired
CurrentPrincipal
organizationIdstring (uuid)requiredkindenumrequiredWhich credential authenticated this request.
One of
session,api_keyscopesstring[]requireduserIdstring (uuid) | nullrequiredmustChangePasswordboolean | nullrequired
Responses
- 200The authenticated principal.
- 401Missing, expired or revoked credential.
curl "https://api.getengageai.app/auth/me" \
-H "Authorization: Bearer $ENGAGE_API_KEY"{
"organizationId": "3f6c2a1e-8b4d-4e7a-9c15-2d0b7e6f4a91",
"kind": "session",
"scopes": [
"string"
],
"userId": "3f6c2a1e-8b4d-4e7a-9c15-2d0b7e6f4a91",
"mustChangePassword": true
}Change your password
/auth/passwordClears mustChangePassword and revokes every session, including the one making this call — sign in again afterwards. Revoking the rest is the point as much as the new password is: a change that leaves other tokens live does not lock anyone out.
- Body
- application/json
Request body
currentPasswordstringrequiredMax 512 characters
newPasswordstringrequiredAt least 12 characters. Length is the requirement; composition rules are not.
Min 12 characters · Max 512 characters
Response fields 200
changedtruerequiredsessionsRevokedintegerrequiredEvery session, including the one that made this call. Sign in again.
Min -9007199254740991
Responses
- 200Changed. All sessions ended.
- 401The current password did not match.
- 409The credential is an API key, not a signed-in user.
- 422The new password is too short, or contains the email.
curl -X POST "https://api.getengageai.app/auth/password" \
-H "Authorization: Bearer $ENGAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"currentPassword": "mFGVaAer-jKcyPp34-qxmLNojm",
"newPassword": "a-long-passphrase-you-chose"
}'{
"changed": true,
"sessionsRevoked": 0
}