NextMail Email Marketing Feature Set

Welcome to the API documentation for NextMail. This guide provides an easy-to-understand explanation of various API methods, their purposes, required inputs, outputs, and example use cases. Use this guide to integrate our API into your applications effortlessly.

pic

NextMail API Documentation Overview

This comprehensive API documentation covers the following functional areas:

  • Campaign Management
  • Contact Management
  • Mailing Management
  • List Management
  • Reporting
  • Segment Management
  • Template Management

How to Use This Documentation

  • Authentication: All API endpoints require an API key parameter. Include your unique API key with each request.
  • Interactive Interface: Each section is expandable - click on a category to see detailed endpoint information including:
    • Full endpoint URL
    • Required parameters
    • Example requests and responses
    • Expected output format
  • Request Format: The documentation provides clear examples of:
    • URL parameters for GET requests
    • JSON body structure for POST/PUT requests
    • Expected response formats
    • Required and optional fields
  • Common Patterns: The API consistently uses:
    • GET for retrieving data
    • POST for creating new resources
    • PUT for updating existing resources
    • DELETE for removing resources
    • Pagination support for listing endpoints with NextPageToken/PreviousPageToken parameters

This API is designed to be RESTful and straightforward to integrate, with consistent patterns across all endpoints. Each section provides complete examples that can be used as templates for your own implementations. The documentation is structured to help both beginners and experienced developers quickly find the information they need to successfully integrate the API into their applications.

Campaign Management

Endpoint: /api/assigncampaign/GetAllCampaigns

Method: GET

Purpose: Retrieve a list of all campaigns available on the first page.

Inputs: ApiKey (string): Your unique API key for authentication.

Outputs:

  • List of campaigns.
  • Campaign details such as name, status, and description.

Example: GET /api/assigncampaign/GetAllCampaigns?ApiKey=YOUR_API_KEY

Response:

[
  {
    "CampaignId": 123,
    "Name": "Winter Sale",
    "Status": "Active"
  },
  {
    "CampaignId": 124,
    "Name": "Spring Clearance",
    "Status": "Paused"
  }
]
    

Endpoint: /api/assigncampaign/GetNextAllCampaigns

Method: GET

Purpose: Retrieve the next page of campaigns.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • NextPageToken (string): Token to identify the next page.

Outputs: List of campaigns for the next page.

Example: GET /api/assigncampaign/GetNextAllCampaigns?ApiKey=YOUR_API_KEY&NextPageToken=ABC123

Response:

[
  {
    "CampaignId": 125,
    "Name": "Fall Sale",
    "Status": "Active"
  }
]
    

Endpoint: /api/assigncampaign/GetPreviousAllCampaigns

Method: GET

Purpose: Retrieve the previous page of campaigns.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • PreviousPageToken (string): Token to identify the previous page.

Outputs: List of campaigns for the previous page.

Example: GET /api/assigncampaign/GetPreviousAllCampaigns?ApiKey=YOUR_API_KEY&PreviousPageToken=XYZ789

Response:

[
  {
    "CampaignId": 122,
    "Name": "Summer Clearance",
    "Status": "Paused"
  }
]
    

Endpoint: /api/assigncampaign/GetCampaignByCampaignID

Method: GET

Purpose: Retrieve details of a specific campaign by its ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • CampaignID (int): The ID of the campaign to retrieve.

Outputs:

  • Details of the requested campaign.

Example:

GET /api/assigncampaign/GetCampaignByCampaignID?ApiKey=YOUR_API_KEY&CampaignID=123

Response:

{
  "CampaignId": 123,
  "Name": "Winter Sale",
  "Status": "Active"
}
    

Endpoint: /api/assigncampaign/DeleteCampaign

Method: DELETE

Purpose: Delete a campaign by its ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • CampaignID (int): The ID of the campaign to delete.

Outputs:

  • Confirmation of the campaign deletion.

Example: DELETE /api/assigncampaign/DeleteCampaign?ApiKey=YOUR_API_KEY&CampaignID=123

Response:

{
  "Success": true,
  "Message": "Campaign deleted successfully."
}
    

Endpoint: /api/jobboard/unsub

Method: POST

Purpose: Unsubscribe a user from job board updates.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • Email (string): The email address of the user to unsubscribe.

Outputs:

  • Confirmation of the unsubscribe request.

Example: POST /api/jobboard/unsub Content-Type: application/json { "ApiKey": "YOUR_API_KEY", "Email": "user@example.com" }

Response:

{
  "Success": true,
  "Message": "User unsubscribed successfully."
}
    

Endpoint: /api/mailing/send4v

Method: POST

Purpose: Send a mailing with version 4 parameters.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • MailingDetails (JSON object):
    • Subject (string): The subject line of the email.
    • Body (string): The HTML content of the email.
    • Recipients (array): List of recipient email addresses.

Outputs:

  • Confirmation of the mailing being sent.

Example:

POST /api/mailing/send4v
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "MailingDetails": {
    "Subject": "New Updates",
    "Body": "

Hello, check out our new updates!

", "Recipients": ["user1@example.com", "user2@example.com"] } }

Response:

{
  "Success": true,
  "Message": "Mailing sent successfully."
}
    

Contact Management

Endpoint: /api/contact/GetNextContacts

Method: GET

Purpose: Retrieve the next page of contacts.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • NextPageToken (string): Token to identify the next page.

Outputs:

  • List of contacts for the next page.

Example: GET /api/contact/GetNextContacts?ApiKey=YOUR_API_KEY&NextPageToken=ABC123

Response:

[
  {
    "ContactId": 458,
    "Name": "Alice Brown",
    "Email": "alice.brown@example.com"
  }
]
    

Endpoint: /api/contact/GetPrevContacts

Method: GET

Purpose: Retrieve the previous page of contacts.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • PrevPageToken (string): Token to identify the previous page.

Outputs:

  • List of contacts for the previous page.

Example: GET /api/contact/GetPrevContacts?ApiKey=YOUR_API_KEY&PrevPageToken=XYZ789

Response:

[
  {
    "ContactId": 455,
    "Name": "Bob White",
    "Email": "bob.white@example.com"
  }
]
    

Endpoint: /api/contact/GetContact

Method: GET

Purpose: Retrieve details of a specific contact by ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ContactId (int): The ID of the contact to retrieve.

Outputs:

  • Details of the requested contact.

Example: GET /api/contact/GetContact?ApiKey=YOUR_API_KEY&ContactId=456

Response:

{
  "ContactId": 456,
  "Name": "John Doe",
  "Email": "john.doe@example.com"
}
    

Endpoint: /api/contact/GetContactDetails

Method: GET

Purpose: Retrieve detailed information about a contact by ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ContactId (int): The ID of the contact to retrieve details for.

Outputs:

  • Full details of the requested contact, including custom fields and activity.

Example: GET /api/contact/GetContactDetails?ApiKey=YOUR_API_KEY&ContactId=456

Response:

{
  "ContactId": 456,
  "Name": "John Doe",
  "Email": "john.doe@example.com",
  "CustomFields": {
    "Subscription": "Premium",
    "JoinDate": "2023-01-01"
  }
}
    

Endpoint: /api/contact/AddSingleContact

Method: POST

Purpose: Add a single contact to the system.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ContactDetails (JSON object):
    • Name (string): Name of the contact.
    • Email (string): Email address of the contact.
    • Phone (string, optional): Phone number of the contact.

Outputs:

  • Confirmation of the contact addition, including its unique ID.

Example:

POST /api/contact/AddSingleContact Content-Type: application/json { "ApiKey": "YOUR_API_KEY", "ContactDetails": { "Name": "Jane Smith", "Email": "jane.smith@example.com" } }

Response:

{
  "Success": true,
  "ContactId": 457
}
    

Endpoint: /api/contact/AddRecipientByAllFields

Method: POST

Purpose: Add a recipient with detailed field specifications.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • RecipientDetails (JSON object):
    • Name (string): Recipient name.
    • Email (string): Recipient email address.
    • CustomFields (object, optional): Custom fields for the recipient.

Outputs:

  • Confirmation of the recipient addition.

Example:

POST /api/contact/AddRecipientByAllFields Content-Type: application/json { "ApiKey": "YOUR_API_KEY", "RecipientDetails": { "Name": "Mark Johnson", "Email": "mark.johnson@example.com", "CustomFields": { "Subscription": "Premium" } } }

Response:

{
  "Success": true,
  "RecipientId": 789
}
    

Endpoint: /api/contact/AddCustomFieldsToContact

Method: POST

Purpose: Add custom fields to an existing contact.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ContactId (int): ID of the contact.
  • CustomFields (JSON object): Key-value pairs of custom fields to add.

Outputs:

  • Confirmation of the custom fields addition.

Example:

POST /api/contact/AddCustomFieldsToContact Content-Type: application/json { "ApiKey": "YOUR_API_KEY", "ContactId": 457, "CustomFields": { "Subscription": "Gold", "LastPurchaseDate": "2023-10-01" } }

Response:

{
  "Success": true,
  "Message": "Custom fields added successfully."
}
    

Endpoint: /api/contact/EditContactByAllFields

Method: PUT

Purpose: Update all fields of an existing contact.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ContactDetails (JSON object):
    • ContactId (int): ID of the contact to update.
    • Name (string): Updated name of the contact.
    • Email (string): Updated email address of the contact.
    • Phone (string, optional): Updated phone number of the contact.

Outputs:

  • Confirmation of the contact update.

Example:

PUT /api/contact/EditContactByAllFields Content-Type: application/json { "ApiKey": "YOUR_API_KEY", "ContactDetails": { "ContactId": 457, "Name": "Updated Jane Smith", "Email": "updated.jane.smith@example.com", "Phone": "123-456-7890" } }

Response:

{
  "Success": true,
  "Message": "Contact updated successfully."
}
    

Endpoint: /api/recipient/EditRecipientByAllFields

Method: PUT

Purpose: Update all fields of an existing recipient.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • RecipientDetails (JSON object):
    • RecipientId (int): ID of the recipient to update.
    • Name (string): Updated name of the recipient.
    • Email (string): Updated email address of the recipient.
    • CustomFields (object, optional): Updated custom fields for the recipient.

Outputs:

  • Confirmation of the recipient update.

Example:

PUT /api/recipient/EditRecipientByAllFields
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "RecipientDetails": {
    "RecipientId": 789,
    "Name": "Updated Mark Johnson",
    "Email": "updated.mark.johnson@example.com",
    "CustomFields": {
      "Subscription": "Platinum"
    }
  }
}
    

Response:

{
  "Success": true,
  "Message": "Recipient updated successfully."
}
    

Endpoint: /api/contact/EditContactWithCustomFieldsByEmail

Method: PUT

Purpose: Update a contact's custom fields using their email address.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • Email (string): Email address of the contact to update.
  • CustomFields (JSON object): Key-value pairs of custom fields to update.

Outputs:

  • Confirmation of the custom fields update.

Example:

PUT /api/contact/EditContactWithCustomFieldsByEmail
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "Email": "jane.smith@example.com",
  "CustomFields": {
    "Subscription": "Gold",
    "LastLogin": "2023-10-10"
  }
}
    

Response:

{
  "Success": true,
  "Message": "Custom fields updated successfully."
}
    

Endpoint: /api/contact/EditContactWithCustomFieldsByContactId

Method: PUT

Purpose: Update a contact's custom fields using their contact ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ContactId (int): ID of the contact to update.
  • CustomFields (JSON object): Key-value pairs of custom fields to update.

Outputs:

  • Confirmation of the custom fields update.

Example:

PUT /api/contact/EditContactWithCustomFieldsByContactId
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "ContactId": 457,
  "CustomFields": {
    "LastPurchaseDate": "2023-11-01"
  }
}
    

Response:

{
  "Success": true,
  "Message": "Custom fields updated successfully."
}
    

Endpoint: /api/contact/DeleteContact

Method: DELETE

Purpose: Delete a contact by ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ContactId (int): ID of the contact to delete.

Outputs:

  • Confirmation of the contact deletion.

Example:

DELETE /api/contact/DeleteContact?ApiKey=YOUR_API_KEY&ContactId=456
    

Response:

{
  "Success": true,
  "Message": "Contact deleted successfully."
}
    

Endpoint: /api/list/GetAllSubscribersFromList

Method: GET

Purpose: Retrieve all subscribers from a specific list.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ListId (int): ID of the list to retrieve subscribers from.

Outputs:

  • List of subscribers, including their details.

Example:

GET /api/list/GetAllSubscribersFromList?ApiKey=YOUR_API_KEY&ListId=123
    

Response:

[
  {
    "SubscriberId": 1,
    "Name": "John Doe",
    "Email": "john.doe@example.com"
  },
  {
    "SubscriberId": 2,
    "Name": "Jane Smith",
    "Email": "jane.smith@example.com"
  }
]
    

Endpoint: /api/subscriber/UnsubscribeContactByContactId

Method: POST

Purpose: Unsubscribe a contact using their Contact ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ContactId (int): ID of the contact to unsubscribe.

Outputs:

  • Confirmation of the contact being unsubscribed.

Example:

POST /api/subscriber/UnsubscribeContactByContactId
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "ContactId": 12345
}
    

Response:

{
  "Success": true,
  "Message": "Contact unsubscribed successfully."
}
    

Endpoint: /api/subscriber/UnsubscribeContactByEmailAddress

Method: POST

Purpose: Unsubscribe a contact using their email address.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • EmailAddress (string): Email address of the contact to unsubscribe.

Outputs:

  • Confirmation of the contact being unsubscribed.

Example:

POST /api/subscriber/UnsubscribeContactByEmailAddress
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "EmailAddress": "user@example.com"
}
    

Response:

{
  "Success": true,
  "Message": "Contact unsubscribed successfully."
}
    

Endpoint: /api/job/GetStatusByApiJobId

Method: GET

Purpose: Retrieve the status of a job using its API job ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ApiJobId (string): The ID of the job to check the status for.

Outputs:

  • Status of the requested job.

Example:

GET /api/job/GetStatusByApiJobId?ApiKey=YOUR_API_KEY&ApiJobId=ABC123
    

Response:

{
  "JobId": "ABC123",
  "Status": "Completed",
  "Processed": 100,
  "Failed": 0
}
    

Endpoint: /api/contact/AddCustomFieldsToContact

Method: POST

Purpose: Add custom fields to an existing contact.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ContactId (int): ID of the contact.
  • CustomFields (JSON object): Key-value pairs of custom fields to add.

Outputs:

  • Confirmation of the custom fields addition.

Example:

POST /api/contact/AddCustomFieldsToContact Content-Type: application/json { "ApiKey": "YOUR_API_KEY", "ContactId": 457, "CustomFields": { "Subscription": "Gold", "LastPurchaseDate": "2023-10-01" } }

Response:

{
  "Success": true,
  "Message": "Custom fields added successfully."
}
    

List Management

Endpoint: /api/list/GetAllLists

Method: GET

Purpose: Retrieve all available lists.

Inputs:

  • ApiKey (string): Your unique API key for authentication.

Outputs:

  • List of all available lists.

Example:

GET /api/list/GetAllLists?ApiKey=YOUR_API_KEY
    

Response:

[
  {
    "ListId": 1,
    "Name": "Newsletter Subscribers"
  },
  {
    "ListId": 2,
    "Name": "Event Attendees"
  }
]
    

Endpoint: /api/list/GetNextLists

Method: GET

Purpose: Retrieve the next page of lists.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • NextPageToken (string): Token for the next page.

Outputs:

  • List of lists on the next page.

Example:

GET /api/list/GetNextLists?ApiKey=YOUR_API_KEY&NextPageToken=ABC123
    

Response:

[
  {
    "ListId": 3,
    "Name": "New Campaign Subscribers"
  }
]
    

Endpoint: /api/list/GetPreviousLists

Method: GET

Purpose: Retrieve the previous page of lists.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • PrevPageToken (string): Token for the previous page.

Outputs:

  • List of lists on the previous page.

Example:

GET /api/list/GetPreviousLists?ApiKey=YOUR_API_KEY&PrevPageToken=XYZ789
    

Response:

[
  {
    "ListId": 1,
    "Name": "Newsletter Subscribers"
  }
]
    

Endpoint: /api/list/GetListByListId

Method: GET

Purpose: Retrieve details of a specific list by its ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ListId (int): ID of the list to retrieve.

Outputs:

  • Details of the requested list.

Example:

GET /api/list/GetListByListId?ApiKey=YOUR_API_KEY&ListId=123
    

Response:

{
  "ListId": 123,
  "Name": "Newsletter Subscribers",
  "Description": "Subscribers to the monthly newsletter."
}
    

Endpoint: /api/list/AddList

Method: POST

Purpose: Create a new list.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • ListName (string): Name of the new list.

Outputs:

  • Confirmation of the new list creation.

Example:

POST /api/list/AddList
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "ListName": "Special Offers Subscribers"
}
    

Response:

{
  "Success": true,
  "ListId": 4
}
    

Mailing Management

Endpoint: /api/mailing/GetAllMailings

Method: GET

Purpose: Retrieve a list of all mailings.

Inputs:

  • ApiKey (string): Your unique API key for authentication.

Outputs:

  • List of mailings, including their details.

Example:

GET /api/mailing/GetAllMailings?ApiKey=YOUR_API_KEY
    

Response:

[
  {
    "MailingId": 1,
    "Name": "Weekly Update",
    "Status": "Sent"
  },
  {
    "MailingId": 2,
    "Name": "Monthly Newsletter",
    "Status": "Scheduled"
  }
]
    

Endpoint: /api/mailing/LaunchMailing

Method: POST

Purpose: Launch a mailing to its intended recipients.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • MailingId (int): ID of the mailing to be launched.

Outputs:

  • Confirmation of the mailing launch.

Example:

POST /api/mailing/LaunchMailing
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "MailingId": 123
}
    

Response:

{
  "Success": true,
  "Message": "Mailing launched successfully."
}
    

Endpoint: /api/mailing/SendTransactionalEmail

Method: POST

Purpose: Send a transactional email to a specific recipient.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • EmailDetails (JSON object):
    • Recipient (string): Email address of the recipient.
    • Subject (string): Subject of the email.
    • Body (string): Body content of the email.

Outputs:

  • Confirmation of the email being sent.

Example:

POST /api/mailing/SendTransactionalEmail
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "EmailDetails": {
    "Recipient": "user@example.com",
    "Subject": "Welcome!",
    "Body": "Hello, welcome to our platform!"
  }
}
    

Response:

{
  "Success": true,
  "Message": "Transactional email sent successfully."
}
    

Endpoint: /api/mailing/EditMailing

Method: PUT

Purpose: Edit the details of an existing mailing.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • MailingDetails (JSON object):
    • MailingId (int): ID of the mailing to be edited.
    • Name (string, optional): New name of the mailing.
    • Content (string, optional): Updated content of the mailing.

Outputs:

  • Confirmation of the mailing update.

Example:

PUT /api/mailing/EditMailing
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "MailingDetails": {
    "MailingId": 123,
    "Name": "Updated Weekly Update",
    "Content": "

New content for the weekly update.

" } }

Response:

{
  "Success": true,
  "Message": "Mailing edited successfully."
}
    

Endpoint: /api/mailing/SendTestMail

Method: POST

Purpose: Send a test email to verify mailing details.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • MailingId (int): ID of the mailing to test.
  • TestRecipient (string): Email address to send the test mail to.

Outputs:

  • Confirmation of the test email being sent.

Example:

POST /api/mailing/SendTestMail
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "MailingId": 123,
  "TestRecipient": "test@example.com"
}
    

Response:

{
  "Success": true,
  "Message": "Test email sent successfully."
}
    

Endpoint: /api/mailing/DeleteMailing

Method: DELETE

Purpose: Delete an existing mailing by ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • MailingId (int): ID of the mailing to delete.

Outputs:

  • Confirmation of the mailing deletion.

Example:

DELETE /api/mailing/DeleteMailing?ApiKey=YOUR_API_KEY&MailingId=123
    

Response:

{
  "Success": true,
  "Message": "Mailing deleted successfully."
}
    

Reporting

Endpoint: /api/report/GetAggregateReportByDateRange

Method: GET

Purpose: Retrieve aggregate reports for a specified date range.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • StartDate (string): Start date of the range (YYYY-MM-DD).
  • EndDate (string): End date of the range (YYYY-MM-DD).

Outputs:

  • Aggregate report data.

Example:

GET /api/report/GetAggregateReportByDateRange?ApiKey=YOUR_API_KEY&StartDate=2023-01-01&EndDate=2023-01-31
    

Response:

{
  "TotalEmailsSent": 1000,
  "TotalOpens": 800,
  "TotalClicks": 200
}
    

Endpoint: /api/report/GetNextAggregateReportByDateRange

Method: GET

Purpose: Retrieve the next set of aggregate reports for a specified date range.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • NextPageToken (string): Token for the next page of results.

Outputs:

  • Next page of aggregate report data.

Example:

GET /api/report/GetNextAggregateReportByDateRange?ApiKey=YOUR_API_KEY&NextPageToken=ABC123
    

Response:

{
  "Reports": [
    { "Date": "2023-01-02", "EmailsSent": 100, "Opens": 80, "Clicks": 20 },
    { "Date": "2023-01-03", "EmailsSent": 150, "Opens": 120, "Clicks": 30 }
  ]
}
    

Endpoint: /api/report/GetOpenReportByDateRange

Method: GET

Purpose: Retrieve open reports for a specified date range.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • StartDate (string): Start date of the range (YYYY-MM-DD).
  • EndDate (string): End date of the range (YYYY-MM-DD).

Outputs:

  • Open report data.

Example:

GET /api/report/GetOpenReportByDateRange?ApiKey=YOUR_API_KEY&StartDate=2023-01-01&EndDate=2023-01-31
    

Response:

{
  "TotalOpens": 800,
  "UniqueOpens": 700
}
    

Endpoint: /api/report/GetClickReportByDateRange

Method: GET

Purpose: Retrieve click reports for a specified date range.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • StartDate (string): Start date of the range (YYYY-MM-DD).
  • EndDate (string): End date of the range (YYYY-MM-DD).

Outputs:

  • Click report data.

Example:

GET /api/report/GetClickReportByDateRange?ApiKey=YOUR_API_KEY&StartDate=2023-01-01&EndDate=2023-01-31
    

Response:

{
  "TotalClicks": 200,
  "UniqueClicks": 180
}
    

Endpoint: /api/report/GetBounceReportByDateRange

Method: GET

Purpose: Retrieve bounce reports for a specified date range.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • StartDate (string): Start date of the range (YYYY-MM-DD).
  • EndDate (string): End date of the range (YYYY-MM-DD).

Outputs:

  • Bounce report data.

Example:

GET /api/report/GetBounceReportByDateRange?ApiKey=YOUR_API_KEY&StartDate=2023-01-01&EndDate=2023-01-31
    

Response:

{
  "TotalBounces": 50,
  "HardBounces": 30,
  "SoftBounces": 20
}
    

Endpoint: /api/report/GetOpenReportByMailingId

Method: GET

Purpose: Retrieve open report details for a specific mailing ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • MailingId (int): ID of the mailing to retrieve the open report for.

Outputs:

  • Open report data for the specified mailing.

Example:

GET /api/report/GetOpenReportByMailingId?ApiKey=YOUR_API_KEY&MailingId=123
    

Response:

{
  "TotalOpens": 500,
  "UniqueOpens": 450
}
    

Segment Management

Endpoint: /api/segment/GetAllSegments

Method: GET

Purpose: Retrieve all segments.

Inputs:

  • ApiKey (string): Your unique API key for authentication.

Outputs:

  • List of all segments.

Example:

GET /api/segment/GetAllSegments?ApiKey=YOUR_API_KEY
    

Response:

[
  {
    "SegmentId": 1,
    "Name": "Active Users"
  },
  {
    "SegmentId": 2,
    "Name": "Inactive Users"
  }
]
    

Endpoint: /api/segment/GetSegmentById

Method: GET

Purpose: Retrieve a specific segment by its ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • SegmentId (int): ID of the segment to retrieve.

Outputs:

  • Details of the specified segment.

Example:

GET /api/segment/GetSegmentById?ApiKey=YOUR_API_KEY&SegmentId=1
    

Response:

{
  "SegmentId": 1,
  "Name": "Active Users",
  "Criteria": "LastLogin > 30 days"
}
    

Endpoint: /api/segment/DeleteSegmentById

Method: DELETE

Purpose: Delete a specific segment by its ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • SegmentId (int): ID of the segment to delete.

Outputs:

  • Confirmation of the deletion.

Example:

DELETE /api/segment/DeleteSegmentById?ApiKey=YOUR_API_KEY&SegmentId=1
    

Response:

{
  "Success": true,
  "Message": "Segment deleted successfully."
}
    

Endpoint: /api/snapshot/GetAllSnapshots

Method: GET

Purpose: Retrieve all snapshots.

Inputs:

  • ApiKey (string): Your unique API key for authentication.

Outputs:

  • List of all snapshots.

Example:

GET /api/snapshot/GetAllSnapshots?ApiKey=YOUR_API_KEY
    

Response:

[
  {
    "SnapshotId": 1,
    "Name": "Monthly Summary"
  },
  {
    "SnapshotId": 2,
    "Name": "Weekly Activity"
  }
]
    

Endpoint: /api/snapshot/GetSnapshotById

Method: GET

Purpose: Retrieve a specific snapshot by its ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • SnapshotId (int): ID of the snapshot to retrieve.

Outputs:

  • Details of the specified snapshot.

Example:

GET /api/snapshot/GetSnapshotById?ApiKey=YOUR_API_KEY&SnapshotId=1
    

Response:

{
  "SnapshotId": 1,
  "Name": "Monthly Summary",
  "Details": "Data from 01/01/2023 to 01/31/2023"
}
    

Endpoint: /api/snapshot/AddSnapshot

Method: POST

Purpose: Create a new snapshot.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • Name (string): Name of the snapshot.
  • Details (string, optional): Additional details for the snapshot.

Outputs:

  • Confirmation of the snapshot creation.

Example:

POST /api/snapshot/AddSnapshot
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "Name": "Quarterly Analysis",
  "Details": "Data from Q1 2023"
}
    

Response:

{
  "Success": true,
  "SnapshotId": 3
}
    

Endpoint: /api/snapshot/EditSnapshot

Method: PUT

Purpose: Edit an existing snapshot.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • SnapshotId (int): ID of the snapshot to edit.
  • Name (string, optional): New name for the snapshot.
  • Details (string, optional): Updated details for the snapshot.

Outputs:

  • Confirmation of the snapshot update.

Example:

PUT /api/snapshot/EditSnapshot
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "SnapshotId": 1,
  "Name": "Updated Monthly Summary",
  "Details": "Updated data from 01/01/2023 to 01/31/2023"
}
    

Response:

{
  "Success": true,
  "Message": "Snapshot updated successfully."
}
    

Endpoint: /api/snapshot/DeleteSnapshot

Method: DELETE

Purpose: Delete an existing snapshot.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • SnapshotId (int): ID of the snapshot to delete.

Outputs:

  • Confirmation of the snapshot deletion.

Example:

DELETE /api/snapshot/DeleteSnapshot?ApiKey=YOUR_API_KEY&SnapshotId=1
    

Response:

{
  "Success": true,
  "Message": "Snapshot deleted successfully."
}
    

Template Management

Endpoint: /api/template/AddTemplate

Method: POST

Purpose: Add a new template.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • TemplateName (string): Name of the new template.
  • TemplateContent (string): Content of the template.

Outputs:

  • Confirmation of the template creation.

Example:

POST /api/template/AddTemplate
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "TemplateName": "Welcome Email",
  "TemplateContent": "

Welcome to our platform!

" }

Response:

{
  "Success": true,
  "TemplateId": 123
}
    

Endpoint: /api/template/EditTemplate

Method: PUT

Purpose: Edit an existing template.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • TemplateId (int): ID of the template to edit.
  • TemplateName (string, optional): New name for the template.
  • TemplateContent (string, optional): Updated content of the template.

Outputs:

  • Confirmation of the template update.

Example:

PUT /api/template/EditTemplate
Content-Type: application/json

{
  "ApiKey": "YOUR_API_KEY",
  "TemplateId": 123,
  "TemplateName": "Updated Welcome Email",
  "TemplateContent": "

Welcome to our updated platform!

" }

Response:

{
  "Success": true,
  "Message": "Template updated successfully."
}
    

Endpoint: /api/template/DeleteTemplate

Method: DELETE

Purpose: Delete a template by its ID.

Inputs:

  • ApiKey (string): Your unique API key for authentication.
  • TemplateId (int): ID of the template to delete.

Outputs:

  • Confirmation of the template deletion.

Example:

DELETE /api/template/DeleteTemplate?ApiKey=YOUR_API_KEY&TemplateId=123
    

Response:

{
  "Success": true,
  "Message": "Template deleted successfully."
}
    

Endpoint: /api/template/GetAllTemplates

Method: GET

Purpose: Retrieve all templates.

Inputs:

  • ApiKey (string): Your unique API key for authentication.

Outputs:

  • List of all templates.

Example:

GET /api/template/GetAllTemplates?ApiKey=YOUR_API_KEY
    

Response:

[
  {
    "TemplateId": 1,
    "TemplateName": "Welcome Email",
    "TemplateContent": "

Welcome to our platform!

" }, { "TemplateId": 2, "TemplateName": "Thank You Email", "TemplateContent": "

Thank you for your support!

" } ]
Net Atlantic Office

About Us

NextMail is a division of Net Atlantic, Inc. a pioneering Internet company founded in 1995 that offers email marketing software and solutions for business and organizations worldwide. 

Over the last two decades, clients have sent over 85 billion email messages with Net Atlantic. For additional company information see our parent web site at: https://www.netatlantic.com

Our Location:
Net Atlantic NextMail
10 Federal Street, Suite 26 Salem MA 01970 USA
Tel. 978-219-1900
https://www.nextmail.email
https://www.netatlantic.com

Contact Us

Net Atlantic, Inc.
10 Federal Street, Suite 26, Salem MA 01970
Email sales@nextmail.email Tel. 978-219-1900

How to Find Us