Skip to Content
coaadedocs

Authentication

Sign up, verify email, sign in, refresh tokens and reset passwords with the Coaade Cloud API.

The flow

  1. Sign up with POST /v1/auth/sign-up. Coaade emails a verification code.
  2. Verify the email with POST /v1/auth/verify-email.
  3. Sign in with POST /v1/auth/sign-in to get an access token and a refresh token.
  4. Send Authorization: Bearer <access> on each request.
  5. Refresh with POST /v1/auth/refresh when 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

POST/v1/auth/password-checkNo auth

Check a password against the rules as the user types. Rate-limited to 60 requests per minute.

Request
{ "password": "correct-Horse-7!", "email": "ada@example.com" }
Response 200
{
  "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

POST/v1/auth/sign-upNo auth

Create 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" }'
Response 201
{
  "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

POST/v1/auth/verify-emailNo auth

Confirm the code from the verification email.

Request
{ "email": "ada@example.com", "code": "123456" }
Response 200
{ "success": true, "message": "Email verified successfully" }

Errors: 422 VALIDATION_ERROR, 400 INVALID_CODE.

Resend the verification code

POST/v1/auth/resend-codeNo auth

Send a new verification code.

Request
{ "email": "ada@example.com" }
Response 200
{ "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

POST/v1/auth/sign-inNo auth

Exchange 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" }'
Response 200
{
  "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:

StatusCodeMeaning
401INVALID_CREDENTIALSWrong email or password. The message is the same either way.
403EMAIL_NOT_VERIFIEDThe email isn't verified. A new code has been sent.
422VALIDATION_ERRORA field is missing

Refresh tokens

POST/v1/auth/refreshNo auth

Exchange a refresh token for a new token pair.

Request
{ "refreshToken": "eyJ…", "deviceId": "laptop-1" }
Response 200
{ "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

POST/v1/auth/forgot-passwordNo auth

Email a reset code if the account exists.

Request
{ "email": "ada@example.com" }

Always returns 202 Accepted, whether or not the account exists.

Reset password

POST/v1/auth/reset-passwordNo auth

Set a new password with the reset code.

Request
{ "email": "ada@example.com", "code": "123456", "newPassword": "new-Horse-8!stable" }
Response 200
{ "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 localStorage in 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.

On this page