REST API

Auth API

Authentication API for Celerp users, login, logout, password recovery, company switching, and API access.

Generated from the Celerp 2.8.0 OpenAPI schema, 2 November 2026.

GET /auth/bootstrap-status

Get Initial Setup Status

Return whether initial Celerp setup has been completed, allowing clients to choose between first-time registration and the normal sign-in flow.

Responses

StatusDescriptionBody
200Returns the requested initial setup status result.object

Example

curl -X GET http://localhost:8000/auth/bootstrap-status \
  -H "Authorization: Bearer $TOKEN"

POST /auth/change-password

Change User Password

Change the password for the authenticated Celerp user after validating the supplied current password.

Request body

FieldTypeRequiredDescription
current_passwordstringyesUser's current password, required to authorize a password change.
new_passwordstringyesNew password to set for the user.

Responses

StatusDescriptionBody
200Returns a confirmation message.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/auth/change-password \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /auth/firm-view

Firm View

Every company the user can open, with its accountant sync, last sync and what needs attention, newest activity first; ``q`` searches names, ``sync`` filters.

Parameters

NameInRequiredTypeDescription
qquery--string, optionalOptional search text used to filter companies in the firm's view.
syncquery--string, optionalOptional accountant synchronization status used to filter companies.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/auth/firm-view \
  -H "Authorization: Bearer $TOKEN"

POST /auth/login

Log In

Authenticate a Celerp user.

Request body

FieldTypeRequiredDescription
emailstringyesEmail address associated with the user, contact, or request.
passwordstringyesPassword supplied for authentication or initial user creation.

Responses

StatusDescriptionBody
200Returns the access and refresh tokens for the new session.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/auth/login \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /auth/login-force

Log In and Replace Existing Sessions

Authenticate a Celerp user while replacing the user's other active sessions, then return the new session information.

Request body

FieldTypeRequiredDescription
emailstringyesEmail address associated with the user, contact, or request.
passwordstringyesPassword supplied for authentication or initial user creation.

Responses

StatusDescriptionBody
200Returns the access and refresh tokens for the new session.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/auth/login-force \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /auth/logout

Log Out

End the caller's current Celerp authentication session.

Request body

LogoutRequest, optional

Responses

StatusDescriptionBody
200Returns a confirmation message.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/auth/logout \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /auth/my-companies

List Accessible Companies

Return the companies the authenticated user can access, including the information needed to choose an active company.

Responses

StatusDescriptionBody
200Returns the requested accessible companies.object

Example

curl -X GET http://localhost:8000/auth/my-companies \
  -H "Authorization: Bearer $TOKEN"

POST /auth/password-recovery/reset

Recovery Reset

Reset the password of the user whose email this is, when the relay confirms the code it emailed them for the requester's recovery. A handle that holds no live recovery of this email has no right code and never reaches the relay.

Request body

FieldTypeRequiredDescription
emailstringyesEmail
handlestringyesHandle
codestringyesCode
new_passwordstringyesNew Password

Responses

StatusDescriptionBody
200Successful Response--
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/auth/password-recovery/reset \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /auth/password-recovery/send

Recovery Send

Email a recovery code to the user whose email this is, if there is one here, and answer the handle the requester holds this recovery by, alike for any address. "unavailable" says no code is coming: the relay is down, or it could not deliver it. "undeliverable" says the relay never mails such an address, for any address alike.

Request body

FieldTypeRequiredDescription
emailstringyesEmail
handlestring, optional--Handle

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/auth/password-recovery/send \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /auth/password-recovery/terminal

Recovery Terminal

The terminal reset command, for the person at this computer only: it names this computer's folders.

Responses

StatusDescriptionBody
200Successful Responseobject

Example

curl -X GET http://localhost:8000/auth/password-recovery/terminal \
  -H "Authorization: Bearer $TOKEN"

GET /auth/password-reset-notices

Reset Notices

The password resets the caller has not acknowledged yet, newest first, timed in the company's timezone. ``own`` marks a reset of the caller's own password. Reading them changes nothing: each stays until it is acknowledged.

Responses

StatusDescriptionBody
200Successful Responsearray of object

Example

curl -X GET http://localhost:8000/auth/password-reset-notices \
  -H "Authorization: Bearer $TOKEN"

POST /auth/password-reset-notices/acknowledge

Acknowledge Reset Notices

The caller has seen these resets: their notices are gone. Ids already acknowledged, or not the caller's, change nothing.

Request body

FieldTypeRequiredDescription
idsarray of stringyesIds

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/auth/password-reset-notices/acknowledge \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /auth/register

Register First Administrator

Create the first Celerp administrator and company during initial setup. Registration is available only before the installation has been bootstrapped.

Request body

FieldTypeRequiredDescription
company_namestringyesCompany or organization name.
emailstringyesEmail address associated with the user, contact, or request.
namestringyesHuman-readable name for the record.
passwordstringyesPassword supplied for authentication or initial user creation.
setup_codestring, optional--Setup code used during supported first-time registration.

Responses

StatusDescriptionBody
200Returns the access and refresh tokens for the new administrator.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/auth/register \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /auth/start-company

Start a Company After a Reset

Create a company for a login that has none left, which happens after its last company was reset, and sign in as that company's owner. The request carries the login's email and password and the new company's name.

Request body

FieldTypeRequiredDescription
emailstringyesEmail address of the login.
passwordstringyesPassword of the login.
company_namestringyesName of the company to create.

Responses

StatusDescriptionBody
200Returns the session tokens for the new company.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/auth/start-company \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /auth/switch-company/{company_id}

Switch Active Company

Switch the authenticated user's active company to another company they can access.

Parameters

NameInRequiredTypeDescription
company_idpathyesstringIdentifier of the company.

Responses

StatusDescriptionBody
200Returns new access and refresh tokens scoped to the selected company.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/auth/switch-company/:company_id \
  -H "Authorization: Bearer $TOKEN"

POST /auth/token/refresh

Refresh Authentication Session

Refresh the authenticated Celerp session.

Request body

FieldTypeRequiredDescription
refresh_tokenstringyesRefresh credential used to renew the authenticated session.

Responses

StatusDescriptionBody
200Returns new access and refresh tokens.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/auth/token/refresh \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'