Skip to main content

Endpoints

MethodPathScopeDescription
GET/sharesshares:readList share links
POST/sharesshares:writeCreate a share link
GET/shares/:idshares:readGet a share with view stats
PATCH/shares/:idshares:writeUpdate a share link
DELETE/shares/:idshares:writeDelete a share link

List Shares

curl "https://my.clarife.app/api/v1/shares?document_id=d1a2b3c4-..." \
  -H "Authorization: Bearer clrf_your_key"
Query parameters:
ParamTypeDefaultDescription
limitinteger50Results per page (max 100)
offsetinteger0Number of results to skip
document_iduuidFilter shares by document
Response:
{
  "data": [
    {
      "id": "s1a2b3c4-...",
      "document_id": "d1a2b3c4-...",
      "is_active": true,
      "has_password": false,
      "expires_at": null,
      "show_branding": true,
      "view_count": 47,
      "created_at": "2026-03-20T10:00:00Z"
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}

Create a Share

curl -X POST https://my.clarife.app/api/v1/shares \
  -H "Authorization: Bearer clrf_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "document_id": "d1a2b3c4-...",
    "password": "s3cret",
    "expires_at": "2026-04-30T23:59:59Z",
    "branding_id": "b1a2b3c4-...",
    "show_branding": true
  }'
FieldTypeRequiredDescription
document_iduuidYesDocument to share
passwordstringNoPassword-protect the link
expires_atISO 8601NoExpiration date/time
branding_iduuidNoCustom branding to apply (Business plan)
show_brandingbooleanNoShow branding on the share page (default true)
Response (201 Created):
{
  "data": {
    "id": "s2b3c4d5-...",
    "document_id": "d1a2b3c4-...",
    "url": "https://clarife.app/s/s2b3c4d5-...",
    "is_active": true,
    "has_password": true,
    "expires_at": "2026-04-30T23:59:59Z",
    "show_branding": true,
    "view_count": 0,
    "created_at": "2026-03-28T12:00:00Z"
  }
}

Get a Share

curl https://my.clarife.app/api/v1/shares/s1a2b3c4-... \
  -H "Authorization: Bearer clrf_your_key"
Returns the share link with view statistics.

Update a Share

curl -X PATCH https://my.clarife.app/api/v1/shares/s1a2b3c4-... \
  -H "Authorization: Bearer clrf_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "password": null,
    "expires_at": "2026-06-01T00:00:00Z",
    "show_branding": false
  }'
Pass null for password to remove password protection. All fields are optional.

Delete a Share

curl -X DELETE https://my.clarife.app/api/v1/shares/s1a2b3c4-... \
  -H "Authorization: Bearer clrf_your_key"
Response (200 OK):
{ "data": { "id": "s1a2b3c4-...", "deleted": true } }
Deleting a share permanently removes the link. The URL stops working immediately and cannot be restored.

Share URL Format

Public share links follow this format:
https://clarife.app/s/{share_id}
The URL is returned in the url field when you create or retrieve a share.