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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
entity_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
entity_id | path | yes | string | -- |
Request body
ShareCreateBody, optional
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
entity_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
entity_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X GET http://localhost:8000/docs/:entity_id/share/state \
-H "Authorization: Bearer $TOKEN"