REST API

Share Public API

Generated from the Celerp 2.4.0 OpenAPI schema, 16 September 2026.

GET /docs/import

Import Shared Doc

Recipient's Celerp fetches a shared doc from the sender's instance and imports it. Called by celerp.com/accept after probing that both instances are reachable. The doc is stored with status='received' - not auto-booked. Recipient reviews first.

Parameters

NameInRequiredTypeDescription
srcqueryyesstringSender's Celerp public URL
tokenqueryyesstringShare token from sender

Responses

StatusDescriptionBody
200Successful Response--
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/docs/import \
  -H "Authorization: Bearer $TOKEN"

POST /docs/import-bundle

Import Bundle Upload

Accept a .celerp bundle (JSON body or multipart file) and import as received doc. Used when p2p fetch is unavailable (sender on private network). Accepts: application/json body OR multipart/form-data with field 'bundle'.

Responses

StatusDescriptionBody
200Successful Response--

Example

curl -X POST http://localhost:8000/docs/import-bundle \
  -H "Authorization: Bearer $TOKEN"

GET /share/{token}

View Shared Doc

Public read-only document view - the exact letterhead layout the Print button produces, plus the shared quiet footer. No authentication required. CORS: Access-Control-Allow-Origin: * so celerp.com/accept JS can probe reachability.

Parameters

NameInRequiredTypeDescription
tokenpathyesstring--

Responses

StatusDescriptionBody
200Successful Response--
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/share/:token \
  -H "Authorization: Bearer $TOKEN"

GET /share/{token}/bundle

Download Share Bundle

Download the document as a .celerp JSON bundle (fallback for p2p import failures).

Parameters

NameInRequiredTypeDescription
tokenpathyesstring--

Responses

StatusDescriptionBody
200Successful Response--
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/share/:token/bundle \
  -H "Authorization: Bearer $TOKEN"