Skip to content

API Overview

The CloudSync API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.

Base URL

All API requests should be made to:

https://api.cloudsync.io/v1

Authentication

The CloudSync API uses API keys to authenticate requests. Include your API key in the Authorization header:

bash
curl https://api.cloudsync.io/v1/workspaces \
  -H "Authorization: Bearer sk_live_abc123..."

See Authentication for more details.

Request Format

Send request bodies as JSON with the Content-Type: application/json header:

bash
curl https://api.cloudsync.io/v1/files \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"workspace": "my-project", "path": "/documents"}'

Response Format

All responses are JSON-encoded:

json
{
  "data": {
    "id": "file_abc123",
    "name": "report.pdf",
    "path": "/documents/report.pdf",
    "size": 1048576,
    "createdAt": "2026-01-06T10:30:00Z"
  }
}

Pagination

List endpoints return paginated results:

json
{
  "data": [...],
  "pagination": {
    "cursor": "eyJpZCI6MTAwfQ==",
    "hasMore": true
  }
}

Use the cursor parameter to fetch the next page:

bash
curl "https://api.cloudsync.io/v1/files?cursor=eyJpZCI6MTAwfQ=="

Error Handling

Errors return appropriate HTTP status codes with a JSON body:

json
{
  "error": {
    "code": "resource_not_found",
    "message": "File not found at the specified path",
    "details": {
      "path": "/documents/missing.pdf"
    }
  }
}

Status Codes

CodeDescription
200Success
201Created
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Rate Limited
500Server Error

Rate Limiting

API requests are limited to:

  • Free plan: 100 requests/minute
  • Pro plan: 1,000 requests/minute
  • Enterprise: Custom limits

Rate limit headers are included in all responses:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1704534600

SDKs

Official SDKs are available for popular languages:

bash
npm install @cloudsync/sdk
bash
pip install cloudsync
bash
go get github.com/cloudsync/cloudsync-go
bash
gem install cloudsync

API Reference

Released under the MIT License.