Overview
The SitePlot API is organized around REST principles. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes and authentication.
Base URL
https://your-domain.com/api/v1
Authentication
All API endpoints require authentication using API keys. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
HTTP Methods
The SitePlot API currently supports:
- GET: Retrieve data from the API
The API is currently read-only. Write operations (POST, PUT, DELETE) are not supported at this time.
All API responses return JSON with a consistent structure:
Success Response Structure
{
"data": [...], // Array of requested resources
"meta": {
"total": 150, // Total number of items
"page": 1, // Current page number
"pageSize": 20, // Items per page
"totalPages": 8 // Total number of pages
}
}
Error Response Structure
{
"error": "error_type",
"message": "Human-readable error description"
}
HTTP Status Codes
The API uses standard HTTP status codes:
| Code | Description |
|---|
200 | OK - Request successful |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - API key lacks required permissions |
404 | Not Found - Resource not found |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error |
List endpoints support pagination using query parameters:
| Parameter | Type | Default | Max | Description |
|---|
page | integer | 1 | - | Page number to retrieve |
pageSize | integer | 20 | 100 | Number of items per page |
GET /api/v1/forms?page=2&pageSize=50
{
"data": [...],
"meta": {
"total": 150,
"page": 2,
"pageSize": 50,
"totalPages": 3
}
}
Filtering
Many endpoints support filtering using query parameters:
| Parameter | Type | Description |
|---|
active | boolean | Filter for active items only |
published | boolean | Filter for published items only |
Filtering Example
GET /api/v1/forms?active=true&pageSize=10
Rate Limiting
API requests are rate-limited to ensure optimal performance:
- 1000 requests per hour per API key
- 10 requests per second burst limit
Rate limit information is included in response headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200
When rate limits are exceeded, the API returns a 429 Too Many Requests status code:
{
"error": "Rate limit exceeded",
"message": "Too many requests. Please try again later."
}
Error Handling
Common Error Types
| Error Type | Description |
|---|
missing_authorization_header | No Authorization header provided |
invalid_authorization_format | Authorization header format is incorrect |
invalid_api_key | API key is invalid or revoked |
api_key_inactive | API key has been deactivated |
resource_not_found | Requested resource does not exist |
invalid_parameters | Request parameters are invalid |
rate_limit_exceeded | Too many requests sent |
Error Response Examples
Invalid API Key:
{
"error": "invalid_api_key",
"message": "The provided API key is invalid or has been revoked"
}
Resource Not Found:
{
"error": "resource_not_found",
"message": "The requested form was not found"
}
Invalid Parameters:
{
"error": "invalid_parameters",
"message": "Page size must be between 1 and 100"
}
Available Endpoints
- GET
/api/v1/forms - List all forms
- GET
/api/v1/forms/{id}/submissions - Get form submissions
Page Builder API
- GET
/api/v1/page-builder - List all pages
- GET
/api/v1/page-builder/redirects - List all redirects
SDKs and Libraries
Official SDKs are available for popular programming languages:
- JavaScript/Node.js:
@siteplot/api
- Python:
siteplot-api
- PHP:
siteplot/api
Support
For API support and questions:
- Email: [email protected]
- Documentation: Browse our comprehensive guides
- Status Page: Check API status and uptime