REST API v1.0

WishWise AI API

Integrate AI-powered festival wishes into your applications with our secure, scalable REST API.

Quick Start

1. Get Your API Key

Generate an API key from your dashboard at /dashboard/settings or via the Developer API endpoint.

POST /api/developer/keys
{
  "name": "Production Key",
  "permissions": ["contacts:read", "wishes:write"]
}

2. Make Your First Request

curl -X POST https://api.wishwise.ai/v1/wishes \
  -H "Authorization: Bearer ww_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contactId": "contact_abc123",
    "templateId": "diwali_gold",
    "channel": "whatsapp",
    "personalMessage": "Wishing you prosperity!"
  }'

Authentication

All API requests must include your API key in the Authorization header:

Authorization: Bearer ww_YOUR_API_KEY

🔐 Security Best Practices

  • • Never expose your API key in client-side code
  • • Use environment variables to store keys
  • • Rotate keys periodically (especially after team changes)
  • • Use minimal permissions scopes

API Endpoints

GETPOST/api/contacts

Manage your contacts database

MethodDescriptionScope
GETList all contactscontacts:read
POSTCreate a new contactcontacts:write

POST/api/wishes

Create and send wishes

// Request
{
  "contactId": "string",      // Required
  "templateId": "string",     // Required
  "channel": "email|sms|whatsapp",
  "personalMessage": "string",
  "scheduledFor": "ISO8601"   // Optional
}

// Response
{
  "success": true,
  "wishId": "wish_xyz789",
  "status": "queued",
  "estimatedDelivery": "2026-01-17T12:00:00Z"
}

GET/api/templates

Browse available wish templates

POST/api/ai/generate

Generate AI-powered wish messages

{
  "festival": "diwali",
  "relationship": "client",
  "tone": "professional",
  "recipientName": "Sharma Ji"
}

Webhooks

Receive real-time notifications when events occur. Configure webhooks at /api/developer/webhooks

Available Events

wish.created
wish.sent
wish.delivered
wish.read
wish.failed
contact.created
contact.updated
contact.deleted
payment.completed
payment.failed
subscription.created
subscription.cancelled

Rate Limits

PlanRequests/DayBurst Limit
Free10010/minute
Pro1,00060/minute
Business10,000300/minute
EnterpriseUnlimitedCustom

SDKs & Libraries

📦

Node.js

npm install @wishwise/sdk
🐍

Python

pip install wishwise
🔷

PHP

composer require wishwise/sdk