sharedrop Docs

API Reference

The sharedrop REST API lets you upload, manage, and share HTML pages programmatically.

Base URL

https://sharedrop.cloud/api/v1

Authentication

All requests require a Bearer token in the Authorization header:

curl -H "Authorization: Bearer sd_your_api_key_here" \
  https://sharedrop.cloud/api/v1/pages

See Authentication for details on obtaining and managing API keys.

Rate Limits

All API requests are rate-limited per API key based on your plan tier. Rate limit information is included in response headers.

Response Headers

HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the current window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets

Limits by Tier

EndpointFreeProTeam
Upload20/min100/min200/min
List / Read / Update60/min300/min600/min
Delete / Share30/min150/min300/min

Response Format

Success

{
  "data": { ... }
}

List (Paginated)

{
  "data": [ ... ],
  "pagination": {
    "next_cursor": "uuid-or-null",
    "has_more": true
  }
}

Error

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description"
  }
}

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Invalid or missing API key
RATE_LIMIT_EXCEEDED429Too many requests. Check X-RateLimit-* headers.
PAGE_NOT_FOUND404Page does not exist or you don't have access
VALIDATION_ERROR400Invalid request body or parameters
PAGE_LIMIT_REACHED403Page count limit exceeded for your plan
FILE_SIZE_EXCEEDED413File exceeds the size limit for your plan

Endpoints

Upload Page

POST /api/v1/pages

Upload an HTML file to create a new page. Supports two content types.

Raw HTML Body

Send HTML directly as the request body with Content-Type: text/html. Pass metadata as query parameters.

Query Parameters:

ParameterTypeDefaultDescription
titlestringExtracted from HTML <title>Page title
modestringstaticstatic or interactive
visibilitystringpublic (Free) / private (Pro+)public, private, or shared
workspace_idstring--Upload to a specific workspace
curl -X POST \
  -H "Authorization: Bearer sd_..." \
  -H "Content-Type: text/html" \
  -d "<html><body><h1>My Report</h1></body></html>" \
  "https://sharedrop.cloud/api/v1/pages?title=My+Report&mode=static"

FormData Upload

Send an HTML file as multipart form data.

curl -X POST \
  -H "Authorization: Bearer sd_..." \
  -F "file=@report.html" \
  -F "title=My Report" \
  https://sharedrop.cloud/api/v1/pages

Response 201:

{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "slug": "abc123",
    "title": "My Report",
    "mode": "static",
    "file_size": 2048,
    "visibility": "private",
    "url": "/username/abc123",
    "full_url": "https://sharedrop.cloud/username/abc123",
    "created_at": "2026-04-07T00:00:00.000Z",
    "updated_at": "2026-04-07T00:00:00.000Z"
  }
}

Error Cases:

  • 400 VALIDATION_ERROR -- Empty body, invalid form data, non-HTML file
  • 403 PAGE_LIMIT_REACHED -- Page count limit exceeded
  • 413 FILE_SIZE_EXCEEDED -- File exceeds size limit (5 MB Free, 10 MB Pro/Team)

List Pages

GET /api/v1/pages

List your pages with cursor-based pagination.

Query Parameters:

ParameterTypeDefaultDescription
limitnumber50Results per page (max 100)
cursorstring--Pagination cursor from previous response
workspace_idstring--Filter to a specific workspace
curl -H "Authorization: Bearer sd_..." \
  "https://sharedrop.cloud/api/v1/pages?limit=10"

Response 200:

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "slug": "abc123",
      "title": "My Report",
      "mode": "static",
      "file_size": 2048,
      "visibility": "private",
      "url": "/username/abc123",
      "full_url": "https://sharedrop.cloud/username/abc123",
      "created_at": "2026-04-07T00:00:00.000Z",
      "updated_at": "2026-04-07T00:00:00.000Z"
    }
  ],
  "pagination": {
    "next_cursor": "660e8400-e29b-41d4-a716-446655440001",
    "has_more": true
  }
}

To fetch the next page, pass cursor from pagination.next_cursor:

curl -H "Authorization: Bearer sd_..." \
  "https://sharedrop.cloud/api/v1/pages?limit=10&cursor=660e8400-e29b-41d4-a716-446655440001"

Get Page

GET /api/v1/pages/:id

Get metadata for a specific page.

curl -H "Authorization: Bearer sd_..." \
  https://sharedrop.cloud/api/v1/pages/550e8400-e29b-41d4-a716-446655440000

Response 200:

{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "slug": "abc123",
    "title": "My Report",
    "mode": "static",
    "file_size": 2048,
    "visibility": "private",
    "url": "/username/abc123",
    "full_url": "https://sharedrop.cloud/username/abc123",
    "created_at": "2026-04-07T00:00:00.000Z",
    "updated_at": "2026-04-07T00:00:00.000Z"
  }
}

Error Cases:

  • 404 PAGE_NOT_FOUND -- Page does not exist or you don't have access

Update Page

PATCH /api/v1/pages/:id

Update a page's title or visibility.

Request Body (JSON):

FieldTypeDescription
titlestringNew page title
visibilitystringpublic, private, or shared

Both fields are optional. Include only the fields you want to change.

curl -X PATCH \
  -H "Authorization: Bearer sd_..." \
  -H "Content-Type: application/json" \
  -d '{"title": "Updated Title", "visibility": "public"}' \
  https://sharedrop.cloud/api/v1/pages/550e8400-e29b-41d4-a716-446655440000

Response 200:

{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "slug": "abc123",
    "title": "Updated Title",
    "mode": "static",
    "file_size": 2048,
    "visibility": "public",
    "url": "/username/abc123",
    "full_url": "https://sharedrop.cloud/username/abc123",
    "created_at": "2026-04-07T00:00:00.000Z",
    "updated_at": "2026-04-07T00:00:00.000Z"
  }
}

Error Cases:

  • 400 VALIDATION_ERROR -- Invalid JSON body or field values
  • 403 VALIDATION_ERROR -- Visibility not available on your plan (e.g., private on Free tier)
  • 404 PAGE_NOT_FOUND -- Page does not exist or you don't have access

Delete Page

DELETE /api/v1/pages/:id

Permanently delete a page and its stored HTML. This also deletes all versions, comments, shares, and access grants.

curl -X DELETE \
  -H "Authorization: Bearer sd_..." \
  https://sharedrop.cloud/api/v1/pages/550e8400-e29b-41d4-a716-446655440000

Response 200:

{
  "data": {
    "success": true
  }
}

Error Cases:

  • 404 PAGE_NOT_FOUND -- Page does not exist or you don't have access

Share Page

POST /api/v1/pages/:id/share

Share a page with someone by email address. Creates an access grant that allows the recipient to view the page.

Request Body (JSON):

FieldTypeRequiredDescription
emailstringYesEmail address of the person to share with
curl -X POST \
  -H "Authorization: Bearer sd_..." \
  -H "Content-Type: application/json" \
  -d '{"email": "colleague@example.com"}' \
  https://sharedrop.cloud/api/v1/pages/550e8400-e29b-41d4-a716-446655440000/share

Response 201:

{
  "data": {
    "id": "grant-uuid",
    "email": "colleague@example.com",
    "status": "pending",
    "created_at": "2026-04-07T00:00:00.000Z"
  }
}

The grant starts as pending. When the recipient signs in to sharedrop with a matching email, the grant automatically activates and they can view the page.

Error Cases:

  • 400 VALIDATION_ERROR -- Invalid email address
  • 404 PAGE_NOT_FOUND -- Page does not exist or you don't have access