REST API

Share API

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

GET /docs/{entity_id}/share

Share Status

Share state for a document or list. Mints the (deactivated) token on first call so the UI always shows the document's stable URL; never activates anything.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

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

POST /docs/{entity_id}/share

Create Share Link

Create the public share token for a document or list (or update the expiry of the existing one).

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Request body

ShareCreateBody, optional

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

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

DELETE /docs/{entity_id}/share

Revoke Share Link

Deactivate the share link immediately. The token row persists so the document keeps its stable URL; Share turns the same link back on.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X DELETE http://localhost:8000/docs/:entity_id/share \
  -H "Authorization: Bearer $TOKEN"

GET /docs/{entity_id}/share/state

Share State

Read-only share state for the page-load status light. Never mints a token (so merely viewing a document doesn't create share rows).

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

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