Merran documentation API & integrations
Set up the server
POST
/api/auth/setup
const url = 'http://localhost:3000/api/auth/setup';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"Sam Rivera","email":"sam@example.com","username":"sam","password":"correct horse battery staple","code":"ABCD-EFGH-JKMN","household":"The Riveras"}'};
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://localhost:3000/api/auth/setup \ --header 'Content-Type: application/json' \ --data '{ "name": "Sam Rivera", "email": "sam@example.com", "username": "sam", "password": "correct horse battery staple", "code": "ABCD-EFGH-JKMN", "household": "The Riveras" }'Makes the first account, which is the server admin, and its household, then signs in. Needs the setup code printed in the server’s log.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
email
required
string format: email
username
required
string
password
required
string
code
required
string
household
required
string
Example
{ "name": "Sam Rivera", "email": "sam@example.com", "username": "sam", "password": "correct horse battery staple", "code": "ABCD-EFGH-JKMN", "household": "The Riveras"}Responses
Section titled “Responses”Set up, and signed in.
Media typeapplication/json
object
id
required
string
name
required
string
email
required
string
username
required
string | null
serverAdmin
required
boolean
households
required
Array<object>
object
id
required
string
name
required
string
role
required
string
activeHouseholdId
required
string | null
Example
{ "id": "0199e8b0-5a10-7a01-8b00-000000000001", "name": "Sam Rivera", "email": "sam@example.com", "username": "sam", "serverAdmin": true, "households": [ { "id": "0199e8b0-5a10-7a01-8b00-000000000003", "name": "The Riveras", "role": "owner" } ], "activeHouseholdId": "0199e8b0-5a10-7a01-8b00-000000000003"}Something’s wrong with what was sent, or the code.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}The server’s already set up.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}Too many wrong codes. Try again in a few minutes.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.