API Overview
Resync provides comprehensive APIs for managing dynamic content, campaigns, and user data.
API Types
1. SDK APIs
Client-side APIs for JavaScript and React Native:
- JavaScript SDK - For web and Node.js applications
- React Native SDK - For iOS and Android mobile apps
2. REST APIs
Server-side REST APIs for backend integration:
- Campaign API - Manage campaigns and A/B tests
- Content API - Create and publish content views
- Audience API - Define and manage user segments
- Event API - Track custom events and analytics
3. Backend Systems
Automated backend processes:
- Webhooks - Real-time event notifications
- Campaign Scheduler - Automatic campaign lifecycle management
- Audience Scheduler - Automatic audience count updates
Authentication
All API requests require authentication using an API key.
Get Your API Key
- Log in to Resync Dashboard
- Navigate to Settings → API Keys
- Copy your API key
Authentication Methods
SDK Authentication
Resync.init({
key: 'your-api-key',
appId: 7,
// ...
});
REST API Authentication
curl -H "Authorization: Bearer your-api-key" \
https://api.getresync.com/v1/campaigns
Base URLs
Production
https://api.getresync.com/v1
Sandbox
https://sandbox-api.getresync.com/v1
Rate Limits
| Plan | Requests per minute |
|---|---|
| Free | 60 |
| Starter | 300 |
| Pro | 1,000 |
| Enterprise | Custom |
Error Responses
All errors follow this format:
{
"error": {
"code": "INVALID_REQUEST",
"message": "Campaign not found",
"details": {}
}
}
Common Error Codes
| Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST | 400 | Invalid request parameters |
UNAUTHORIZED | 401 | Missing or invalid API key |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
RATE_LIMIT_EXCEEDED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Server error |
Pagination
List endpoints support pagination:
GET /v1/campaigns?limit=10&page=1
Response includes next cursor:
{
"data": [...],
"pagination": {
"total": 200,
"nextPage": 2
}
}
API Sections
Webhooks
Receive real-time notifications for events:
- Campaign started/completed
- Content published/unpublished
- Form submitted
- Winner declared
Quick Links
Need Help?
- Check the guides
- Email hello@getresync.com