---
title: "Create Client Subscription"
description: "How to call Create Client Subscription (POST /client/subscriptions) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/v2025-01-15/reference/create_client_subscription"
revision: "2025-01-15"
latestUrl: "https://developers.klaviyo.com/en/reference/create_client_subscription"
operationId: "create_client_subscription"
method: "POST"
endpoint: "https://a.klaviyo.com/client/subscriptions"
authentication: "publicKey"
scopes: ["subscriptions:write"]
rateLimits: {"burst":"100/s","steady":"700/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
related: ["https://developers.klaviyo.com/en/v2025-01-15/reference/client/llms.txt","https://developers.klaviyo.com/en/v2025-01-15/reference/create_client_push_token.md","https://developers.klaviyo.com/en/v2025-01-15/reference/unregister_client_push_token.md","https://developers.klaviyo.com/en/v2025-01-15/reference/create_client_event.md","https://developers.klaviyo.com/en/v2025-01-15/reference/create_client_profile.md","https://developers.klaviyo.com/en/v2025-01-15/reference/bulk_create_client_events.md","https://developers.klaviyo.com/en/v2025-01-15/reference/create_client_back_in_stock_subscription.md"]
---

# Create Client Subscription

> This is the Markdown version of https://developers.klaviyo.com/en/v2025-01-15/reference/create_client_subscription

```http
POST https://a.klaviyo.com/client/subscriptions
```

Creates a subscription and consent record for email and/or SMS channels based on the provided `email` and `phone_number` attributes, respectively. One of either `email` or `phone_number` must be provided.

This endpoint is specifically designed to be called from publicly-browseable, client-side environments only and requires a [public API key (site ID)](https://www.klaviyo.com/settings/account/api-keys). Never use a private API key with our client-side endpoints.

Do not use this endpoint from server-side applications.
To subscribe profiles from server-side applications, instead use [POST /api/profile-subscription-bulk-create-jobs](https://developers.klaviyo.com/en/v2025-01-15/reference/bulk_subscribe_profiles.md).

Profiles can be opted into multiple channels: email marketing, SMS marketing, and SMS transactional. You can specify the channel(s) to subscribe the profile to by providing a subscriptions object in the profile attributes.

If you include a subscriptions object, only channels in that object will be subscribed.  You can use this to update `email` or `phone` on the profile without subscribing them, for example, by setting the profile property but omitting that channel in the subscriptions object. If a subscriptions object is not provided, subscriptions are defaulted to `MARKETING`.

- Revision header: `revision: 2025-01-15` (required)
- Scopes: `subscriptions:write`
- Authentication: Public API key (site ID), in the `company_id` query parameter
- Rate limits: Burst: `100/s`, Steady: `700/m`

## Example request

```bash
curl --request POST \
     --url 'https://a.klaviyo.com/client/subscriptions?company_id=PUBLIC_API_KEY' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2025-01-15' \
     --header 'content-type: application/vnd.api+json' \
     --data '{
  "data": {
    "type": "subscription",
    "attributes": {
      "custom_source": "Homepage footer signup form",
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "email": "sarah.mason@klaviyo-demo.com",
            "phone_number": "+15005550006",
            "anonymous_id": "01GDDKASAP8TKDDA2GRZDSVP4H",
            "first_name": "Sarah",
            "last_name": "Mason",
            "organization": "Example Corporation",
            "locale": "en-US",
            "title": "Regional Manager",
            "image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
            "properties": {
              "pseudonym": "Dr. Octopus"
            }
          }
        }
      }
    },
    "relationships": {
      "list": {}
    }
  }
}'
```

## Query parameters

- `company_id` (string, required): Your Public API Key / Site ID. See [this article](https://help.klaviyo.com/hc/en-us/articles/115005062267) for more details. Example: `PUBLIC_API_KEY`

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2025-01-15`

## Request body

Content type: `application/vnd.api+json` (required)

- `data` (object, required)
  - `type` (string, required): Allowed values: `subscription`
  - `attributes` (object, required)
    - `custom_source` (string, nullable): A custom method detail or source to store on the consent records for this subscription. Example: `Homepage footer signup form`
    - `profile` (object, required)
      - `data` (object, required): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.
  - `relationships` (object, required)
    - `list` (object, required)
      - `data` (object): Fields nested this deep aren't listed here; they're in the endpoint's OpenAPI document.

### Example request body

```json
{
  "data": {
    "type": "subscription",
    "attributes": {
      "custom_source": "Homepage footer signup form",
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "email": "sarah.mason@klaviyo-demo.com",
            "phone_number": "+15005550006",
            "anonymous_id": "01GDDKASAP8TKDDA2GRZDSVP4H",
            "first_name": "Sarah",
            "last_name": "Mason",
            "organization": "Example Corporation",
            "locale": "en-US",
            "title": "Regional Manager",
            "image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
            "properties": {
              "pseudonym": "Dr. Octopus"
            }
          }
        }
      }
    },
    "relationships": {
      "list": {}
    }
  }
}
```

## Responses

### 202: Success

This response has no body.

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
