1. Creating subscriber via API

This method is intended to create a new subscriber in a project. Data is sent in application/json format.

HTTP Request
  • URL: https://sender-solutions.com/api/subscribers/create-subscriber/
  • HTTP Method: POST
  • Content-Type: application/json
Request Body (JSON)
{
    "Subscriber": {
        "Base": {
            "Id": 0,
            "Name": "Test Users"
        },
        "IsActive": true,
        "Email": "username@example.com",
        "FirstName": "Cat",
        "LastLame": "Catstone",
        "Gender": "male",
        "Phone": "+380111222333",
        "Tags": ["api", "test-user"],
        "ClientUserId": "ClientUserId3",
        "CustomField1": "CustomValue1",
        "CustomField2": "CustomValue2",
        "CustomField3": "CustomValue3",
        "Address": {
            "Country": "UA",
            "City": "Odesa",
            "State": null,
            "Zip": 65000,
            "Line1": "Very Long street",
            "Line2": "building 42",
            "Line3": null
        },
        "Birthday": "2002-04-15"
    }
}
Example request using cURL

curl --location 'https://sender-solutions.com/api/subscribers/create-subscriber/' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{api-token}}' \
--data-raw '{
    "Subscriber": {
        "Base": {
            "Id": 0,
            "Name": "Test Users"
        },
        "IsActive": true,
        "Email": "username@example.com",
        "FirstName": "Cat",
        "LastLame": "Catstone",
        "Gender": "male",
        "Phone": "+380111222333",
        "Tags": ["api", "test-user"],
        "ClientUserId": "ClientUserId12345",
        "CustomField1": "CustomValue1",
        "CustomField2": "CustomValue2",
        "CustomField3": "CustomValue3",
        "Address": {
            "Country": "UA",
            "City": "Odesa",
            "State": null,
            "Zip": 65000,
            "Line1": "Very Long street",
            "Line2": "building 42",
            "Line3": null
        },
        "Birthday": "2002-04-15"
    }
}'
Field Description
Field Type Required Description
Subscriber.Base.Id number Subscriber Base ID. Either this field or Subscriber.Base.Name must be specified. If both fields contain non-empty values, Subscriber.Base.Id has priority.
Subscriber.Base.Name string Subscriber Base name. Either this field or Subscriber.Base.Id must be specified. If both fields contain non-empty values, Subscriber.Base.Id has priority.
Subscriber.IsActive boolean Subscriber activity flag. Default value is false.
Subscriber.Email string Subscriber email address.
Subscriber.FirstName string First name.
Subscriber.LastLame string Last name.
Subscriber.Gender string Subscriber gender. Possible values: "male" for male, "female" for female, "" (empty string) for "Not specified". Default value is "Not specified".
Subscriber.Phone string Phone number.
Subscriber.Tags array[string] Subscriber tags, array of strings.
Subscriber.ClientUserId string Subscriber ID in the client system.
Subscriber.CustomField1 string Custom field 1. Fill with any information at your discretion.
Subscriber.CustomField2 string Custom field 2. Fill with any information at your discretion.
Subscriber.CustomField3 string Custom field 3. Fill with any information at your discretion.
Subscriber.Address.Country string Two-letter country code (ISO 3166-1 alpha-2).
Subscriber.Address.City string City.
Subscriber.Address.State string | null Region / state / province.
Subscriber.Address.Zip number Postal code.
Subscriber.Address.Line1 string Main address line.
Subscriber.Address.Line2 string Additional address line.
Subscriber.Address.Line3 string | null Additional address line.
Subscriber.Birthday string (YYYY-MM-DD) Date of birth in YYYY-MM-DD format.
Example of a successful response. Contains the data of the created subscriber in the same structure as in the API request, but also includes an additional field Subscriber.Id — the identifier of the created subscriber.
{
    "success": true,
    "Subscriber": {
        "Id": 24,
        "Base": {
            "Id": 13,
            "Name": "Test Users"
        },
        "IsActive": true,
        "Email": "username@example.com",
        "FirstName": "Cat",
        "LastLame": "Catstone",
        "Gender": "male",
        "Phone": "+380111222333",
        "Tags": [
            "api",
            "test-user"
        ],
        "ClientUserId": "ClientUserId12345",
        "CustomField1": "CustomValue1",
        "CustomField2": "CustomValue2",
        "CustomField3": "CustomValue3",
        "Address": {
            "Country": "UA",
            "City": "Odesa",
            "State": "",
            "Zip": "65000",
            "Line1": "Very Long street",
            "Line2": "building 42",
            "Line3": ""
        },
        "Birthday": "2002-04-15"
    }
}