Skip to content

This page is available as Markdown at https://developers.klaviyo.com/en/v2025-01-15/reference/create_client_back_in_stock_subscription.md. An index of every page is at https://developers.klaviyo.com/llms.txt.

KlaviyoKlaviyoDevelopers
v2025-01-15

You're reading the reference for API revision 2025-01-15. The latest revision is 2026-10-15. See this page in the latest revision.

Create Client Back In Stock Subscription

POSThttps://a.klaviyo.com/client/back-in-stock-subscriptions

Subscribe a profile to receive back in stock notifications. Check out our Back in Stock API guide for more details.

This endpoint is specifically designed to be called from publicly-browseable, client-side environments only and requires a public API key (site ID). Never use a private API key with our client-side endpoints.

Do not use this endpoint from server-side applications. To create back in stock subscriptions from server-side applications, instead use POST /api/back-in-stock-subscriptions.

Revision header
revision: 2025-01-15required
Scopes
catalogs:writeprofiles:write
Authentication
Public API key (site ID), in the company_id query parameter
Rate limits
Burst: 350/sSteady: 3500/m

Query parameters

  • company_id#stringrequired

    Your Public API Key / Site ID. See this article for more details.

    Example: PUBLIC_API_KEY

Headers

  • revision#stringrequired

    API endpoint revision (format: YYYY-MM-DD[.suffix])

    2025-01-15

Request body

Content type: application/vnd.api+jsonrequired

  • data#objectrequired
    Show 3 fields
    • type#stringrequired
      Allowed values:
      • back-in-stock-subscription
    • attributes#objectrequired
      Show 2 fields
      • channels#string[]required

        The channel(s) through which the profile would like to receive the back in stock notification. This can be leveraged within a back in stock flow to notify the subscriber through their preferred channel(s).

        Allowed values:
        • EMAIL
        • PUSH
        • SMS
      • profile#objectrequired
        Show 1 field
        • data#objectrequired
          Show 3 fields
          • type#stringrequired
            Allowed values:
            • profile
          • id#stringnullable

            Primary key that uniquely identifies this profile. Generated by Klaviyo.

            Example: 01GDDKASAP8TKDDA2GRZDSVP4H

          • attributes#objectrequired
            Show 4 fields
            • email#stringnullable

              Individual's email address

              Example: sarah.mason@klaviyo-demo.com

            • phone_number#stringnullable

              Individual's phone number in E.164 format

              Example: +15005550006

            • external_id#stringnullable

              A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.

            • anonymous_id#stringnullable
    • relationships#objectrequired
      Show 1 field
      • variant#objectrequired
        Show 1 field
        • data#object
          Show 2 fields
          • type#stringrequired
            Allowed values:
            • catalog-variant
          • id#stringrequired

            The catalog variant ID for which the profile is subscribing to back in stock notifications. This ID is made up of the integration type, catalog ID, and and the external ID of the variant like so: integrationType:::catalogId:::externalId. If the integration you are using is not set up for multi-catalog storage, the 'catalogId' will be $default. For Shopify $shopify:::$default:::33001893429341

            Example: $custom:::$default:::SAMPLE-DATA-ITEM-1-VARIANT-MEDIUM

Responses

202Success

This response has no body.

4XXClient Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string

5XXServer Error

Content type: application/vnd.api+json

  • errors#object[]required
    Show 5 fields
    • id#stringrequired
    • code#stringrequired
    • title#stringrequired
    • detail#stringrequired
    • source#object
      Show 2 fields
      • pointer#string
      • parameter#string