Endpoints
| Method | Path | Scope | Description |
|---|
GET | /shares | shares:read | List share links |
POST | /shares | shares:write | Create a share link |
GET | /shares/:id | shares:read | Get a share with view stats |
PATCH | /shares/:id | shares:write | Update a share link |
DELETE | /shares/:id | shares:write | Delete a share link |
List Shares
curl "https://my.clarife.app/api/v1/shares?document_id=d1a2b3c4-..." \
-H "Authorization: Bearer clrf_your_key"
Query parameters:
| Param | Type | Default | Description |
|---|
limit | integer | 50 | Results per page (max 100) |
offset | integer | 0 | Number of results to skip |
document_id | uuid | — | Filter 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
}'
| Field | Type | Required | Description |
|---|
document_id | uuid | Yes | Document to share |
password | string | No | Password-protect the link |
expires_at | ISO 8601 | No | Expiration date/time |
branding_id | uuid | No | Custom branding to apply (Business plan) |
show_branding | boolean | No | Show 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.
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.