2. Editing subscriber via API

This method is intended for editing an existing subscriber in the project. Data is sent in application/json format.

HTTP Request
  • URL: https://sender-solutions.com/api/subscribers/edit-subscriber/
  • HTTP Method: POST
  • Content-Type: application/json
Request Body (JSON)
{
    "Subscriber": {
        "Id": 23,
        "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/edit-subscriber/' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{api-token}}' \
--data-raw '{
    "Subscriber": {
        "Id": 23,
        "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.Id number Subscriber identifier
Subscriber.Base.Id number Subscriber base identifier. Either this field or Subscriber.Base.Name must be provided. 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 provided. If both fields contain non-empty values, Subscriber.Base.Id has priority.
Subscriber.IsActive boolean Subscriber active flag. Default value is false.
Subscriber.Email string Subscriber email
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 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 current subscriber data (after update) in the same structure as in the API request.
{
    "success": true,
    "Subscriber": {
        "Id": 23,
        "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"
    }
}