Complete reference for the DripKit API
https://dripkit.dabino.dev/api/v1All API requests require authentication using your API key. Include it in the Authorization header:
Authorization: Bearer YOUR_API_KEYGet your API key from the Settings page.
All responses are JSON. Successful requests return a 2xx status code. Errors return 4xx or 5xx with an error message.
/contactsEnroll a contact in a campaign
{
"email": "user@example.com",
"campaign_id": "uuid-of-campaign",
"metadata": {
"name": "John Doe",
"plan": "pro",
"custom_field": "value"
}
}{
"success": true,
"contact": {
"id": "contact-uuid",
"email": "user@example.com",
"campaign_id": "campaign-uuid",
"enrolled_at": "2024-01-15T10:30:00Z"
}
}curl -X POST https://dripkit.dabino.dev/api/v1/contacts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"campaign_id": "campaign-uuid",
"metadata": {"name": "John"}
}'/contacts/:id/unsubscribeUnsubscribe a contact from their campaign
id- Contact UUID{
"success": true,
"message": "Contact unsubscribed successfully"
}curl -X POST https://dripkit.dabino.dev/api/v1/contacts/contact-uuid/unsubscribe \
-H "Authorization: Bearer YOUR_API_KEY"/campaignsList all your campaigns
{
"campaigns": [
{
"id": "campaign-uuid",
"name": "Onboarding Sequence",
"description": "Welcome new users",
"is_active": true,
"created_at": "2024-01-15T10:00:00Z",
"step_count": 3,
"contact_count": 42
}
],
"total": 1
}curl -X GET https://dripkit.dabino.dev/api/v1/campaigns \
-H "Authorization: Bearer YOUR_API_KEY"| Status Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Access denied |
| 404 | Not Found - Resource doesn't exist |
| 409 | Conflict - Resource already exists |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
// Using fetch
const API_KEY = 'your_api_key'
const BASE_URL = 'https://dripkit.dabino.dev/api/v1'
async function enrollContact(email, campaignId, metadata = {}) {
const response = await fetch(`${BASE_URL}/contacts`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
email,
campaign_id: campaignId,
metadata
}
}
if (!response.ok) {
const error = await response.json()
throw new Error(error.error)
}
return response.json()
}
// Usage
await enrollContact('user@example.com', 'campaign-uuid', {
name: 'John Doe',
plan: 'pro'
})import requests
API_KEY = 'your_api_key'
BASE_URL = 'https://dripkit.dabino.dev/api/v1'
def enroll_contact(email, campaign_id, metadata=None):
response = requests.post(
f'{}BASE_URL}/contacts',
headers={
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
},
json={
'email': email,
'campaign_id': campaign_id,
'metadata': metadata or {}
}
)
response.raise_for_status()
return response.json()
# Usage
result = enroll_contact('user@example.com', 'campaign-uuid', {
'name': 'John Doe',
'plan': 'pro'
})All API endpoints are rate limited to prevent abuse and ensure fair usage:
All API responses include headers to help you track your usage:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
X-RateLimit-Reset: 1704067200000If you exceed the rate limit, you'll receive a 429 status code:
{
"error": "Rate limit exceeded. Please try again later.",
"limit": 60,
"remaining": 0,
"reset": "2024-01-15T10:30:00.000Z"
}Wait until the reset time before making additional requests.