Professional API Reference for SMTP Authenticated Integration
This document explains the SMTP Provider APIs used for token authentication, domain setup, DNS verification, sender management, template management, mailing list creation, campaign management, and welcome email sending.
All protected endpoints require a Bearer token generated by the smtp-token-generate API. Most protected APIs also require user_id. The user_id must match the authenticated token user, otherwise the API returns a wrong user id error.
/v1/smtp-domain-add./v1/smtp-domain-view./v1/smtp-domain-verify./v1/smtp-domain-sender-add./v1/smtp-domain-sender-verify when needed./v1/smtp-mailing-add./v1/smtp-campaign-create./v1/smtp-campaign-store./v1/smtp-campaign-index.Public token endpoint:
Accept: application/jsonContent-Type: application/jsonProtected endpoints:
Accept: application/jsonContent-Type: application/jsonAuthorization: Bearer YOUR_TOKEN_HERE{
"status": true,
"message": "Token Created Successfully",
"token": "1|plain-text-token",
"user": {
"id": 123,
"name": "Demo User",
"email": "user@example.com"
}
}{
"success": true,
"data": {
"key": "value"
}
}{
"success": false,
"data": [
"The user id field is required."
]
}Method: POST
{
"email": "user@example.com",
"password": "secret-password"
}{
"status": true,
"message": "Token Created Successfully",
"token": "1|plain-text-token",
"user": {
"id": 123,
"name": "Demo User",
"email": "user@example.com"
}
}{
"status": false,
"message": "Invalid email or password"
}Method: POST
user_id: Required. Authenticated user id.domain_name: Required. Fully qualified domain name, for example example.com. Must be unique in DKIM records.{
"user_id": 123,
"domain_name": "example.com"
}{
"success": true,
"data": {
"success": true,
"domain": {
"id": 10,
"domain_name": "example.com",
"host": "smtp._domainkey.example.com",
"selector": "smtp",
"public_key": "v=DKIM1; h=sha256; k=rsa; p=..."
}
}
}Method: GET
Query Fields:
user_id: Required. Authenticated user id.Response Data Key: domains
Method: GET
Query Fields:
user_id: Required. Authenticated user id.domain_name: Required. Domain name to view.Response Data Keys:
Method: GET
Query Fields:
user_id: Required. Authenticated user id.domain_name: Required. Domain name to verify.{
"success": true,
"data": {
"success": true,
"message": "Verified Successfully"
}
}Method: GET
Query Fields:
user_id: Required. Authenticated user id.Response Data Key: sender_lists
Method: POST
user_id: Required. Authenticated user id.domain_name: Required. Existing domain name.from_email: Required. Sender email address. Must be unique for the domain.{
"user_id": 123,
"domain_name": "example.com",
"sender_name": "Demo Team",
"from_email": "news@example.com"
}Response Data Key: sender
Method: POST
user_id: Required. Authenticated user id.from_email: Required. Existing sender email address.Method: GET
Response Data Key: templates
Method: GET
Response Data Key: default_templates
Method: GET
Query Fields:
user_id: Required. Authenticated user id.template_id: Required. Existing template id.Response Data Key: templates
Method: POST
user_id: Required. Authenticated user id.{
"user_id": 123,
"name": "Welcome Template",
"html_body": "<h1>Welcome</h1>",
"active": true
}Response Data Key: template
Method: POST
user_id: Required. Authenticated user id.template_id: Required. Existing template id.Method: GET
Response Data Key: mailing_list
Method: POST
user_id: Required. Authenticated user id.{
"user_id": 123,
"name": "Newsletter Subscribers"
}Response Data Key: mailing
Method: GET
Response Data Key: campaigns
Method: GET
Response Data Keys:
Method: POST
user_id: Required. Authenticated user id.template_id: Required. Existing template id.all_request: Required. Object containing campaign content and delivery details.all_request Fields (send these keys inside the all_request object):
from_email: Required. From email.{
"user_id": 123,
"template_id": 456,
"mailing_list_id": 789,
"campaign_name": "May Newsletter",
"begins_at": "2026-05-06 18:00:00",
"segment": "all",
"all_request": {
"subject": "Hello from SMTPProvider",
"html_body": "<h1>Hello</h1>",
"text_body": "Hello",
"from_email": "news@example.com",
"from_name": "Demo Team",
"reply_email": "support@example.com",
"sender_email": "news@example.com",
"speed": 1000,
"vmta_id": 1,
"bounce_email_id": 1,
"url_domain_id": 1
}
}Response Data Key: campaign
Method: POST
user_id: Required. Authenticated user id.campaign_id: Required. Campaign id.Response Data Key: campaign
Method: GET
Query Fields:
user_id: Required. Authenticated user id.campaign_id: Required. Campaign id.Response Data Keys: campaign, senderDetails, templates, url_domains, vmtas, bounce_email_id, speed
Method: POST
user_id: Required. Authenticated user id.campaign_id: Required. Campaign id.all_request: Required. Same content and delivery keys used by smtp-campaign-store. begins_at is not required for update.{
"user_id": 123,
"campaign_id": 456,
"campaign_name": "May Newsletter Updated",
"all_request": {
"subject": "Updated Subject",
"html_body": "<h1>Updated HTML</h1>",
"text_body": "Updated plain text",
"from_email": "news@example.com",
"from_name": "Demo Team",
"reply_email": "support@example.com",
"sender_email": "news@example.com",
"speed": 1000,
"vmta_id": 1,
"bounce_email_id": 1,
"url_domain_id": 1
}
}{
"success": true,
"data": {
"campaigns": "update sucessfully"
}
}Method: POST
from_email: Required. Recipient email address.shop_name: Required. Shop name used by the default welcome mail.html_content is used.html_content: Required when subject is provided. Custom HTML email body.{
"from_email": "owner@example.com",
"shop_name": "Demo Store"
}{
"from_email": "owner@example.com",
"shop_name": "Demo Store",
"subject": "Welcome to SMTPProvider",
"html_content": "<h1>Welcome</h1>"
}| Method | Endpoint | Purpose |
|---|---|---|
| POST | /api/smtp-token-generate | Generate API token |
| POST | /api/v1/smtp-domain-add | Add SMTP sending domain |
| GET | /api/v1/smtp-domain-list | List SMTP sending domains |
| GET | /api/v1/smtp-domain-view | View SMTP domain DNS records |
| GET | /api/v1/smtp-domain-verify | Verify SMTP domain DNS records |
| GET | /api/v1/smtp-sender-list | List SMTP senders |
| POST | /api/v1/smtp-domain-sender-add | Add SMTP sender |
| POST | /api/v1/smtp-domain-sender-verify | Send sender verification email |
| GET | /api/v1/smtp-template-index | List user templates |
| GET | /api/v1/smtp-template-default | List default templates |
| GET | /api/v1/smtp-template-show | Show template |
| POST | /api/v1/smtp-template-add | Add template |
| POST | /api/v1/smtp-template-update | Update template |
| GET | /api/v1/smtp-mailing-list | List mailing lists |
| POST | /api/v1/smtp-mailing-add | Add mailing list |
| GET | /api/v1/smtp-campaign-index | List campaigns |
| GET | /api/v1/smtp-campaign-create | Get campaign create data |
| POST | /api/v1/smtp-campaign-store | Create campaign |
| POST | /api/v1/smtp-campaign-pause | Pause or resume campaign |
| GET | /api/v1/smtp-campaign-edit | Get campaign edit data |
| POST | /api/v1/smtp-campaign-update | Update campaign |
| POST | /api/v1/smtp-welcome-mail | Send welcome mail |
Authorization header.user_id in protected endpoints.Copyright © 2026 All Rights Reserved