API reference / Accounts

post/v1/token

Issue or refresh a session

Operation
issueToken
Authentication
None — public

The only unauthenticated write route in the API. Rate limited per IP *and* per email, counted separately: per-IP alone lets a botnet spread an attack on one account, per-email alone lets one host lock out every account it can name. A failure is deliberately indistinguishable from any other failure — same shape, same message, and a hash comparison that runs even when the account does not exist, so the response time does not reveal whether an address is registered.

Request

Body

TokenBody

Responses

200A session, or a request for a second factor.
access_tokenstring
refresh_tokenstring
token_typestring

one of: Bearer

expires_ininteger
mfa_requiredboolean
mfa_ticketstring
userobject
401The credentials were rejected. A wrong password, an unknown address and an expired ticket return an identical body on purpose: distinguishing them would let a caller discover which accounts exist.
errorobjectrequired
429Rate limit exceeded. Retry after `retry-after` seconds.
errorobjectrequired

Example

curl
curl -X POST https://api.haavisa.com/v1/token

More in Accounts

Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.