Layerbeat

Sign in

POST
/v1/auth/login

Signs in with an email and password and returns a session token.

Access: Public. No authentication required.

Request Body

application/json
  1. body
cf-turnstile-response?TurnstileToken

Fresh, single-use Turnstile proof. Required when the security check is enabled, valid for at most five minutes, with the handler's expected action and approved frontend hostname. Never persist or reuse it.

Length1 <= length <= 2048
email*string
Formatemail
password*string

10 to 72 characters.

Formatpassword
Length10 <= length <= 72
org_name?string

Signup only. Defaults to your email.

Lengthlength <= 100
onboarding?boolean

Signup only, default false. Defers organization name, billing currency and manual referral to session-only account setup. Do not combine with those fields. Existing API clients retain immediate setup when omitted.

billing_currency?string

Signup only. Saves the new user's personal default; IDR requires configured pricing. Login ignores this field.

Value in"USD""IDR"
referral_code?string

Optional eight-character referral code, case-insensitive. Legacy links remain accepted. Browser signup preserves its first valid attribution cookie.

Lengthlength <= 30

Response Body

Signed in

application/json
  1. response
user*
org_id*string

Your organization.

session*
curl -X POST 'https://layerbeat.com/v1/auth/login' \  -H 'Content-Type: application/json' \  -d '{  "email": "you@example.com",  "password": "a long passphrase"}'
{  "user": {    "id": "usr_k3ndb7vq2xw6y4mt9rf8hz5pae",    "email": "you@example.com"  },  "org_id": "org_5hxk2m7p4wq3z6tfjn8r9bcdva",  "session": {    "token": "lb_sess_ab12cd34ef56gh78ij90kl12mn.Zm9vYmFyYmF6cXV4",    "expires_at": "2026-10-08T10:00:00Z"  }}