---
updatedAt: 2026-04-23T12:53:11.000Z
agentTools:
  projectIndex: https://developers.themarketer.com/llms.txt
---

# Add Subscriber

By default, double opt-in is enabled for all our customers’ accounts. This means that whenever a user fills in a subscription form / registration form, and you ask customers for explicit permission to subscribe them to promotional emails, this needs to be taken into account.

When a user checks that they want to receive promotional emails, you will need to make a call to our Add subscriber API, which will then send the double opt-in email for confirming the newsletter subscription.

If a user doesn’t check this option, they will still be captured in theMarketer platform via the \_\_sm\_set\_email event, but they will not be subscribed to the newsletter.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "theMarketer API",
    "version": "1.0.0",
    "description": ""
  },
  "servers": [
    {
      "url": "https://t.themarketer.com"
    }
  ],
  "paths": {
    "/api/v1/add_subscriber": {
      "parameters": [],
      "post": {
        "summary": "Add Subscriber",
        "tags": [],
        "parameters": [
          {
            "name": "k",
            "in": "query",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "example": "REST_KEY"
          },
          {
            "name": "u",
            "in": "query",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "example": "CUSTOMER_ID"
          },
          {
            "name": "email",
            "in": "query",
            "required": true,
            "deprecated": false,
            "schema": {
              "type": "string",
              "format": "email"
            },
            "example": "email@example.com"
          },
          {
            "name": "add_tags",
            "in": "query",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "example": "Customer"
          },
          {
            "name": "firstname",
            "in": "query",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "example": "John"
          },
          {
            "name": "lastname",
            "in": "query",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "example": "Doe"
          },
          {
            "name": "phone",
            "in": "query",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "example": "%2B40700000124"
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "example": "City Name"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "example": "RO"
          },
          {
            "name": "attributes[attribute_name]",
            "in": "query",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "example": "Attribute value"
          },
          {
            "name": "birthday",
            "in": "query",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2025-01-01"
          },
          {
            "name": "channels",
            "in": "query",
            "required": false,
            "deprecated": false,
            "schema": {
              "type": "string"
            },
            "example": "email,sms"
          },
          {
            "name": "unsubscribed_from_all",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": "false"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200 Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "boolean",
                      "example": "true",
                      "description": "Subscriber added successfully"
                    }
                  }
                },
                "example": {
                  "result": true
                }
              }
            }
          },
          "401": {
            "description": "401 Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Invalid REST Key",
                      "description": "Invalid REST Key"
                    }
                  }
                },
                "example": {
                  "message": "Invalid REST Key."
                }
              }
            }
          },
          "404": {
            "description": "404 Not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Customer not found",
                      "description": "Customer not found"
                    }
                  }
                },
                "example": {
                  "message": "No query results for model [App\\Models\\System\\Domain] CUSTOMER_ID"
                }
              }
            }
          },
          "405": {
            "description": "405 Method not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The GET method is not supported for this route. Supported methods: POST",
                      "description": "The GET method is not supported for this route. Supported methods: POST"
                    }
                  }
                },
                "example": {
                  "message": "Method not suported"
                }
              }
            }
          }
        }
      }
    }
  }
}
```