# Mailing List

# Create Mailing List

# Description

You can use this API to create mailing list.

# Endpoint

POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/CreateMalingList
Name Type Required
Authorization mail token ✔️
Content-Type application/json ✔️

# Parameters

Variable Name Fill required Info exmple value
IsNewList ✔️ Always True true
NewListName ✔️ Name of The List Andromeda
NewListDescription Description Of The List List from Another Galaxy

# Request Example

{
  "IsNewList": true,
  "NewListName": "my new malinglist",
  "NewListDescription": "this is the description of the maling list"
}

# Response Example

{
  "success": true-Or-false,
  "res": true-Or-false,
  "result": {
    "ResultID": Status-Code,
    "ResultMessage": SendMsgResult-Message,
    "Tin": deprecated-always-empty
  },
  "data": {
    "users": [array - userID],
    "mailingLists": [array - mailingLists ID]
  }
}

# Add Users to Maling Lists

# Description

You can use this API to add users to an existing mailing list.

# Endpoint

POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/AddUsersToLists

# Header

Name Type Required
Authorization mail token ✔️
Content-Type application/json ✔️

# Parameters

Variable Name Fill required Info exmple value
EmailAddress ✔️ Subscriber Email comstar@comstar.com
ExistingListID ✔️ Array of MailingList ID(int) From Sendmsg Account 19407

# Request Example

{
  "users": [
    {
      "EmailAddress": "comstar@comstar.com"
    }
  ],
  "mailingLists": [
    {
      "ExistingListID": 5
    }
  ]
}

# Response Example

{
  "success": true-Or-false,
  "res": true-Or-false,
  "result": {
    "ResultID": Status-Code,
    "ResultMessage": SendMsgResult-Message,
    "Tin": deprecated-always-empty
  },
  "data": {
    "users": [array - userID],
    "mailingLists": [array - mailingLists ID]
  }
}

# Get Maling Lists by ID

# Description

You can use this API to get info about mailing list by her id.

# Endpoint

GET https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetMailingListByID/?listID=&type=

# Header

Name Type Required
Authorization mail token ✔️

# Parameters

Variable Name Fill required Info value type
listID ✔️ ID of the Mailing List in SendMsg Account. String
type ✔️ Get Users from Mailing List By Type. String

# Type Details

type Info User Range Query
0 Get All Users Deleted,Wrong,Active,Unsubscriber
1 Get Deleted Users Deleted
2 Get Unsubscriber Users Unsubscriber
3 Get Wrong eMails Wrong
4 Get Active Users Active

# Request Example

https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetMailingListByID/?listID=1234&type=0

# Response Example

{
  "success": true,
  "res": true,
  "result": {
    "ResultID": 200,
    "ResultMessage": "Data was successfuly retrieved",
    "Tin": ""
  },
  "users": [
    {
      "Cellphone": "",
      "DeleteUser": false,
      "EmailAddress": "comstar@comstar.com",
      "FirstName": "",
      "IsUserSelfRemoved": false,
      "LastName": "",
      "StatusEmail": null,
      "UndeleteUserIfExists": false,
      "UserID": 7,
      "UserSendFields": [],
      "UserSystemFields": [
        {
          "Key": "שם",
          "Value": ""
        },
        {
          "Key": "כןלא",
          "Value": "0"
        }
      ]
    }
  ]
}

# Get All Mailing Lists ID's

# Description

You can use this API to get your mailing lists id's.

# Endpoint

POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/GetMailingListNames

# Header

Name Type Required
Authorization mail token ✔️
Content-Type application/json ✔️

NOTE

the request body should be empty

# Response Example

{
  "success": true-Or-false,
  "res": true-Or-false,
  "result": {
    "ResultID": Status-Code,
    "ResultMessage": SendMsgResult-Message,
    "Tin": deprecated-always-empty
  },
  "listNames": [array -
    {
      "ActiveUserCount": int - Count only Active Users,
      "ExistingListID": int - List ID,
      "IsNewList": bool - New List Flag,
      "NewListDescription": string - List Description,
      "NewListName": string - List Name,
      "UserCount": int - Count of all users in List
    }
  }

# Delete all Users from Maling List by ID

# Description

You can use this API to delete all the user of some mailing list.

# Endpoint

POST https://gconvertrest.sendmsg.co.il/api/Sendmsg/TruncateMailingLists

# Header

Name Type Required
Authorization mail token ✔️
Content-Type application/json ✔️

# Parameters

Variable Name Fill required Info value type
body ✔️ array of mailing list id's Array of int

# Request Example

[
  1,
  2,
  3,
  4,
  5
]

# Response Example

    {
  "success": true-Or-false,
  "res": true-Or-false,
  "result": {
    "ResultID": Status-Code,
    "ResultMessage": SendMsgResult-Message,
    "Tin": deprecated-always-empty
  },
  "data": null
}
Last Updated: 7/13/2023, 2:50:32 PM