Exchange credentials for a new session token.
POST
/v0/login
const url = 'https://infra-hyphae.run/v0/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"example","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://infra-hyphae.run/v0/login \ --header 'Content-Type: application/json' \ --data '{ "email": "example", "password": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string
password
required
string
Examplegenerated
{ "email": "example", "password": "example"}Responses
Section titled “ Responses ”New session.
Media typeapplication/json
object
user_id
required
string
token
required
Bearer for /v0/*. Stored server-side as a digest; no refresh.
string
issued_at
required
RFC 3339, UTC.
string format: date-time
expires_at
required
RFC 3339, UTC.
string format: date-time
Examplegenerated
{ "user_id": "example", "token": "example", "issued_at": "2026-04-15T12:00:00Z", "expires_at": "2026-04-15T12:00:00Z"}Malformed or out-of-bounds input (invalid_request).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "invalid_request" }}Missing, malformed, duplicate, or unknown credential (authentication_required).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example
{ "error": { "code": "invalid_request" }}Headers
Section titled “Headers”WWW-Authenticate
string