WoyraDocs
Get an API key

Sign in with email and password

POST/v1/auth/login

Console · Public: no credential needed

With two-factor authentication enabled, the response has mfa.pending: true and the session can only be used to call /v1/auth/mfa/verify within five minutes. Wrong credentials and unknown addresses get the same answer, and ten failures in fifteen minutes lock the address out for the rest of the window.

When the deployment runs Cloudflare Turnstile (see /v1/auth/config), sign-up, sign-in and password reset also need the widget's token in the Woyra-Turnstile header; without it they answer 400 invalid_request.

Body

FieldTypeDescription
emailrequiredstring
passwordrequiredstring

Example

curl -X POST https://api.woyra.io/v1/auth/login \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "alex@example.com",
    "password": "<password>"
  }'

Response

200 Signed in, or awaiting the second factor.

FieldTypeDescription
object"session"
userUser
accountobject
account.idstring
account.namestring
account.countrystring
account.currencystringThe billing currency.
account.payment_currencystringHow the account pays: USD by card, or ETB by bank deposit credited in USD.
One of ETB, USD.
account.regionstring
One of global, ethiopia.
account.statusstring
account.project_idstring
mfaobject
mfa.enabledbooleanAn authenticator app is on.
mfa.requiredboolean
mfa.pendingboolean
mfa.passkeysintegerHow many passkeys the user has. A passkey counts as a second factor.
mfa.recovery_codesintegerUnused recovery codes left.
sessionobject
session.idstring
session.expires_attimestamp
api_keyobjectOnly on signup — the test key, with its token shown once.

Errors

StatusCodes
401authentication_required, invalid_api_key
429rate_limited, daily_send_limit_reached

Also in Console