API Reference
Complete reference documentation for the Shablonix REST API.
Overview
The Shablonix 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.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Base URL
All API requests should be made to the following base URL:
https://api.shablonix.com/v1
API Versioning
v1.Endpoints
The API provides the following endpoint groups:
Rate Limits
API requests are rate limited to ensure fair usage and protect our infrastructure. Rate limits vary by plan:
| Plan | Requests/Minute | Requests/Day | Burst Limit |
|---|---|---|---|
| Trial | 30 | 1,000 | 50 |
| Starter | 60 | 5,000 | 100 |
| Pro | 300 | 50,000 | 500 |
| Enterprise | Custom | Custom | Custom |
Rate limit information is included in response headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1704067200
Rate Limit Exceeded
429 Too Many Requests
response. Implement exponential backoff in your application to handle this gracefully.Error Codes
The API uses standard HTTP status codes to indicate success or failure. Errors include a JSON body with more details:
{
"error": {
"code": "invalid_template",
"message": "The specified template does not exist",
"details": {
"template_id": "tpl_invalid123"
}
}
}
| Status Code | Meaning | Common Causes |
|---|---|---|
200 | OK | Request succeeded |
201 | Created | Resource created successfully |
400 | Bad Request | Invalid JSON, missing required fields |
401 | Unauthorized | Invalid or missing API key |
403 | Forbidden | API key lacks required permissions |
404 | Not Found | Resource does not exist |
422 | Unprocessable Entity | Valid JSON but invalid data |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Unexpected server error |
Pagination
List endpoints support cursor-based pagination using limit and cursor parameters:
# First page
curl https://api.shablonix.com/v1/templates?limit=10 \
-H "Authorization: Bearer tf_live_your_api_key"
# Next page
curl https://api.shablonix.com/v1/templates?limit=10&cursor=eyJpZCI6InRwbF8xMjMifQ \
-H "Authorization: Bearer tf_live_your_api_key"
Paginated responses include navigation metadata:
{
"data": [...],
"pagination": {
"has_more": true,
"next_cursor": "eyJpZCI6InRwbF8xMjMifQ",
"total_count": 47
}
}