Authentication
Sign up, verify email, sign in, refresh tokens and reset passwords with the Coaade Cloud API.
The flow
- Sign up with
POST /v1/auth/sign-up. Coaade emails a verification code. - Verify the email with
POST /v1/auth/verify-email. - Sign in with
POST /v1/auth/sign-into get an access token and a refresh token. - Send
Authorization: Bearer <access>on each request. - Refresh with
POST /v1/auth/refreshwhen the access token expires (after 15 minutes).
Access tokens authenticate the account endpoints on these pages. The MCP server and model calls use coaade_sk_ API keys instead, not access tokens.
Check a password
/v1/auth/password-checkNo authCheck a password against the rules as the user types. Rate-limited to 60 requests per minute.
{ "password": "correct-Horse-7!", "email": "ada@example.com" }{
"ok": true,
"checks": [
{ "id": "length", "label": "At least 10 characters", "ok": true },
{ "id": "lower", "label": "A lowercase letter", "ok": true },
{ "id": "upper", "label": "An uppercase letter", "ok": true },
{ "id": "number", "label": "A number", "ok": true },
{ "id": "symbol", "label": "A symbol, like ! @ # ?", "ok": true },
{ "id": "common", "label": "Not a common password, a sequence or your email name", "ok": true }
]
}The server checks the password again on sign-up and reset.
Sign up
/v1/auth/sign-upNo authCreate an account on the Free plan and email a verification code.
Prop
Type
curl -X POST https://api.coaade.com/v1/auth/sign-up \
-H "Content-Type: application/json" \
-d '{ "email": "ada@example.com", "password": "correct-Horse-7!", "displayName": "Ada" }'{
"user": { "id": "4b1c…", "email": "ada@example.com", "displayName": "Ada" },
"tokens": { "access": "eyJ…", "refresh": "eyJ…", "expiresIn": 900 },
"requiresVerification": true
}Errors: 422 VALIDATION_ERROR, 422 WEAK_PASSWORD, 409 EMAIL_EXISTS.
Verify email
/v1/auth/verify-emailNo authConfirm the code from the verification email.
{ "email": "ada@example.com", "code": "123456" }{ "success": true, "message": "Email verified successfully" }Errors: 422 VALIDATION_ERROR, 400 INVALID_CODE.
Resend the verification code
/v1/auth/resend-codeNo authSend a new verification code.
{ "email": "ada@example.com" }{ "message": "Verification code sent" }If no account exists, the response is still 200 ("If the account exists, a new code has been sent."), so the endpoint doesn't reveal which emails are registered. Returns 400 ALREADY_VERIFIED for a verified email.
Sign in
/v1/auth/sign-inNo authExchange email and password for tokens.
Prop
Type
curl -X POST https://api.coaade.com/v1/auth/sign-in \
-H "Content-Type: application/json" \
-d '{ "email": "ada@example.com", "password": "correct-Horse-7!", "deviceId": "laptop-1" }'{
"user": { "id": "4b1c…", "email": "ada@example.com", "displayName": "Ada", "phone": null },
"tokens": { "access": "eyJ…", "refresh": "eyJ…", "expiresIn": 900 },
"subscription": { "planId": "pro", "status": "active", "currentPeriodEnd": "2026-12-11T00:00:00.000Z" },
"license": "…",
"phoneVerified": false
}subscription is null for an account without one. license is a signed license for offline apps such as the Desktop App.
Errors:
| Status | Code | Meaning |
|---|---|---|
| 401 | INVALID_CREDENTIALS | Wrong email or password. The message is the same either way. |
| 403 | EMAIL_NOT_VERIFIED | The email isn't verified. A new code has been sent. |
| 422 | VALIDATION_ERROR | A field is missing |
Refresh tokens
/v1/auth/refreshNo authExchange a refresh token for a new token pair.
{ "refreshToken": "eyJ…", "deviceId": "laptop-1" }{ "tokens": { "access": "eyJ…", "refresh": "eyJ…", "expiresIn": 900 } }Store the new refresh token; it replaces the old one.
Errors: 401 TOKEN_EXPIRED, 401 TOKEN_REVOKED, 401 USER_NOT_FOUND.
Forgot password
/v1/auth/forgot-passwordNo authEmail a reset code if the account exists.
{ "email": "ada@example.com" }Always returns 202 Accepted, whether or not the account exists.
Reset password
/v1/auth/reset-passwordNo authSet a new password with the reset code.
{ "email": "ada@example.com", "code": "123456", "newPassword": "new-Horse-8!stable" }{ "success": true, "message": "Password updated. Please sign in." }A reset revokes every refresh token for the account, signing it out on all devices.
Errors: 422 VALIDATION_ERROR, 422 WEAK_PASSWORD, 400 INVALID_CODE, 404 USER_NOT_FOUND.
Storing tokens safely
- Keep refresh tokens out of
localStoragein web apps where you can; prefer secure, HTTP-only cookies set by your backend. - On desktop, store them in the OS keychain or a file only the user can read.
- Never log tokens or put them in URLs.