API Documentation
Compact reference for the current SMSPORT builder and drip endpoints.
Login
Authenticates a workspace user and returns the SmsPort session tokens.
/auth/loginPublic endpointParameters
| Parameter | Details |
|---|---|
emailrequired | Workspace login email |
passwordrequired | Workspace password |
Example JSON Response
{
"accessToken": "token",
"refreshToken": "refresh-token",
"tokenType": "Bearer",
"expiresIn": 900
}Example Request
curl -X POST /auth/login \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "owner@smsport.local",
"password": "password123"
}'Refresh Session
Refreshes an expired access token using a valid refresh token.
/auth/refreshPublic endpointExample Request
curl -X POST /auth/refresh \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"refreshToken": "refresh-token"
}'Get Current User
Returns the authenticated user and tenant context.
/auth/meBearer token requiredExample Request
curl -X GET /auth/me \
-H "Authorization: Bearer YOUR_TOKEN"List Drip Campaigns
Returns compact campaign rows for the drip workspace list.
/dripsBearer token requiredExample JSON Response
{
"campaigns": [
{
"id": "campaign-1",
"name": "Welcome Drip",
"status": "published",
"latestVersionNumber": 2,
"activeEnrollments": 24,
"pausedEnrollments": 2,
"totalEnrollments": 48
}
]
}Example Request
curl -X GET /drips \
-H "Authorization: Bearer YOUR_TOKEN"Create Drip Campaign
Creates a campaign shell with audience, trigger, and stop rules.
/dripsBearer token requiredParameters
| Parameter | Details |
|---|---|
namerequired | Unique drip campaign name |
audienceSourcerequired | tenant_contacts or contact_list |
triggerTyperequired | api_trigger, keyword_trigger, tag_trigger, or webhook_trigger |
Example JSON Response
{
"campaign": {
"id": "campaign-1",
"name": "Welcome Drip",
"status": "draft"
},
"versions": []
}Example Request
curl -X POST /drips \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Welcome Drip",
"audienceSource": "tenant_contacts",
"triggerType": "api_trigger",
"triggerValue": "order_shipped",
"exitConditions": [
{ "type": "keyword", "value": "STOP" }
]
}'Create Draft Version
Creates a version payload from ordered steps and edges.
/drips/:campaignId/versionsBearer token requiredParameters
| Parameter | Details |
|---|---|
campaignIdrequired | UUID of the drip campaign |
Example Request
curl -X POST /drips/:campaignId/versions \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"nodes": [
{
"nodeKey": "wait_start",
"type": "wait",
"title": "Wait",
"config": { "mode": "relative", "durationMinutes": 60 }
}
],
"edges": []
}'Check Version Readiness
Returns publish validation and readiness state for a draft version.
/drips/:campaignId/versions/:versionId/readinessBearer token requiredParameters
| Parameter | Details |
|---|---|
campaignIdrequired | Drip campaign UUID |
versionIdrequired | Draft version UUID |
Example JSON Response
{
"ready": true,
"errors": [],
"warnings": []
}Example Request
curl -X GET /drips/:campaignId/versions/:versionId/readiness \
-H "Authorization: Bearer YOUR_TOKEN"Publish Version
Publishes an immutable version for live enrollments.
/drips/:campaignId/versions/:versionId/publishBearer token requiredParameters
| Parameter | Details |
|---|---|
campaignIdrequired | Drip campaign UUID |
versionIdrequired | Draft version UUID |
Example Request
curl -X POST /drips/:campaignId/versions/:versionId/publish \
-H "Authorization: Bearer YOUR_TOKEN"Start Drip Enrollment
Enrolls a contact into the published drip version.
/v1/drips/startBearer token requiredParameters
| Parameter | Details |
|---|---|
campaignIdrequired | Published drip campaign UUID |
contactIdrequired | Tenant contact UUID |
contextoptional | Optional values available to template interpolation |
Example Request
curl -X POST /v1/drips/start \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"campaignId": "campaign-1",
"contactId": "contact-1",
"context": {
"orderId": "ORD-1001",
"displayName": "Asha"
}
}'List Campaign Enrollments
Returns enrollment rows for the selected drip campaign.
/v1/drips/:campaignId/enrollmentsBearer token requiredParameters
| Parameter | Details |
|---|---|
campaignIdrequired | Drip campaign UUID |
Example Request
curl -X GET /v1/drips/:campaignId/enrollments \
-H "Authorization: Bearer YOUR_TOKEN"Get Drip Report
Returns backend-owned summary, delivery, exit, step, and recent activity metrics.
/v1/drips/:campaignId/reportBearer token requiredParameters
| Parameter | Details |
|---|---|
campaignIdrequired | Drip campaign UUID |
Example JSON Response
{
"campaign": {
"id": "campaign-1",
"name": "Welcome Drip",
"status": "published",
"versionNumber": 2
},
"summary": {
"totalEnrolled": 42,
"active": 12,
"paused": 3,
"completed": 20,
"exited": 7
}
}Example Request
curl -X GET /v1/drips/:campaignId/report \
-H "Authorization: Bearer YOUR_TOKEN"Record Lifecycle Event
Records normalized lifecycle events such as delivery, unsubscribe, or conversion.
/v1/drips/eventsBearer token requiredExample Request
curl -X POST /v1/drips/events \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"contactId": "contact-1",
"eventType": "conversion_success",
"source": "webhook",
"payload": {
"outboundMessageId": "message-1"
}
}'Create Global Opt-Out
Globally blocks future drip sends for a contact.
/v1/drips/opt-outsBearer token requiredExample Request
curl -X POST /v1/drips/opt-outs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"contactId": "contact-1",
"channel": "all",
"reason": "unsubscribe_requested"
}'Pause Enrollment
Applies an operator pause to a specific enrollment.
/v1/drips/enrollments/:enrollmentId/pauseBearer token requiredParameters
| Parameter | Details |
|---|---|
enrollmentIdrequired | Enrollment UUID |
Example Request
curl -X POST /v1/drips/enrollments/:enrollmentId/pause \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"durationHours": 24,
"reason": "manual_review"
}'Terminate Enrollment
Stops a running enrollment before its natural exit.
/v1/drips/enrollments/:enrollmentId/terminateBearer token requiredParameters
| Parameter | Details |
|---|---|
enrollmentIdrequired | Enrollment UUID |
Example Request
curl -X POST /v1/drips/enrollments/:enrollmentId/terminate \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"reason": "manual_terminate"
}'List Saved Link Generator Links
Returns tenant-scoped saved WhatsApp links for the Link & QR Generator workspace.
/link-generator/linksBearer token requiredExample JSON Response
{
"links": [
{
"id": "link-1",
"senderDisplayPhoneNumber": "+91 99999 99999",
"contactListName": "Leads April",
"label": "Clinic front desk",
"message": "Hello from SMSPORT",
"linkUrl": "https://wa.me/919999999999?text=Hello%20from%20SMSPORT",
"createdAt": "2026-04-23T10:24:00.000Z"
}
]
}Example Request
curl -X GET /link-generator/links \
-H "Authorization: Bearer YOUR_TOKEN"Create Saved Link Generator Link
Creates and stores a tenant-scoped WhatsApp click-to-chat link.
/link-generator/linksBearer token requiredExample Request
curl -X POST /link-generator/links \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"senderPhoneNumberId": "sender-1",
"contactListId": "list-1",
"label": "Clinic front desk",
"message": "Hello from SMSPORT"
}'Delete Saved Link Generator Link
Deletes one saved link from the Link & QR Generator workspace.
/link-generator/links/:linkIdBearer token requiredParameters
| Parameter | Details |
|---|---|
linkIdrequired | Saved link UUID |
Example Request
curl -X DELETE /link-generator/links/:linkId \
-H "Authorization: Bearer YOUR_TOKEN"Get Contact Lists
Returns contact lists used by drip audience selection.
/contacts/listsBearer token requiredExample Request
curl -X GET /contacts/lists \
-H "Authorization: Bearer YOUR_TOKEN"List Contacts
Returns paginated contacts, optionally scoped to a selected contact list.
/contactsBearer token requiredExample Request
curl -X GET /contacts \
-H "Authorization: Bearer YOUR_TOKEN"Create Contact
Creates a single tenant contact record.
/contactsBearer token requiredExample Request
curl -X POST /contacts \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Asha",
"phoneE164": "+911111111111",
"listIds": ["list-1"]
}'Start Contact Import
Starts a CSV-based contact import job into an optional list.
/contacts/importBearer token requiredExample Request
curl -X POST /contacts/import \
-H "Authorization: Bearer YOUR_TOKEN"Fetch Templates
Returns synced template records for the drip send step.
/templatesBearer token requiredExample Request
curl -X GET /templates \
-H "Authorization: Bearer YOUR_TOKEN"Campaign Overview
Returns campaign metrics, readiness, delivery mix, and recent operational activity.
/campaigns/overviewBearer token requiredExample Request
curl -X GET /campaigns/overview \
-H "Authorization: Bearer YOUR_TOKEN"Campaign Builder Snapshot
Returns the compact campaign builder state, pickers, draft, and recent runs.
/campaigns/builderBearer token requiredExample Request
curl -X GET /campaigns/builder \
-H "Authorization: Bearer YOUR_TOKEN"Save Campaign Draft
Creates or updates the current outbound campaign draft.
/campaigns/draftBearer token requiredExample Request
curl -X POST /campaigns/draft \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Festival Promo",
"deliveryKind": "template",
"templateId": "template-1",
"senderPhoneNumberId": "sender-1",
"audienceSource": "contact_list",
"audienceListId": "list-1"
}'Launch Campaign Draft
Launches the saved campaign draft into a live run.
/campaigns/draft/launchBearer token requiredExample Request
curl -X POST /campaigns/draft/launch \
-H "Authorization: Bearer YOUR_TOKEN"Get Campaign Run Analytics
Returns delivery funnel, timing, audience, and engagement analytics for one run.
/campaigns/runs/:runId/analyticsBearer token requiredParameters
| Parameter | Details |
|---|---|
runIdrequired | Campaign run identifier |
Example Request
curl -X GET /campaigns/runs/:runId/analytics \
-H "Authorization: Bearer YOUR_TOKEN"List Inbox Conversations
Returns inbox conversation rows for the live-chat workspace.
/inbox/conversationsBearer token requiredExample Request
curl -X GET /inbox/conversations \
-H "Authorization: Bearer YOUR_TOKEN"Get Conversation Thread
Returns the selected conversation thread and messages.
/inbox/conversations/:conversationIdBearer token requiredParameters
| Parameter | Details |
|---|---|
conversationIdrequired | Conversation identifier |
Example Request
curl -X GET /inbox/conversations/:conversationId \
-H "Authorization: Bearer YOUR_TOKEN"Reply To Conversation
Sends a manual reply into an active conversation thread.
/inbox/conversations/:conversationId/replyBearer token requiredParameters
| Parameter | Details |
|---|---|
conversationIdrequired | Conversation identifier |
Example Request
curl -X POST /inbox/conversations/:conversationId/reply \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, how can we help?",
"replyToMessageId": "message-1"
}'List Canned Replies
Returns saved canned replies for fast live-chat responses.
/inbox/canned-repliesBearer token requiredExample Request
curl -X GET /inbox/canned-replies \
-H "Authorization: Bearer YOUR_TOKEN"Create Live Chat Stream Session
Creates a stream session for the real-time live-chat experience.
/inbox/live-chat/stream-sessionBearer token requiredExample Request
curl -X POST /inbox/live-chat/stream-session \
-H "Authorization: Bearer YOUR_TOKEN"Webhook Operations Summary
Returns unresolved, failed, and replay-eligible webhook counts.
/webhooks/ops/summaryBearer token requiredExample Request
curl -X GET /webhooks/ops/summary \
-H "Authorization: Bearer YOUR_TOKEN"List Webhook Events
Returns recent webhook event rows for operational review.
/webhooks/ops/eventsBearer token requiredExample Request
curl -X GET /webhooks/ops/events \
-H "Authorization: Bearer YOUR_TOKEN"Replay Webhook Event
Replays one webhook event when it is still replay-eligible.
/webhooks/ops/events/:id/replayBearer token requiredParameters
| Parameter | Details |
|---|---|
idrequired | Webhook event identifier |
Example Request
curl -X POST /webhooks/ops/events/:id/replay \
-H "Authorization: Bearer YOUR_TOKEN"List Team Members
Returns current tenant members for operator assignment flows.
/team/membersBearer token requiredExample Request
curl -X GET /team/members \
-H "Authorization: Bearer YOUR_TOKEN"List Team Invites
Returns outstanding team invitations.
/team/invitesBearer token requiredExample Request
curl -X GET /team/invites \
-H "Authorization: Bearer YOUR_TOKEN"Invite Team Member
Invites a new member into the tenant workspace.
/team/invitationsBearer token requiredExample Request
curl -X POST /team/invitations \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "agent@smsport.local",
"role": "agent",
"fullName": "Support Agent"
}'Get Sender Phone Numbers
Returns connected sender numbers for sender selection in the drip builder.
/whatsapp/phone-numbersBearer token requiredExample Request
curl -X GET /whatsapp/phone-numbers \
-H "Authorization: Bearer YOUR_TOKEN"WhatsApp Logs
Fetch WhatsApp logs of the last 3 days using this API.
/api/v1/whatsapp-logsPublic endpointParameters
| Parameter | Details |
|---|---|
fromrequired | Provide from date in format YYYY-MM-DD |
torequired | Provide to date in format YYYY-MM-DD |
Example JSON Response
{
"success": true,
"message": "Whatsapp Logs generated successfully.",
"data": [
{
"type": "status_update",
"request_id": "NlOPxxxxxxxxxxxx",
"phone_number_id": "155xxxxxxxxxx",
"recipient_id": "916xxxxxxxxx",
"status": "delivered",
"timestamp": "1763717022",
"errors": null
}
]
}Example Request
curl -X GET /api/v1/whatsapp-logs \
-H "Authorization: Bearer YOUR_TOKEN"WhatsApp Logs Summary
Get WhatsApp logs summary for a 30-day interval.
/api/v1/whatsapp-summaryPublic endpointParameters
| Parameter | Details |
|---|---|
fromrequired | Provide from date in format YYYY-MM-DD |
torequired | Provide to date in format YYYY-MM-DD |
Example JSON Response
{
"success": true,
"message": "WhatsApp Summary fetched successfully.",
"data": {
"sent": 10,
"accepted": 16,
"delivered": 97,
"read": 5,
"failed": 3,
"rejected": 0,
"pending": 8
}
}Example Request
curl -X GET /api/v1/whatsapp-summary \
-H "Authorization: Bearer YOUR_TOKEN"Send Session Message (Simple)
Send a text or media message. You can send text, image, document, audio, video, location, sticker, or reaction messages.
/api/v1/whatsapp-sessionPublic endpointParameters
| Parameter | Details |
|---|---|
phone_number_idrequired | The ID of the phone number sending the message |
torequired | Recipient Mobile Number (with country code) |
Example JSON Response
{
"status": "success"
}Example Request
curl -X POST /api/v1/whatsapp-session \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "text",
"text": "Hello World"
}'Verify API Connection (Ping)
Health Check Connection API. Used by third parties to verify their API Key validity before executing other public APIs.
/api/v1/pingAPI Key RequiredExample JSON Response
{
"success": true,
"message": "Connection successful",
"environment": "live",
"tenantId": "c61b0c95-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}Example Request
curl -X GET /api/v1/ping \
-H "Authorization: Bearer YOUR_TOKEN"