Skip to main content

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.

Response Format

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:
CodeDescription
200OK - Request successful
400Bad Request - Invalid request parameters
401Unauthorized - Invalid or missing API key
403Forbidden - API key lacks required permissions
404Not Found - Resource not found
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Server error

Pagination

List endpoints support pagination using query parameters:
ParameterTypeDefaultMaxDescription
pageinteger1-Page number to retrieve
pageSizeinteger20100Number of items per page

Pagination Example

GET /api/v1/forms?page=2&pageSize=50

Pagination Response

{
  "data": [...],
  "meta": {
    "total": 150,
    "page": 2,
    "pageSize": 50,
    "totalPages": 3
  }
}

Filtering

Many endpoints support filtering using query parameters:
ParameterTypeDescription
activebooleanFilter for active items only
publishedbooleanFilter 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 TypeDescription
missing_authorization_headerNo Authorization header provided
invalid_authorization_formatAuthorization header format is incorrect
invalid_api_keyAPI key is invalid or revoked
api_key_inactiveAPI key has been deactivated
resource_not_foundRequested resource does not exist
invalid_parametersRequest parameters are invalid
rate_limit_exceededToo 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

Forms API

  • 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