# Create new subscriber

# HTTP method: POST

https://api.sender.net/v2/subscribers

Creates a new subscriber, providing basic information, fields and groups.

email string required

The value must be a valid email address.

firstname string

Subscriber firstname

lastname string

Subscriber lastname

groups array

Provide the new groups assigned to the subscriber, by inserting the group id separated by commas for more than one.

fields array

Provide an array formed by key - field name, value - field value.

phone string

Phone number must include the country code: +370 or 00370 follow by a valid phone number

trigger_automation boolean

This property by default its true. You ca send it as false if you want not to activate an automation.

Code snippets

Response example

{
  "success": true,
  "message": [],
  "data": {
    "id": "o2lk68Y",
    "email": "[email protected]",
    "firstname": "Sender",
    "lastname": "Support",
    "phone": "+370XXXXXXXX",
    "phone_country": {
      "phone_code": 370,
      "country_code": "LT"
    },
    "created": "2021-04-08 11:06:34",
    "location": null,
    "status": {
      "email": "active",
      "temail": "active"
    },
    "ip_address": null,
    "subscriber_tags": [
      {
        "id": "eZVD4w",
        "title": "Test group"
      },
      {
        "id": "b2vAR1",
        "title": "My Renamed Group"
      }
    ],
    "columns": [
      {
        "id": "bDqoKd",
        "title": "test num",
        "type": "number",
        "default": true,
        "value": 1
      },
      {
        "id": "avAlVe",
        "title": "First name",
        "type": "text",
        "default": true,
        "value": "Support"
      },
      {
        "id": "dwBVJb",
        "title": "Last name",
        "type": "text",
        "default": true,
        "value": "Sender"
      }
    ],
    "sms_campaign": {
      "sent_count": 0,
      "clicked_count": 0,
      "delivered_count": 0,
      "failed_count": 0,
      "unsubscribed_at": null,
      "unsubscribed": 0
    },
    "email_campaign": {
      "sent_count": 4,
      "opened_count": 0,
      "clicked_count": 0,
      "unsubscribed": 0,
      "bounced": 0,
      "spam_reported": 0
    }
  }
}