API Documentation
Welcome to the API reference for the Deep Prominence Platform. Integrate WhatsApp cloud messaging, Indian WhatsApp OTP verification, campaigns, and transactional emails directly into your applications.
Prepend all endpoints documented below with your environment's root URL:
Production: https://whatsapp.infybusiness.com/api
Development: http://127.0.0.1:8000/api
Authentication
The platform supports two authentication methods depending on the operation context:
1. API Key Authentication (`X-API-Key`)
Used for transactional and marketing operations (WhatsApp sends, OTP triggers, Emails, Wallet queries). Pass your token in the header:
X-API-Key: dpk_sec_your_api_key_here
API keys are provisioned inside the portal or via the Account Management endpoints.
2. Bearer Token Authentication (`Authorization`)
Used for account-specific activities, token configuration, and client portal operations. Retrieved upon authentication:
Authorization: Bearer sanctum_token_here
Account Management
Register, authenticate portal logins, and provision API Keys using Bearer token routes.
Register a new client company account.
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/auth/register" \
-H "Content-Type: application/json" \
-d '{
"company_name": "Acme Corp",
"email": "contact@acme.com",
"password": "securepassword123",
"password_confirmation": "securepassword123",
"phone": "919876543210"
}'
Response (201 Created):
{
"success": true,
"message": "Registration successful. Please log in.",
"data": {
"client": {
"id": 1,
"company_name": "Acme Corp",
"email": "contact@acme.com",
"phone": "919876543210"
}
}
}
Authenticate and retrieve a personal access token.
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/auth/login" \
-H "Content-Type: application/json" \
-d '{
"email": "contact@acme.com",
"password": "securepassword123"
}'
Response (200 OK):
{
"success": true,
"token": "1|abcdef1234567890abcdef1234567890",
"client": {
"id": 1,
"company_name": "Acme Corp",
"email": "contact@acme.com"
}
}
Portal login callback for clients.
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/client/login" \
-H "Content-Type: application/json" \
-d '{
"email": "contact@acme.com",
"password": "securepassword123"
}'
Response (200 OK):
{
"success": true,
"token": "2|clienttoken1234567890abcdef123456",
"client": {
"id": 1,
"company_name": "Acme Corp",
"email": "contact@acme.com"
}
}
Generate a new transactional API Key. Requires Bearer Token.
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/auth/api-keys" \
-H "Authorization: Bearer 1|abcdef1234567890abcdef1234567890" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Key",
"key_type": "secret",
"scopes": ["whatsapp:send", "email:send"],
"allowed_ips": ["192.0.2.1"]
}'
Response (201 Created):
{
"success": true,
"message": "API key generated successfully.",
"data": {
"id": 5,
"name": "Production Key",
"key_type": "secret",
"api_key": "dpk_sec_demo_key_abcdef123456",
"scopes": ["whatsapp:send", "email:send"]
}
}
List active API keys associated with client. Requires Bearer Token.
Request Example:
curl -X GET "https://whatsapp.infybusiness.com/api/auth/api-keys" \
-H "Authorization: Bearer 1|abcdef1234567890abcdef1234567890"
Response (200 OK):
{
"success": true,
"data": [
{
"id": 5,
"name": "Production Key",
"key_type": "secret",
"last_used_at": "2026-07-11 11:30:00",
"created_at": "2026-07-11 10:00:00"
}
]
}
Revoke and delete an active key. Requires Bearer Token.
Request Example:
curl -X DELETE "https://whatsapp.infybusiness.com/api/auth/api-keys/5" \
-H "Authorization: Bearer 1|abcdef1234567890abcdef1234567890"
Response (200 OK):
{
"success": true,
"message": "API key revoked successfully."
}
WhatsApp Service
Send standard transactional texts, media templates, or marketing broadcasts via API Key headers.
Send single WhatsApp message (Text, Template, Image, Document, Video, or Audio).
Request Example (Text):
curl -X POST "https://whatsapp.infybusiness.com/api/messages/send" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"to": "919876543210",
"type": "text",
"text": "Hello! Your package has been dispatched."
}'
Response (200 OK):
{
"success": true,
"message": "Message sent successfully.",
"data": {
"id": 101,
"wa_message_id": "wamid.HBgLOTE5ODc2NTQzMjEwFQIAERg5MUFEQ0ExODQ0M0ZBRjM2QkUAAg==",
"status": "sent",
"recipient": "919876543210",
"type": "text"
}
}
Request Example (Template):
curl -X POST "https://whatsapp.infybusiness.com/api/messages/send" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"to": "919876543210",
"type": "template",
"template_name": "welcome_alert",
"language": "en_US",
"template_params": ["John Doe", "Order #12345"]
}'
Response (200 OK):
{
"success": true,
"message": "Message sent successfully.",
"data": {
"id": 103,
"wa_message_id": "wamid.HBgLOTE5ODc2NTQzMjEwFQIAERg5MUFEQ0ExODQ0M0ZBRjM2QkUAAg==",
"status": "sent",
"recipient": "919876543210",
"type": "template"
}
}
Send single marketing message using promo channel routing.
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/messages/promotions/send" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"to": "919876543210",
"type": "template",
"template_name": "festive_discount",
"language": "en_US",
"template_params": ["20% OFF"]
}'
Response (200 OK):
{
"success": true,
"message": "Promotional message sent successfully.",
"data": {
"id": 102,
"wa_message_id": "wamid.HBgLOTE5ODc2NTQzMjEwFQIAERg5MUFEQ0ExODQ0M0ZBRjM2Q0UAAg==",
"status": "sent",
"recipient": "919876543210",
"type": "template"
}
}
List logs with parameters: `status`, `type`, `date_from`, `date_to`, `search`, `per_page`.
Request Example:
curl -X GET "https://whatsapp.infybusiness.com/api/messages?status=delivered&per_page=1" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
Response (200 OK):
{
"success": true,
"data": {
"current_page": 1,
"data": [
{
"id": 101,
"recipient_number": "919876543210",
"message_type": "text",
"status": "delivered",
"created_at": "2026-07-11T11:00:00.000000Z"
}
],
"first_page_url": "https://whatsapp.infybusiness.com/api/messages?page=1",
"last_page": 5,
"per_page": 1,
"total": 5
}
}
Show specific WhatsApp message details.
Request Example:
curl -X GET "https://whatsapp.infybusiness.com/api/messages/101" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
Response (200 OK):
{
"success": true,
"data": {
"id": 101,
"client_id": 1,
"recipient_number": "919876543210",
"message_type": "text",
"message_body": "Hello! Your package has been dispatched.",
"status": "delivered",
"wa_message_id": "wamid.HBgLOTE5ODc2NTQzMjEwFQIAERg5MUFEQ0ExODQ0M0ZBRjM2QkUAAg==",
"error_message": null,
"created_at": "2026-07-11T11:00:00.000000Z"
}
}
OTP Service
Send and verify 2FA verification codes delivered via WhatsApp.
Dispatch a dynamic OTP code to a valid Indian mobile number (starts with 6-9, 10 digits).
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/otp/send" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "9876543210",
"contact_info": "Acme Corp Login"
}'
Response (200 OK):
{
"success": true,
"message": "OTP sent successfully.",
"data": {
"expires_in": 300,
"otp_id": 45
}
}
Confirm valid match for a verification pin.
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/otp/verify" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "9876543210",
"otp_code": "123456"
}'
Response (200 OK):
{
"success": true,
"message": "OTP verified successfully."
}
Check verified and pending OTP logs.
Request Example:
curl -X GET "https://whatsapp.infybusiness.com/api/otp/logs" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
Response (200 OK):
{
"success": true,
"data": {
"current_page": 1,
"data": [
{
"id": 45,
"recipient_number": "919876543210",
"status": "verified",
"attempts": 1,
"created_at": "2026-07-11T11:00:00.000000Z"
}
],
"per_page": 25,
"total": 1
}
}
Campaigns Management
Run broadcasts and track large bulk WhatsApp flows.
Launch or schedule bulk WhatsApp marketing campaigns.
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/campaigns" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"name": "July Flash Sale",
"type": "template",
"category": "promotional",
"whatsapp_number_id": 2,
"recipients": ["919876543210", "919876543211"],
"template_name": "july_discount_template",
"template_language": "en_US",
"template_params": ["Alice", "15%"],
"scheduled_at": "2026-07-15 10:00:00"
}'
Response (201 Created):
{
"success": true,
"message": "Campaign created and queued for processing.",
"data": {
"id": 12,
"name": "July Flash Sale",
"type": "template",
"total_recipients": 2,
"status": "pending"
}
}
List all bulk campaigns.
Request Example:
curl -X GET "https://whatsapp.infybusiness.com/api/campaigns" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
Response (200 OK):
{
"success": true,
"data": {
"current_page": 1,
"data": [
{
"id": 12,
"name": "July Flash Sale",
"type": "template",
"category": "promotional",
"status": "pending",
"total_recipients": 2,
"sent_count": 0,
"delivered_count": 0,
"failed_count": 0,
"scheduled_at": "2026-07-15 10:00:00"
}
]
}
}
Retrieve real-time stats and metrics.
Request Example:
curl -X GET "https://whatsapp.infybusiness.com/api/campaigns/12" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
Response (200 OK):
{
"success": true,
"data": {
"id": 12,
"name": "July Flash Sale",
"type": "template",
"status": "processing",
"total_recipients": 2,
"sent_count": 1,
"delivered_count": 1,
"failed_count": 0,
"progress": "50%",
"started_at": "2026-07-11T12:00:00.000000Z",
"completed_at": null
}
}
Obtain granular subscriber list logs.
Request Example:
curl -X GET "https://whatsapp.infybusiness.com/api/campaigns/12/report" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
Response (200 OK):
{
"success": true,
"data": {
"campaign_id": 12,
"recipients": [
{
"phone": "919876543210",
"status": "delivered",
"error": null,
"updated_at": "2026-07-11T12:00:05.000000Z"
}
]
}
}
Pause active execution.
curl -X POST "https://whatsapp.infybusiness.com/api/campaigns/12/pause" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"message": "Campaign paused successfully."
}
Resume paused executions.
curl -X POST "https://whatsapp.infybusiness.com/api/campaigns/12/resume" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"message": "Campaign resumed successfully."
}
Cancel campaign from queue.
curl -X POST "https://whatsapp.infybusiness.com/api/campaigns/12/cancel" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"message": "Campaign cancelled successfully."
}
Re-queue failed contacts.
curl -X POST "https://whatsapp.infybusiness.com/api/campaigns/12/retry" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"message": "Campaign retry initiated."
}
Remove campaign records.
curl -X DELETE "https://whatsapp.infybusiness.com/api/campaigns/12" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"message": "Campaign deleted successfully."
}
Email Service
Deploy secure transactional notifications or promotional HTML campaigns.
Send single transactional HTML/text email.
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/email/messages/send" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"to": "customer@example.com",
"name": "Jane Customer",
"subject": "Order Confirmation",
"html": "Your Order is Confirmed!
",
"text": "Your Order is Confirmed!"
}'
Response (200 OK):
{
"success": true,
"message": "Email sent securely.",
"data": {
"message_id": 50,
"to": "customer@example.com",
"status": "sent"
}
}
Send promotional HTML/text email.
curl -X POST "https://whatsapp.infybusiness.com/api/email/messages/promotions/send" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"to": "customer@example.com",
"name": "Jane Customer",
"subject": "Summer Sale is Live!",
"html": "Save 50% Today!
",
"text": "Save 50% Today!"
}'
{
"success": true,
"message": "Promotional email sent securely.",
"data": {
"message_id": 51,
"to": "customer@example.com",
"status": "sent"
}
}
Query sent email logs.
curl -X GET "https://whatsapp.infybusiness.com/api/email/messages" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"data": {
"current_page": 1,
"data": [
{
"id": 50,
"recipient_email": "customer@example.com",
"subject": "Order Confirmation",
"status": "sent",
"created_at": "2026-07-11T11:00:00.000000Z"
}
]
}
}
Email Campaigns
Start or queue bulk email campaign broadcasts.
curl -X POST "https://whatsapp.infybusiness.com/api/email/campaigns" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"name": "Newsletter July",
"type": "html",
"subject": "July Highlights",
"recipients": [
{"email": "user1@example.com"},
{"email": "user2@example.com"}
],
"html_body": "Monthly Digest
",
"category": "promotional"
}'
{
"success": true,
"message": "Email campaign created and queued for processing.",
"data": {
"id": 14,
"name": "Newsletter July",
"type": "html",
"total_recipients": 2,
"status": "pending"
}
}
Additional Email Campaign Routes:
- GET `/email/campaigns`
- GET `/email/campaigns/{id}`
- GET `/email/campaigns/{id}/report`
- POST `/email/campaigns/{id}/pause`
- POST `/email/campaigns/{id}/resume`
- POST `/email/campaigns/{id}/cancel`
- POST `/email/campaigns/{id}/retry`
- DELETE `/email/campaigns/{id}`
Email Templates
Store reusable email layouts.
curl -X POST "https://whatsapp.infybusiness.com/api/email/templates" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"name": "Welcome Onboarding",
"subject": "Welcome aboard {{name}}!",
"html_body": "Happy onboarding!
",
"variables": ["name"],
"is_active": true
}'
{
"success": true,
"message": "Email template created.",
"data": {
"id": 8,
"name": "Welcome Onboarding",
"subject": "Welcome aboard {{name}}!"
}
}
Additional Template Routes:
- GET `/email/templates`
- GET `/email/templates/{id}`
- PUT `/email/templates/{id}`
- DELETE `/email/templates/{id}`
Unsubscribe Control
Exclude recipient from marketing templates.
curl -X POST "https://whatsapp.infybusiness.com/api/email/unsubscribe" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"email": "optout@example.com"
}'
{
"success": true,
"message": "Email unsubscribed successfully."
}
Additional Unsubscribe Routes:
- GET `/email/unsubscribes`
Wallet & Billing
Track pricing sheets, live statements, period metrics, and invoices.
Get current prepaid wallet balance and configuration rates.
curl -X GET "https://whatsapp.infybusiness.com/api/wallet/balance" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"data": {
"balance": 1500.00,
"currency": "INR",
"pricing": {
"per_message": 0.80,
"per_otp": 0.20,
"per_promo": 0.90
}
}
}
Get paginated credit/debit transaction statement logs.
curl -X GET "https://whatsapp.infybusiness.com/api/wallet/transactions" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"data": {
"current_page": 1,
"data": [
{
"id": 201,
"type": "debit",
"amount": 0.80,
"balance_before": 1500.80,
"balance_after": 1500.00,
"note": "WhatsApp message charge to 919876543210",
"created_at": "2026-07-11T11:00:00.000000Z"
}
]
}
}
Statement metrics grouped for the current month.
curl -X GET "https://whatsapp.infybusiness.com/api/wallet/usage" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"data": {
"period": "2026-07",
"total_charged": 150.00,
"total_credited": 1000.00,
"net": 850.00,
"current_balance": 1500.00
}
}
Current billing period count and details.
curl -X GET "https://whatsapp.infybusiness.com/api/billing/usage" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"data": {
"period": {
"from": "2026-07-01",
"to": "2026-07-11"
},
"messages": {
"total_sent": 180,
"delivered": 175,
"failed": 5,
"price_per_message": "₹0.80",
"total_bill": "₹140.00"
},
"otp": {
"total_sent": 50,
"delivered": 50,
"verified": 45,
"failed": 0,
"price_per_otp": "₹0.20",
"total_bill": "₹10.00"
},
"grand_total": "₹150.00"
}
}
List all generated statement invoices.
curl -X GET "https://whatsapp.infybusiness.com/api/billing/invoices" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"data": {
"current_page": 1,
"data": [
{
"id": 15,
"invoice_number": "INV-2026-001",
"amount": 150.00,
"status": "paid",
"created_at": "2026-07-01T00:00:00.000000Z"
}
]
}
}
Show full invoice detail statement.
curl -X GET "https://whatsapp.infybusiness.com/api/billing/invoices/15" \
-H "X-API-Key: dpk_sec_demo_key_abcdef123456"
{
"success": true,
"data": {
"id": 15,
"invoice_number": "INV-2026-001",
"amount": 150.00,
"status": "paid",
"period_start": "2026-06-01",
"period_end": "2026-06-30",
"created_at": "2026-07-01T00:00:00.000000Z"
}
}
Wallet Recharge
Endpoints for portal recharge transactions using payment gateways (Cashfree / Razorpay). Requires Client Session Bearer Tokens.
Initiate a top-up sequence and retrieve payment credentials.
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/client/wallet/topup" \
-H "Authorization: Bearer 2|clienttoken1234567890abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"amount": 1000.00,
"gateway": "cashfree"
}'
Response (200 OK):
{
"success": true,
"gateway": "cashfree",
"order_id": "order_client_1_abc123",
"payment_session_id": "session_def456abcdef1234567890",
"cf_order_id": "1234567",
"mode": "TEST",
"amount": 1000.00,
"currency": "INR"
}
Query payment gateway status server-to-server and update wallet balance.
Request Example:
curl -X POST "https://whatsapp.infybusiness.com/api/client/wallet/cashfree/verify" \
-H "Authorization: Bearer 2|clienttoken1234567890abcdef123456" \
-H "Content-Type: application/json" \
-d '{
"order_id": "order_client_1_abc123"
}'
Response (200 OK):
{
"success": true,
"message": "Payment verified and wallet credited.",
"balance": 2500.00
}
Gateway callback verification webhook (Public, signature-verified).
Simulation payload:
curl -X POST "https://whatsapp.infybusiness.com/api/wallet/cashfree/webhook" \
-H "Content-Type: application/json" \
-d '{
"order": {
"order_id": "order_client_1_abc123",
"order_amount": 1000.00
},
"payment": {
"payment_status": "SUCCESS"
}
}'
Response (200 OK):
{
"success": true
}
Billing Model
The platform follows a prepaid, usage-based consumption structure:
Prepaid Wallet
Funds are loaded into your wallet beforehand. Live balances can be queried any time via GET /api/wallet/balance.
Delivery-based Charging
WhatsApp Messages are only debited when Meta webhooks confirm they were successfully **delivered**. Failed messages are not charged. OTP triggers, however, are charged immediately upon transmission attempt.
Affordability Lock (HTTP 402)
If your wallet balance is insufficient to process a transactional message request, the API triggers a 402 Payment Required response containing current balances and costs:
{
"success": false,
"error": "Insufficient wallet balance. Please top up to continue.",
"data": {
"balance": 5.20,
"required": 150.00,
"credit_line": 100.00,
"available": 105.20
}
}
Credit Line & Alerts
Accounts can utilize a negative credit line buffer (up to ~100 messages' worth). Drops below your threshold (default ₹50) will fire low-balance emails.
Webhook Integrations
Register your callback endpoint on the Facebook Developer console to handle status events from Meta's API.
Handshake validation query from Meta. Internally checks verify token config.
Asynchronous event stream delivery updates (transitions status to sent, delivered, read, failed).