---
updatedAt: 2026-06-24T20:38:40.000Z
agentTools:
  projectIndex: https://developers.postscript.io/llms.txt
---

# Create Subscriber

Create a single subscriber.

To find available keywords or inspect keyword replies, use [Get Keywords](https://developers.postscript.io/reference/get-keywords) endpoint.

**Note**

* Adding the field `shopify_customer_id` or `email` to the `subscriber` object will help Postscript identify which Shopify customer belongs to the phone number you are sending.

* The `tags` and `properties` fields will be stored on the subscriber, so those subscribers can later be filtered into segments using these values.

* You need to pass either a `keyword_id` or `keyword` body parameter when adding a subscriber.

* If adding a new subscriber, note that a subscriber does not become a full subscriber until *after* they have opted in. That means, you'll initially get back a pending subscriber id. This id cannot be used to fetch an active subscriber. To get the subscriber's id when they opt in, you'll need to set up a [webhook](https://developers.postscript.io/reference/create-webhook-subscription) to listen to our `shop.subscriber.opt_in` event and get it there.

> ❗️ Text Messaging Compliance
>
> All subscribers added using this endpoint will be required to confirm they have opted in to receive recurring automated messages. If a subscriber does not confirm, then they are not added to a merchant's subscriber list.
>
> For more information about compliance, see [our guide here](https://developers.postscript.io/docs/compliance).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "partner-api",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://api.postscript.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v2/subscribers": {
      "post": {
        "summary": "Create Subscriber",
        "description": "Create a single subscriber.",
        "operationId": "create-subscriber",
        "parameters": [
          {
            "name": "X-Postscript-Shop-Token",
            "in": "header",
            "description": "Shop API Token. **Required for partners**. This header should be used *only* by partners. Shops should include their API token in the *Authorization* header.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "keyword_id",
                  "keyword",
                  "phone_number"
                ],
                "properties": {
                  "keyword_id": {
                    "type": "string",
                    "description": "ID of the Keyword that the subscriber should be added to."
                  },
                  "keyword": {
                    "type": "string",
                    "description": "The Keyword to which the subscriber should be subscribed to."
                  },
                  "phone_number": {
                    "type": "string",
                    "description": "The phone number for the subscriber"
                  },
                  "origin": {
                    "type": "string",
                    "description": "Where the subscriber originated from.",
                    "default": "other",
                    "enum": [
                      "website",
                      "social",
                      "other"
                    ]
                  },
                  "shopify_customer_id": {
                    "type": "integer",
                    "description": "A reference to the Shopify Customer record for the subscriber",
                    "format": "int32"
                  },
                  "email": {
                    "type": "string",
                    "description": "In addition to storing an email on a subscriber, an email address is also used to look up a Shopify Customer record if `shopify_customer_id` isn't provided."
                  },
                  "tags": {
                    "type": "array",
                    "description": "An array of string tag values that can be used in user segmentation or filtering.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "properties": {
                    "type": "string",
                    "description": "Custom properties as key/value pairs. Values can be: strings, integers, string arrays, or ISO 8601 date(time). Subscribers can have up to 20 custom properties. If properties is unset or `null`, it will be ignored.",
                    "default": "{\"key\": \"value\"}",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"created_at\": \"2019-08-24T14:15:22Z\",\n  \"data\": {},\n  \"email\": \"string\",\n  \"id\": \"string\",\n  \"phone_number\": \"string\",\n \t\"properties\": {\n     \"has_purchased\": True,\n     \"days_since_purchase\": 5,\n     \"categories\": [\"Beauty\", \"Home Goods\"],\n     \"birthday\": \"1991-01-01\"\n  },\n  \"shopify_customer_id\": 0,\n  \"tags\": [\"VIP\"],\n  \"updated_at\": \"2019-08-24T14:15:22Z\"\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```