Create Client Subscription
POSThttps://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). 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.
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-15required- Scopes
subscriptions:write- Authentication
- Public API key (site ID), in the
company_idquery parameter - Rate limits
- Burst:
100/sSteady:700/m
Query parameters
Your Public API Key / Site ID. See this article for more details.
Headers
API endpoint revision (format: YYYY-MM-DD[.suffix])
2025-01-15
Request body
Content type: application/vnd.api+jsonrequired
Show 3 fields
Show 2 fields
A custom method detail or source to store on the consent records for this subscription.
Show 1 field
Show 3 fields
Primary key that uniquely identifies this profile. Generated by Klaviyo.
Show 15 fields
Individual's email address
Individual's phone number in E.164 format
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.
Id that can be used to identify a profile when other identifiers are not available
Also known as the
exchange_id, this is an encrypted identifier used for identifying a profile by Klaviyo's web tracking.You can use this field as a filter when retrieving profiles via the Get Profiles endpoint.
Individual's first name
Individual's last name
Name of the company or organization within the company for whom the individual works
The locale of the profile, in the IETF BCP 47 language tag format like (ISO 639-1/2)-(ISO 3166 alpha-2)
Individual's job title
URL pointing to the location of a profile image
Show 10 fields
First line of street address
Second line of street address
City name
Country name
Latitude coordinate. We recommend providing a precision of four decimal places.
Longitude coordinate. We recommend providing a precision of four decimal places.
Region within a country, such as state or province
Zip code
Time zone name. We recommend using time zones from the IANA Time Zone Database.
IP Address
An object containing key/value pairs for any custom properties assigned to this profile
Enter valid JSON. Until you do, the example request uses the example value.
Show 1 field
Show 3 fields
Append a simple value or values to this property array
Enter valid JSON. Until you do, the example request uses the example value.
Remove a simple value or values from this property array
Enter valid JSON. Until you do, the example request uses the example value.
Remove a key or keys (and their values) completely from properties
Show 2 fields
Show 1 field
Show 2 fields
The Consent status to be set as part of the subscribe call. Currently supports "SUBSCRIBED".
The timestamp of when the profile's consent was gathered. This should only be used when syncing over historical consent info to Klaviyo; if the
historical_importflag is not included, providing any value for this field will raise an error.
Responses
202Success
This response has no body.
4XXClient Error
Content type: application/vnd.api+json
5XXServer Error
Content type: application/vnd.api+json