API Reference
The SurfaceDocs REST API lets you create, read, and delete documents and manage folders.Base URL
Authentication
All requests require an API key passed in theX-API-Key header:
Rate Limits
Rate limits depend on your plan:| Plan | Per Minute | Per Day |
|---|---|---|
| Free | 20 | 1,000 |
| Pro | 300 | 50,000 |
| Header | Description |
|---|---|
X-RateLimit-Limit | Requests allowed per minute |
X-RateLimit-Remaining | Requests remaining this minute |
X-RateLimit-Reset | Unix timestamp when the limit resets |
429 response with a Retry-After header.
Errors
All errors return a consistent JSON format:| HTTP Code | Description |
|---|---|
| 400 | Validation error |
| 401 | Invalid or missing API key |
| 403 | Insufficient permissions |
| 404 | Resource not found |
| 429 | Rate limit exceeded |