Promo Codes
Redeem promotional codes to add funds to your balance.
Redeem a promo code
POST /api/promos/redeem Redeems a promo code and credits the corresponding amount to the authenticated user's balance. Each user can only redeem a given code once.
Headers
| Header | Value |
|---|---|
Authorization | Bearer YOUR_JWT_TOKEN |
Content-Type | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Yes | The promo code to redeem (case-insensitive, auto-uppercased) |
Example
curl -X POST https://app.vendel.cc/api/promos/redeem \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"code": "PRODUCTHUNT1"}' Success (200 OK)
{
"message": "$1.00 credited to your balance",
"amount": 1,
"new_balance": 1.00
} Errors
// 404 Not Found - Invalid code
{
"message": "Invalid promo code"
}
// 409 Conflict - Already redeemed
{
"message": "You have already redeemed this code"
}
// 410 Gone - Expired or fully redeemed
{
"message": "This promo code has expired"
}
// or
{
"message": "This promo code is no longer active"
}
// or
{
"message": "This promo code has been fully redeemed"
} Promo code properties
Promo codes are created by administrators in the dashboard. Each code has:
| Property | Description |
|---|---|
code | Unique code string (e.g., PRODUCTHUNT1) |
amount | Balance credit in USD |
max_redemptions | Maximum total redemptions (0 = unlimited) |
expires_at | Optional expiration date |
active | Whether the code is currently active |
Related
- Authentication — JWT tokens for API access