Start a session with a sign-in code.
const url = 'https://example.com/api/auth/v1/sessions';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"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://example.com/api/auth/v1/sessions \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Redeems the one-time code from a sign-in link or Google sign-in with the user service, and sets the access_token and refresh_token cookies. Limited per client IP.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The code from the sign-in link.
Example generated
{ "code": "example"}Responses
Section titled “Responses”Signed in.
object
object
When the session ends unless refreshed.
Example generated
{ "session": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "expires_at": "2026-04-15T12:00:00Z" }}Headers
Section titled “Headers”Access_token (HttpOnly; Secure; SameSite=Lax; Path=/; Max-Age=900) and refresh_token (HttpOnly; Secure; SameSite=Strict; Path=REFRESH_COOKIE_PATH; Max-Age=2592000), or both cleared.
The request is malformed; errors names the fields.
An RFC 9457 problem.
object
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}No access token, or one that is invalid or expired.
An RFC 9457 problem.
object
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}Headers
Section titled “Headers”The token lacks a scope or isn’t the right kind, or the request came from another origin.
An RFC 9457 problem.
object
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}The body is larger than 64 KiB.
An RFC 9457 problem.
object
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}This client IP is sending too many requests.
An RFC 9457 problem.
object
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}Headers
Section titled “Headers”Seconds to wait.
The service failed; the problem says nothing more.
An RFC 9457 problem.
object
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}A dependency timed out or the service is shutting down.
An RFC 9457 problem.
object
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}