API Documentation v1
Authentication
/api/v1/auth/tokenExchange email and password for a JWT token.
Request Body
{ "email": "user@example.com", "password": "secret" }Response
{ "success": true, "data": { "token": "eyJ...", "member": { "id": 1, "email": "...", "name": "..." } } }Members
/api/v1/membersRegister a new member (public).
Request Body
{ "email": "new@example.com", "name": "Jane Doe", "password": "securepass" }Response
{ "success": true, "data": { "id": 42, "email": "...", "name": "...", "date_signedup": "..." } }/api/v1/members/profileAuth RequiredGet authenticated member profile.
Response
{ "success": true, "data": { "id": 1, "email": "...", "name": "...", "plan_id": 2, ... } }/api/v1/members/api-keyAuth RequiredGenerate a new API key.
Response
{ "success": true, "data": { "api_key": "ref_abc123...", "date_generated": "..." } }/api/v1/members/api-keyAuth RequiredGet current API key.
Response
{ "success": true, "data": { "api_key": "ref_abc123...", "date_generated": "..." } }Brands
/api/v1/brandsAuth RequiredList all brands. Supports ?page=1&limit=20.
Response
{ "success": true, "data": { "brands": [...], "pagination": { ... } } }/api/v1/brandsAuth RequiredCreate a new brand.
Request Body
{ "url": "https://mybrand.com", "description": "My Brand" }Response
{ "success": true, "data": { "id": 5, "url": "...", "domain": "...", ... } }/api/v1/brands/:brandIdAuth RequiredGet a single brand by ID.
/api/v1/brands/:brandIdAuth RequiredUpdate a brand.
Request Body
{ "description": "Updated description", "logo_url": "https://..." }/api/v1/brands/:brandIdAuth RequiredDelete a brand.
/api/v1/brands/:brandId/statsAuth RequiredGet brand analytics (campaigns, participants, shares, clicks, impressions).
Campaigns
/api/v1/campaignsAuth RequiredList campaigns. Filter with ?brand_id=5. Supports pagination.
/api/v1/campaignsAuth RequiredCreate a new campaign.
Request Body
{ "name": "Summer Promo", "url_id": 5, "type_id": 1, "reward_type": 1 }/api/v1/campaigns/:campaignIdAuth RequiredGet campaign details including widget, reward, and contest info.
/api/v1/campaigns/:campaignIdAuth RequiredUpdate a campaign.
Request Body
{ "name": "Updated Name", "publish": "public" }/api/v1/campaigns/:campaignIdAuth RequiredDelete a campaign and related records.
/api/v1/campaigns/:campaignId/statsAuth RequiredGet campaign stats (participants, shares, clicks, impressions, daily signups).
Participants
/api/v1/participantsAuth RequiredList participants across your campaigns. Filter with ?campaign_id=10.
/api/v1/participants/:participantIdAuth RequiredGet participant detail with shares, rewards, and invited emails.
/api/v1/signupsAuth RequiredRegister a participant signup externally.
Request Body
{ "campaign_id": 10, "email": "participant@example.com", "name": "John" }Webhooks
/api/v1/webhooksAuth RequiredList registered webhooks.
/api/v1/webhooksAuth RequiredRegister a new webhook URL.
Request Body
{ "link": "https://hooks.zapier.com/...", "campaign_id": 10 }/api/v1/webhooks/:webhookIdAuth RequiredUpdate a webhook.
/api/v1/webhooks/:webhookIdAuth RequiredDelete a webhook.
Zapier Integration
/api/v1/zapier/authAuth RequiredValidate API key for Zapier authentication test.
/api/v1/zapier/contactsAuth RequiredGet participants for Zapier polling trigger. Filter with ?campaign_id=10.
Billing
/api/v1/billing/plansList all available subscription plans (public endpoint).