LoguDocs
Open Logu

Sign-in · signUpWithPassword

Create an account with a password

POST /api/auth/sign-up/email

Better Auth's sign-up. The email isn't verified yet: Logu emails a confirmation link (needed to accept invitations). Errors are Better Auth's { code, message }. The session token is in set-auth-token. Needs the Turnstile-Token header when the server uses Cloudflare Turnstile (403 forbidden otherwise), and a new account counts against a global daily cap (429 rate_limited when it is reached; accounts that exist are unaffected).

Who may call it
Anyone (no credentials)
Server
https://api.logu.dev

Request body#

Content type application/json (required).

FieldTypeRequiredNotes
namestringrequired1–64 chars
emailstringrequiredemail
passwordstringrequired10–128 chars
{
  "name": "Ana",
  "email": "ana@example.com",
  "password": "correct horse battery"
}

Example#

curl -s -X POST "https://api.logu.dev/api/auth/sign-up/email" \
  -H "Content-Type: application/json" \
  -d '{"name":"Ana","email":"ana@example.com","password":"correct horse battery"}'

Responses#

200

Signed up and in.

{
  "token": "Ln3Vq7",
  "user": {
    "id": "Xq3bY7tLmN2pR8sV",
    "email": "ana@example.com",
    "name": "Ana"
  }
}
Response fields
FieldTypeRequiredNotes
tokenstringrequired
userobjectrequired
user.idstringrequired
user.emailstringrequired
user.namestringrequired

Errors#

Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.

StatusCodeMeaning
400bad_requestThe request is malformed or a field is invalid (see issues).
403forbiddenThe caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint).
429rate_limitedThis API key sent too many requests, or a human did too much too fast: sign-in attempts, workspaces created in a day, or a global daily cap on new accounts was reached.
500internal_errorSomething went wrong on Logu's side.