Setup code that authorizes this request while the instance is still being set up.
Responses
Status
Description
Body
200
Successful Response
--
422
Validation Error
HTTPValidationError
Example
curl -X POST http://localhost:8000/company-backups/bootstrap/read \
-H "Authorization: Bearer $TOKEN"
POST/company-backups/bootstrap/restore
Bootstrap Restore
Create the first owner and restore the backup as their company in one commit, then
sign them in. Repeating it with the same account opens the same company.
Parameters
Name
In
Required
Type
Description
x-setup-code
header
--
string, optional
Setup code that authorizes this request while the instance is still being set up.
Identifier of the shared backup copy whose handoff is to be restored.
Responses
Status
Description
Body
200
Successful Response
--
422
Validation Error
HTTPValidationError
Example
curl -X POST http://localhost:8000/company-backups/handoffs/:copy_id/restore \
-H "Authorization: Bearer $TOKEN"
POST/company-backups/handoffs/{copy_id}/revoke
Revoke Company Handoff
The link stops working at once; Undo restores it for a short time.
Parameters
Name
In
Required
Type
Description
copy_id
path
yes
string
Identifier of the shared backup copy whose handoff link is to be revoked.
Responses
Status
Description
Body
200
Successful Response
--
422
Validation Error
HTTPValidationError
Example
curl -X POST http://localhost:8000/company-backups/handoffs/:copy_id/revoke \
-H "Authorization: Bearer $TOKEN"
POST/company-backups/import-module
Import Module for Company Backup
Install a module an uploaded company backup needs, as the Modules page does. The module is installed turned off. Send the module archive as a multipart upload with the `upload_token`.
Responses
Status
Description
Body
200
Returns the uploaded backup's preview, checked again.
--
422
The request failed validation. The response lists each invalid field and why.
HTTPValidationError
Example
curl -X POST http://localhost:8000/company-backups/import-module \
-H "Authorization: Bearer $TOKEN"
GET/company-backups/kept
Kept Backups
The backups kept of this company each time a copy replaced it, newest first.
Responses
Status
Description
Body
200
Successful Response
--
Example
curl -X GET http://localhost:8000/company-backups/kept \
-H "Authorization: Bearer $TOKEN"
DELETE/company-backups/kept/{kept_id}
Delete Kept Backup
Delete a kept backup. Not undoable: it is the file itself, so the page asks first.
Parameters
Name
In
Required
Type
Description
kept_id
path
yes
string
Identifier of the retained company backup to delete.
Turn on the modules an uploaded company backup needs, then restart Celerp to load them. Bundled modules are turned on. A module from outside Celerp is turned on only when it is named in `consent`.
Request body
Field
Type
Required
Description
upload_token
string
yes
Upload Token
consent
array of string
--
Consent
mode
string
--
Mode
open
OpenIn, optional
--
--
Responses
Status
Description
Body
200
Returns `restart` and `restarting`, both false when no restart was needed.
--
422
The request failed validation. The response lists each invalid field and why.
Reactivate the deactivated company an uploaded backup was already restored as, instead of restoring a copy, and switch the caller to it. Connectors that deactivation disconnected are named in the response and are not reconnected.
Request body
Field
Type
Required
Description
upload_token
string
yes
Token returned when the backup file was uploaded.
mode
string
yes
How to restore: `settings` or `new_company`.
plan_fingerprint
string
yes
Fingerprint of the restore plan the preview returned.
company_name
string, optional
--
Name for the restored company. Optional.
Responses
Status
Description
Body
200
Returns the company ID and name, the outcome, the connectors to reconnect, and session tokens for the company.
--
422
The request failed validation. The response lists each invalid field and why.
Upload a company backup file and check it. The file is held privately until it is restored or discarded. Send it as a multipart upload with a `mode` of `settings` (the default) or `new_company`. The response previews what restoring does.
Responses
Status
Description
Body
200
Returns the `upload_token`, a summary of the backup, and the plan for restoring it.
--
422
The request failed validation. The response lists each invalid field and why.
HTTPValidationError
Example
curl -X POST http://localhost:8000/company-backups/read \
-H "Authorization: Bearer $TOKEN"
POST/company-backups/replace
Replace With Copy
Replace the caller's company of the same lineage with a staged copy of it, as the
preview offered, once its owner typed its name; a backup of it is kept first. Switches
the caller to the company the copy became.
Restore an uploaded company backup as the preview showed it, and switch the caller to the restored company. Send the `plan_fingerprint` from the preview. The request is refused if the backup or the plan changed since. Repeating a restore that finished opens the company it made.
Request body
Field
Type
Required
Description
upload_token
string
yes
Token returned when the backup file was uploaded.
mode
string
yes
How to restore: `settings` or `new_company`.
plan_fingerprint
string
yes
Fingerprint of the restore plan the preview returned.
company_name
string, optional
--
Name for the restored company. Optional.
Responses
Status
Description
Body
200
Returns the company ID and name, the outcome, the team members and role permissions restored, and session tokens for the company.
--
422
The request failed validation. The response lists each invalid field and why.
The firm name and reply address of the last send, for the next send form.
Responses
Status
Description
Body
200
Successful Response
--
Example
curl -X GET http://localhost:8000/company-backups/sender \
-H "Authorization: Bearer $TOKEN"
GET/company-backups/staged
Staged Backup
Parameters
Name
In
Required
Type
Description
upload_token
query
yes
string
Token returned when the backup file was uploaded, used to read back the staged file.
mode
query
--
string
How the backup would be restored, which decides the preview returned.
Responses
Status
Description
Body
200
Successful Response
--
422
Validation Error
HTTPValidationError
Example
curl -X GET http://localhost:8000/company-backups/staged \
-H "Authorization: Bearer $TOKEN"
POST/company-backups/start-company/read
Read Company Backup for a Login With No Company
Upload a company backup file for a login that has no company left, and check it. The request carries the login's email and password as form fields with the file. The response previews what restoring does.
Responses
Status
Description
Body
200
Returns the `upload_token`, a summary of the backup, and the plan for restoring it.
--
422
The request failed validation. The response lists each invalid field and why.
HTTPValidationError
Example
curl -X POST http://localhost:8000/company-backups/start-company/read \
-H "Authorization: Bearer $TOKEN"
POST/company-backups/start-company/restore
Restore Company Backup for a Login With No Company
Restore an uploaded company backup as the company of a login that has none left, as the preview showed it, and sign in to that company. Send the `plan_fingerprint` from the preview.
Request body
Field
Type
Required
Description
email
string
yes
Email address of the login.
password
string
yes
Password of the login.
upload_token
string
yes
Token returned when the backup file was uploaded.
plan_fingerprint
string
yes
Fingerprint of the restore plan the preview returned.
company_name
string, optional
--
Name for the restored company. Optional.
Responses
Status
Description
Body
200
Returns the company ID and name, the outcome, and session tokens for the company.
--
422
The request failed validation. The response lists each invalid field and why.