curl -X POST https://zeplo.ai/api/subscriptions \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "x-channel-id: YOUR_CHANNEL_ID" \
-H "Content-Type: application/json" \
-d '{ "planId": 2, "startDate": "2026-01-15", "autoRenew": true }'
{
"success": true,
"data": {
"id": 10,
"userId": 5,
"planId": 2,
"status": "active",
"startDate": "2026-01-15T00:00:00Z",
"endDate": "2026-02-14T23:59:59Z",
"autoRenew": true
}
}
Subscriptions & Plans
POST Create Subscription
Create or assign a subscription.
POST
/
api
/
subscriptions
curl -X POST https://zeplo.ai/api/subscriptions \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "x-channel-id: YOUR_CHANNEL_ID" \
-H "Content-Type: application/json" \
-d '{ "planId": 2, "startDate": "2026-01-15", "autoRenew": true }'
{
"success": true,
"data": {
"id": 10,
"userId": 5,
"planId": 2,
"status": "active",
"startDate": "2026-01-15T00:00:00Z",
"endDate": "2026-02-14T23:59:59Z",
"autoRenew": true
}
}
Create subscription
POST /api/subscriptions
Create a new subscription for a user.
Headers
string
required
Your API key
string
required
Your API secret key
string
required
WhatsApp channel ID
Body parameters
integer
required
Plan ID.
string
default:"today"
Start date.
boolean
default:"true"
Enable auto-renewal.
{
"planId": 2,
"startDate": "2026-01-15",
"autoRenew": true
}
curl -X POST https://zeplo.ai/api/subscriptions \
-H "x-api-key: YOUR_API_KEY" \
-H "x-api-secret: YOUR_API_SECRET" \
-H "x-channel-id: YOUR_CHANNEL_ID" \
-H "Content-Type: application/json" \
-d '{ "planId": 2, "startDate": "2026-01-15", "autoRenew": true }'
Assign subscription (superadmin)
POST /api/assignSubscription
Body parameters
integer
required
User ID to assign the subscription to.
integer
required
Plan ID.
integer
required
Subscription duration in days.
{
"userId": 5,
"planId": 2,
"duration": 30
}
{
"success": true,
"data": {
"id": 10,
"userId": 5,
"planId": 2,
"status": "active",
"startDate": "2026-01-15T00:00:00Z",
"endDate": "2026-02-14T23:59:59Z",
"autoRenew": true
}
}
