Create the first account
const url = 'http://127.0.0.1:8484/api/v1/auth/setup';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example","currency":"example","email":"example","householdName":"example","locale":"example","name":"example","password":"example","timezone":"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 http://127.0.0.1:8484/api/v1/auth/setup \ --header 'Content-Type: application/json' \ --data '{ "code": "example", "currency": "example", "email": "example", "householdName": "example", "locale": "example", "name": "example", "password": "example", "timezone": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”object
A URL to the JSON Schema for this object.
Setup code printed in the server log; not needed from the server’s own machine
Responses
Section titled “Responses”OK
object
A URL to the JSON Schema for this object.
The built-in assistant is on: show Ask Exhale
A household exists (made with exhale init); setup only creates the owner’s login
The language to show the signed-in person: their own, else the household’s
Password sign-in is turned off: only show single sign-on
The wizard must ask for the setup code (request not from the server’s machine)
Nobody can sign in yet: show the setup wizard
Present when single sign-on (OpenID Connect) is enabled; start it by navigating to /api/v1/auth/oidc/start
object
What the sign-in button says after “Continue with”
Username of the Telegram bot, when Telegram is enabled
The password was right; send a code to /api/v1/auth/login/two-factor to finish signing in
object
Send it back with the code; it works for a few minutes
object
The account has a password (accounts made through single sign-on have none)
The language this person chose; empty: the household’s
Host of the identity provider this account is linked to, if any
Example
{ "$schema": "https://example.com/api/schemas/AuthSession.json"}default
Section titled “default”Error
object
A URL to the JSON Schema for this object.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
Example
{ "$schema": "https://example.com/api/schemas/ErrorModel.json", "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}