# Subscriber

## Requirements

To use the `subscriber` endpoint, requests must be made against a base URL of `https://api-gw.emotiveapp.co/` Requests are authenticated using an `Authorization` header with value: `Token <YOUR_API_KEY>` .

{% hint style="info" %}
You must send at least a <mark style="color:red;">**`phone_number`**</mark> or<mark style="color:red;">**`email`**</mark> as required fields for creating/updating a subscriber
{% endhint %}

{% hint style="info" %} <mark style="color:green;">**`subscribe_identifier`**</mark> is available from the Subscriber Lists endpoint
{% endhint %}

When submitting new SMS subscribers from an external source,  The following are required:

* Properly formatted Authorization header&#x20;
* phone\_number
* source\_type = `LIST_GROWTH`
* subscribe\_identifier. The value is found in the emotive application with `List Growth->Integrations`&#x20;

The following parameters should not be included

* platform
* popup\_identifier
* subsource\_identifier

## POST /v1/subscriber

> Create a subscriber.

```json
{"openapi":"3.0.2","info":{"title":"Sensus Webhooks","version":"0.1.0"},"servers":[{"url":"/sensus-webhook"}],"paths":{"/v1/subscriber":{"post":{"description":"Create a subscriber.","operationId":"controllers.webhooks.subscriber_handler","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscriber"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonResponse"}}},"description":"Webhook Accepted."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonResponse"}}},"description":"Bad Request"}},"tags":["Subscriber"]}}},"components":{"schemas":{"Subscriber":{"anyOf":[{"required":["phone_number","subscribe_identifier"]},{"required":["email","subscribe_identifier"]}],"properties":{"birthdate":{"type":"string"},"context":{"additionalProperties":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"integer"},{"type":"boolean"}]},"type":"object"},"email":{"type":"string"},"external_identifiers":{"$ref":"#/components/schemas/ExternalIdentifier"},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone_number":{"type":"string"},"platform":{"enum":["alloy","emotive","privy"],"type":"string"},"popup_identifier":{"type":"string"},"properties":{"$ref":"#/components/schemas/PropertyList"},"source_type":{"enum":["EMOTIVE_POPUP","EMOTIVE_EMBEDDED","BACK_IN_STOCK_POPUP","LIST_GROWTH"],"type":"string"},"subscribe_identifier":{"type":"string"},"subsource_identifier":{"type":"string"}},"type":"object"},"ExternalIdentifier":{"properties":{"custom":{"items":{"properties":{"name":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"klaviyo":{"type":"string"},"shopify":{"type":"string"}},"type":"object"},"PropertyList":{"items":{"$ref":"#/components/schemas/Property"},"type":"array"},"Property":{"properties":{"key":{"type":"string"},"type":{"enum":["string","number","boolean","datetime"],"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"integer"},{"type":"boolean"}]}},"required":["key","value"],"type":"object"},"JsonResponse":{"properties":{"message":{"type":"string"}},"type":"object"}}}}
```

{% content-ref url="/pages/IcwnXgdx8pFdtZgvqSKG" %}
[Subscriber Lists](/emotive-lists/reference/api-reference/subscriber-lists.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emotive.gitbook.io/emotive-lists/reference/api-reference/subscriber.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
