Overview and Authorization
Overview
Stack9 Experience API provides comprehensive endpoints for managing content, marketing, and AI services. This RESTful API enables developers to integrate with Stack9's Digital Experience Platform (DXP) to manage email campaigns, content pages, forms, AI assistants, and more.
Base URL
https://apis.app.stack9.co/api
For development environments:
http://localhost:3000/api
Authentication
All API requests require authentication using an API key. Include your API key in the request headers:
X-API-Key: your-api-key-here
Example Request with Authentication
curl -X GET \
https://apis.app.stack9.co/api/email_settings \
-H 'X-API-Key: your-api-key-here' \
-H 'Content-Type: application/json'
Request Format
- All requests must include the
Content-Type: application/jsonheader - Request bodies should be valid JSON
- Path parameters are denoted with curly braces in the endpoint documentation
- Query parameters should be URL-encoded
Response Format
All API responses follow a consistent JSON structure:
Successful Response
{
"results": [...],
"metadata": {
"total": 100,
"page": 1,
"pageSize": 20
}
}
Error Response
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error description",
"details": {}
}
}
HTTP Status Codes
| Status Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 201 | Created - Resource created successfully |
| 204 | No Content - Request succeeded with no response body |
| 400 | Bad Request - Invalid request parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource not found |
| 409 | Conflict - Resource conflict (e.g., duplicate) |
| 422 | Unprocessable Entity - Validation error |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Server error |
Rate Limiting
API requests are rate-limited to ensure service stability:
- Standard tier: 100 requests per minute
- Premium tier: 1000 requests per minute
- Enterprise tier: Custom limits
Rate limit headers are included in all responses:
X-RateLimit-Limit: Maximum requests per windowX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Unix timestamp when the window resets
Pagination
List endpoints support pagination using the following parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-based) |
pageSize | integer | 20 | Number of items per page (max: 100) |
sortBy | string | created_at | Field to sort by |
sortOrder | string | desc | Sort direction (asc/desc) |
Pagination Response
{
"results": [...],
"metadata": {
"total": 250,
"page": 2,
"pageSize": 20,
"totalPages": 13,
"hasNext": true,
"hasPrevious": true
}
}
Filtering and Searching
Many list endpoints support filtering and searching:
Filter Syntax
GET /api/subscribers?status=active&created_after=2024-01-01
Search Syntax
GET /api/subscribers/search?q=john@example.com
Webhooks
Stack9 Experience supports webhooks for real-time event notifications. Configure webhooks through the Email Settings API to receive notifications for:
- Email delivery events
- Form submissions
- Subscriber status changes
- Campaign completion
API Versioning
The API version is included in the response headers:
X-API-Version: 1.7.4
Breaking changes will be introduced in new major versions with advance notice.
SDK and Libraries
Official SDKs are available for:
- JavaScript/TypeScript
- Python
- PHP
- Ruby
- Go
Support
For API support:
- Documentation: https://docs.stack9.io
- Status Page: https://status.stack9.io
- Support Email: api-support@stack9.io
Quick Start Guide
- Obtain API Credentials: Contact your Stack9 administrator to get API keys
- Test Authentication: Make a test request to
/api/email_settings - Explore Endpoints: Review the resource-specific documentation
- Implement Integration: Use our SDKs or make direct HTTP requests
- Monitor Usage: Track your API usage through the dashboard
Resource Documentation
Detailed documentation for each resource type:
- Email Settings - Configure email sending domains, sender identities, and suppressions
- Email Templates - Create and manage reusable email templates
- Marketing Campaigns - Orchestrate email marketing campaigns
- Marketing Subscribers - Manage subscriber data and preferences
- Marketing Lists - Organize subscribers into targeted lists
- Forms - Build and deploy web forms
- Pages & Documents - Content management for pages and documents
- AI Assistants - Configure and interact with AI assistants