{
  "info": {
    "name": "sender-solutions.com API",
    "description": "## This is a collection for working with the sender-solutions.com service API.\n\n[Online Documentation](https://sender-solutions.com/en/help/api/)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Create Subscriber",
      "request": {
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "value",
              "value": "{{token}}",
              "type": "string"
            },
            {
              "key": "key",
              "value": "Authorization",
              "type": "string"
            },
            {
              "key": "in",
              "value": "header",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n\t\"Subscriber\": {\n        \"Base\": {\n            \"Id\": 0,\n            \"Name\": \"Test Users\"\n        },\n        \"IsActive\": true,\n        \"Email\": \"username@example.com\",\n        \"FirstName\": \"Cat\",\n        \"LastLame\": \"Catstone\",\n        \"Gender\": \"male\",\n        \"Phone\": \"+380111222333\",\n        \"Tags\": [\"api\", \"test-user\"],\n        \"ClientUserId\": \"ClientUserId12345\",\n        \"CustomField1\": \"CustomValue1\",\n        \"CustomField2\": \"CustomValue2\",\n        \"CustomField3\": \"CustomValue3\",\n        \"Address\": {\n            \"Country\": \"UA\",\n            \"City\": \"Odesa\",\n            \"State\": null,\n            \"Zip\": 65000,\n            \"Line1\": \"Very Long street\",\n            \"Line2\": \"building 42\",\n            \"Line3\": null\n        },\n        \"Birthday\": \"2002-04-15\"\n    }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseurl}}/api/subscribers/create-subscriber/",
          "host": [
            "{{baseurl}}"
          ],
          "path": [
            "api",
            "subscribers",
            "create-subscriber",
            ""
          ]
        },
        "description": "This method is intended to create a new subscriber in a project. Data is sent in `application/json` format."
      },
      "response": []
    },
    {
      "name": "Edit Subscriber",
      "request": {
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "value",
              "value": "{{token}}",
              "type": "string"
            },
            {
              "key": "key",
              "value": "Authorization",
              "type": "string"
            },
            {
              "key": "in",
              "value": "header",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"Subscriber\": {\n        \"Id\": 21,\n        \"Base\": {\n            \"Id\": 11,\n            \"Name\": \"Test Base Name\"\n        },\n        \"IsActive\": true,\n        \"Email\": \"cri2net@gmail.com\",\n        \"FirstName\": \"Andrii\",\n        \"LastLame\": \"Davydovych\",\n        \"Gender\": \"female\",\n        \"Phone\": \"+380949312646\",\n        \"Tags\": [\n            \"api\",\n            \"real\"\n        ],\n        \"ClientUserId\": \"ClientUserId1\",\n        \"CustomField1\": \"CustomValue1\",\n        \"CustomField2\": \"CustomValue2\",\n        \"CustomField3\": \"CustomValue3\",\n        \"Address\": {\n            \"Country\": \"UA\",\n            \"City\": \"Odesa\",\n            \"State\": \"\",\n            \"Zip\": \"65000\",\n            \"Line1\": \"Very Long street\",\n            \"Line2\": \"building 42\",\n            \"Line3\": \"\"\n        },\n        \"Birthday\": \"1992-12-04\"\n    }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseurl}}/api/subscribers/edit-subscriber/",
          "host": [
            "{{baseurl}}"
          ],
          "path": [
            "api",
            "subscribers",
            "edit-subscriber",
            ""
          ]
        },
        "description": "This method is intended for editing an existing subscriber in the project. Data is sent in `application/json` format."
      },
      "response": []
    },
    {
      "name": "Delete Subscriber",
      "request": {
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "value",
              "value": "{{token}}",
              "type": "string"
            },
            {
              "key": "key",
              "value": "Authorization",
              "type": "string"
            },
            {
              "key": "in",
              "value": "header",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n\t\"Subscriber\": {\n        \"Id\": 24\n    }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseurl}}/api/subscribers/delete-subscriber/",
          "host": [
            "{{baseurl}}"
          ],
          "path": [
            "api",
            "subscribers",
            "delete-subscriber",
            ""
          ]
        },
        "description": "This method is intended for deleting an existing subscriber in the project. Data is sent in `application/json` format."
      },
      "response": []
    },
    {
      "name": "Send Subscriber into a Campaign",
      "request": {
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "value",
              "value": "{{token}}",
              "type": "string"
            },
            {
              "key": "key",
              "value": "Authorization",
              "type": "string"
            },
            {
              "key": "in",
              "value": "header",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n\t\"SendIntoCampaign\": {\n        \"SubscriberId\": 21,\n        \"CampaignId\": 5,\n        \"Variables\": {\n            \"myVar1\": \"myVar1 value\",\n            \"myVar2\": {\n                \"option1\": \"myVar2 option value\"\n            }\n        }\n    }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseurl}}/api/subscribers/send-subscriber-into-campaign/",
          "host": [
            "{{baseurl}}"
          ],
          "path": [
            "api",
            "subscribers",
            "send-subscriber-into-campaign",
            ""
          ]
        },
        "description": "The method is intended for trigger-based sending of an existing Subscriber into an existing Mailing Campaign. Data is transmitted in `application/json` format."
      },
      "response": []
    },
    {
      "name": "Send Email",
      "request": {
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "value",
              "value": "{{token}}",
              "type": "string"
            },
            {
              "key": "key",
              "value": "Authorization",
              "type": "string"
            },
            {
              "key": "in",
              "value": "header",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"SendEmail\": {\n        \"TrackingSettings\": {\n            \"TrackLinks\": true,\n            \"TrackPlainTextLinks\": true,\n            \"TrackOpen\": true,\n            \"TrackUnsubscribe\": true\n        },\n        \"EmailSettings\": {\n            \"InlineImages\": true,\n            \"SendAt\": 1769356236,\n            \"UseDkim\": true,\n            \"UseDkimSelector\": null\n        },\n        \"Email\": {\n            \"To\": [\n                {\n                    \"Email\": \"cri2net@gmail.com\",\n                    \"Name\": \"Andrii\"\n                },\n                {\n                    \"Email\": \"cri2net2@gmail.com\",\n                    \"Name\": \"Dron\"\n                }\n            ],\n            \"Cc\": [],\n            \"Bcc\": [],\n            \"ReplyTo\": [],\n            \"From\": {\n                \"Email\": \"info@tinycdn.cloud\",\n                \"Name\": \"TinyCdn team\"\n            },\n            \"Headers\": [\n                {\n                    \"Name\": \"X-Request-Id\",\n                    \"Value\": \"X-abc-123\"\n                }\n            ],\n            \"Html\": \"<!doctype html>\\r            <html lang=\\\"en\\\">\\r            <head>\\r                <meta charset=\\\"UTF-8\\\">\\r                <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\">\\r                <title>Test Email<\\/title>\\r            <\\/head>\\r            <body>\\r            <h1>Hello<\\/h1>\\r            <p>It's test email content<\\/p><a href=\\\"https://sender-solutions.com/uk/\\\">Test Link</a>\\r            <\\/body>\\r            <\\/html>\",\n            \"PlainText\": \"Hello\\r\\nIt's test email content https://sender-solutions.com/uk/\",\n            \"Subject\": \"Test Email via API\",\n            \"Attachments\": [\n                {\n                    \"ContentBase64\": \"VGVzdCBGaWxlIGNvbnRlbnQ=\",\n                    \"ContentId\": \"ec91464b58363fac4924587afecf53d0\",\n                    \"Disposition\": \"attachment\",\n                    \"Filename\": \"Attachment12.txt\",\n                    \"Type\": \"text/plain\"\n                }\n            ]\n        }\n    }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseurl}}/api/emails/send-instant-email/",
          "host": [
            "{{baseurl}}"
          ],
          "path": [
            "api",
            "emails",
            "send-instant-email",
            ""
          ]
        },
        "description": "This method is intended for sending an email via the API when the Campaigns mailing functionality through the Service UI is not suitable for some reason. The data is transmitted in `application/json` format."
      },
      "response": []
    },
    {
      "name": "Subscribers List",
      "request": {
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "value",
              "value": "{{token}}",
              "type": "string"
            },
            {
              "key": "key",
              "value": "Authorization",
              "type": "string"
            },
            {
              "key": "in",
              "value": "header",
              "type": "string"
            }
          ]
        },
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseurl}}/api/subscribers/subscribers-list/?offset=0&limit=10&Id=25&BaseId=13&ClientUserId=ClientUserId12345&Email=username@example.com&IsActive=1&FirstName=Cat&LastName=Catstone&Gender=male",
          "host": [
            "{{baseurl}}"
          ],
          "path": [
            "api",
            "subscribers",
            "subscribers-list",
            ""
          ],
          "query": [
            {
              "key": "offset",
              "value": "0"
            },
            {
              "key": "limit",
              "value": "10"
            },
            {
              "key": "Id",
              "value": "25"
            },
            {
              "key": "BaseId",
              "value": "13"
            },
            {
              "key": "ClientUserId",
              "value": "ClientUserId12345"
            },
            {
              "key": "Email",
              "value": "username@example.com"
            },
            {
              "key": "IsActive",
              "value": "1"
            },
            {
              "key": "FirstName",
              "value": "Cat"
            },
            {
              "key": "LastName",
              "value": "Catstone"
            },
            {
              "key": "Gender",
              "value": "male"
            }
          ]
        },
        "description": "The method is intended to retrieve a list of Subscribers. It can be used to search using a specific set of filters. All parameters are optional. Data is passed via query parameters in the URL."
      },
      "response": []
    },
    {
      "name": "Suppressions List",
      "request": {
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "value",
              "value": "{{token}}",
              "type": "string"
            },
            {
              "key": "key",
              "value": "Authorization",
              "type": "string"
            },
            {
              "key": "in",
              "value": "header",
              "type": "string"
            }
          ]
        },
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseurl}}/api/suppressions/suppressions-list/?offset=0&limit=10&Id=2&BaseId=0&Email=username@example.com&Type=unsubscribe",
          "host": [
            "{{baseurl}}"
          ],
          "path": [
            "api",
            "suppressions",
            "suppressions-list",
            ""
          ],
          "query": [
            {
              "key": "offset",
              "value": "0"
            },
            {
              "key": "limit",
              "value": "10"
            },
            {
              "key": "Id",
              "value": "2"
            },
            {
              "key": "BaseId",
              "value": "0"
            },
            {
              "key": "Email",
              "value": "username@example.com"
            },
            {
              "key": "Type",
              "value": "unsubscribe"
            }
          ]
        },
        "description": "This method is intended to retrieve a list of Suppressions. It can be used to search using a specific set of filters. All parameters are optional. Data is passed via query parameters in the URL.\n\nA Suppression (suppression rule) is a website feature that prevents sending emails to a specific address. For example, a user has unsubscribed or reported spam, or the email address does not exist at all. The system detects a situation where emails can no longer be sent to this address and creates a suppression rule."
      },
      "response": []
    },
    {
      "name": "Delete Suppression",
      "request": {
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "value",
              "value": "{{token}}",
              "type": "string"
            },
            {
              "key": "key",
              "value": "Authorization",
              "type": "string"
            },
            {
              "key": "in",
              "value": "header",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n\t\"Suppression\": {\n        \"Id\": 2\n    }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseurl}}/api/suppressions/delete-suppression/",
          "host": [
            "{{baseurl}}"
          ],
          "path": [
            "api",
            "suppressions",
            "delete-suppression",
            ""
          ]
        },
        "description": "This method is intended to delete an existing suppression rule (Suppression) in a project. Data is sent in `application/json` format.\n\nA suppression (Suppression, suppression rule) is a website feature that prevents emails from being sent to a specific address. For example, a user has unsubscribed or reported spam, or the email address does not work at all. The system detects a situation where sending emails to this address is no longer possible and creates a suppression rule. You can delete certain rules manually in the Control Panel or via the API. However, you must make sure that the situation that caused the rule to be created has already been resolved. For example, if a subscriber has explicitly re-subscribed to your mailing list, you can delete the suppression rule related to their unsubscription. Delete suppression rules only if you are absolutely sure that the issue has been resolved. Abuse of deleting these rules may lead to a decrease in your sender reputation, up to and including account suspension."
      },
      "response": []
    },
    {
      "name": "Subscribe Action",
      "request": {
        "auth": {
          "type": "apikey",
          "apikey": [
            {
              "key": "value",
              "value": "{{token}}",
              "type": "string"
            },
            {
              "key": "key",
              "value": "Authorization",
              "type": "string"
            },
            {
              "key": "in",
              "value": "header",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\n\t\"Subscriber\": {\n        \"Base\": {\n            \"Id\": 0,\n            \"Name\": \"Test Users\"\n        },\n        \"IsActive\": true,\n        \"Email\": \"username@example.com\",\n        \"FirstName\": \"Cat\",\n        \"LastLame\": \"Catstone\",\n        \"Gender\": \"male\",\n        \"Phone\": \"+380111222333\",\n        \"Tags\": [\"api\", \"test-user\"],\n        \"ClientUserId\": \"ClientUserId12345\",\n        \"CustomField1\": \"CustomValue1\",\n        \"CustomField2\": \"CustomValue2\",\n        \"CustomField3\": \"CustomValue3\",\n        \"Address\": {\n            \"Country\": \"UA\",\n            \"City\": \"Odesa\",\n            \"State\": null,\n            \"Zip\": 65000,\n            \"Line1\": \"Very Long street\",\n            \"Line2\": \"building 42\",\n            \"Line3\": null\n        },\n        \"Birthday\": \"2002-04-15\"\n    },\n    \"PreferredLanguage\": \"en\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseurl}}/api/subscribers/subscribe-action/",
          "host": [
            "{{baseurl}}"
          ],
          "path": [
            "api",
            "subscribers",
            "subscribe-action",
            ""
          ]
        },
        "description": "The method is designed to create a new subscriber in the project with subscription confirmation by the subscriber themselves. This is well suited for public subscription forms on websites where any email can be entered. The Sender Solutions system will send this subscriber an email so that they can separately confirm that they want to receive the newsletter. This will protect the subscriber base from accidental or intentional errors when entering an email address. Data is transmitted in `application/json` format."
      },
      "response": []
    }
  ],
  "variable": [
    {
      "key": "baseurl",
      "value": "https://sender-solutions.com"
    },
    {
      "key": "token",
      "value": "",
      "description": "Get your token on https://sender-solutions.com/ on the project settings page"
    }
  ]
}