├── CHANGELOG.md
├── LICENSE
├── README.md
└── openapi
├── beta.json
└── stable.json
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | For our complete changelog, and more, see our [dev portal](https://developers.klaviyo.com/en/docs/changelog_):
2 |
3 | # Revision `2023-02-22`
4 | ### New endpoints
5 | * [Campaigns](ref:campaigns): Use our new Campaigns API endpoints to programmatically create, update, delete, and send email campaigns. See the API reference documentation for more info. We plan to introduce SMS support in the future.
6 |
7 | > ❗️ Breaking changes
8 | >
9 | > * Updated [Flows](ref:flows) endpoints to use cursor-based pagination. This change brings flows pagination to parity with our other API endpoints. You can learn more about cursor-based pagination in our [API Overview](ref:api_overview#pagination).
10 | > * Profile fields can now be nulled out by passing `null` into a profile field via the [Update Profile](ref:update_profile) endpoint.
11 |
12 | # Revision `2023-01-24`
13 |
14 | ### New endpoints
15 | * [Tags](ref:tags): Use our new Tags API endpoints to create, read, update, and delete tags on various Klaviyo objects such as campaigns, flows, lists and segments. See the API reference documentation for more info.
16 | * [Data Privacy - Request Profile Deletion](ref:data-privacy): Use our new Data Privacy - Request Profile Deletion API endpoint to delete profiles with a provided identifier (i.e. `profile_id`, `email`, `phone_number`). See the API reference documentation for more info.
17 |
18 | > ❗️ Breaking changes
19 | >
20 | > * Changed url path for [Create Template Render](ref:create_template_render) from `https://a.klaviyo.com/api/templates/{id}/render/` to `https://a.klaviyo.com/api/template-render/`
21 | > * Changed url path for [Create Template Clone](ref:create_template_clone) from `https://a.klaviyo.com/api/templates/{id}/clone/` to `https://a.klaviyo.com/api/template-clone/`
22 |
23 | *Update 2023-02-14*
24 | * The `price` field can now be optionally supplied in the payload for [Create Catalog Item](ref:create_catalog_item) and [Update Catalog Item](ref:update_catalog_item) endpoints. This field can be used to set the price on the catalog item.
25 |
26 | *Update 2023-02-07*
27 | * A `channels` object can now be optionally supplied in the payload for the [Subscribe Profiles](https://developers.klaviyo.com/en/v2023-01-24/reference/subscribe_profiles) endpoint. When `channels` is provided, only the specified channels and message types will be subscribed. If `channels` is not provided, we will subscribe all channels for which identifiers (i.e. `phone_number` or `email`) are provided.
28 |
29 | * The `profile_id` field can now be optionally supplied in the payload for the [Subscribe Profiles](https://developers.klaviyo.com/en/v2023-01-24/reference/subscribe_profiles) endpoint. This will be the id of the profile to subscribe.
30 |
31 | # Revision `2022-10-17`
32 | * Welcome to our new API changelog! This log will be kept up-to-date on the latest changes, bug fixes, and breaking changes to Klaviyo's APIs. Please note that this changelog only includes changes to new APIs released after **10/19/2022**.
33 | * For further information about revisions and breaking changes, please review the [API versioning & deprecation policy](doc:api_versioning_and_deprecation_policy).
34 | * Kickstart your migration to Klaviyo's new APIs with the [API comparison chart](doc:apis_comparison_chart), a detailed overview of what's changed from the v1/v2 endpoints to the new endpoints.
35 |
36 | *Update 2023-01-20*
37 |
38 | * The `list_id` attribute for the [Unsubscribe Profiles](ref:unsubscribe_profiles) endpoint is now an optional attribute instead of a required.
39 |
40 | *Update 2023-01-11*
41 |
42 | * The [Create Profile](ref:create_profile) and [Update Profile](ref:update_profile) endpoints now accept a phone number as an identifier even if SMS is not set up in the associated Klaviyo account. A successful call requires one other profile identifier attribute (`email`, `external_id`, or `anonymous_id`), in addition to a phone number.
43 |
44 | *Update 2022-12-19*
45 |
46 | * The reference documentation and OpenAPI Spec (OAS) for the [Create Template Render](ref:create_template_render) and [Create Template Clone](ref:create_template_clone) endpoints have been updated to reflect the correct required fields. This update resolves a minor bug in our documentation where a required field needed to call the endpoints successfully was missing. No changes have been made to these endpoints.
47 |
48 | *Update 2022-11-02*
49 |
50 | > ❗️ Breaking change
51 | >
52 | > * Removed the `updated` filter parameter from the [Get Profiles endpoint](ref:get_profiles). This filter parameter was not intended for GA release and is not officially supported.
53 | > * This change takes effect immediately due to site reliability concerns. Please refer to the [breaking change policy](doc:api_versioning_and_deprecation_policy#what-is-a-breaking-change) for more information.
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Klaviyo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Klaviyo's OpenAPI Specification
2 |
3 | This repo contains versioned copies of our [OpenAPI spec](openapi/stable.json).
4 |
5 | This is the same spec we use to generate our [API Docs](https://developers.klaviyo.com/en/reference/), as well as our latest [SDKs](https://developers.klaviyo.com/en/docs/sdk_overview).
6 |
7 | You can find the general spec (and soon, SDK/language-specific specs) in the `openapi` folder
8 |
9 | You can find our [LEGACY spec here](https://klaviyo-openapi.s3.amazonaws.com/spec.json).
10 |
--------------------------------------------------------------------------------
/openapi/beta.json:
--------------------------------------------------------------------------------
1 | {
2 | "openapi": "3.0.2",
3 | "info": {
4 | "title": "Klaviyo API (Beta)",
5 | "version": "2025-04-15.pre",
6 | "description": "The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.",
7 | "contact": {
8 | "name": "Klaviyo Developer Experience Team",
9 | "email": "developers@klaviyo.com",
10 | "url": "https://developers.klaviyo.com"
11 | },
12 | "termsOfService": "https://www.klaviyo.com/legal/api-terms",
13 | "license": {
14 | "name": "License",
15 | "url": "https://www.klaviyo.com/legal"
16 | }
17 | },
18 | "servers": [
19 | {
20 | "url": "https://a.klaviyo.com",
21 | "description": "Production"
22 | }
23 | ],
24 | "paths": {
25 | "/api/data-sources": {
26 | "get": {
27 | "operationId": "get_data_sources_beta",
28 | "summary": "Get Data Sources",
29 | "description": "\n > 🚧 This endpoint is in beta and subject to change.\n >\n > A beta revision header (2025-04-15.pre) is required to use our beta APIs. Klaviyo APIs in beta are not intended for use in production. See our [versioning and deprecation policy](https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy) for more information.\n \n\nGet all data sources in an account.\n\nCustom objects is a paid feature in Klaviyo, only available to customers with a paid email plan. To request access to custom objects, submit [this form](https://docs.google.com/forms/d/e/1FAIpQLScg1yZbkCpWnJCLTuaAJ_NkvecjSjVTBW55AWZst1yhobkbRg/viewform).
*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`custom-objects:read`",
30 | "parameters": [
31 | {
32 | "name": "fields[data-source]",
33 | "in": "query",
34 | "description": "For more information please visit https://developers.klaviyo.com/en/v2025-04-15.pre/reference/api-overview#sparse-fieldsets",
35 | "required": false,
36 | "schema": {
37 | "type": "array",
38 | "items": {
39 | "type": "string",
40 | "enum": [
41 | "title",
42 | "visibility",
43 | "description"
44 | ]
45 | }
46 | },
47 | "explode": false
48 | },
49 | {
50 | "name": "page[cursor]",
51 | "in": "query",
52 | "description": "For more information please visit https://developers.klaviyo.com/en/v2025-04-15.pre/reference/api-overview#pagination",
53 | "required": false,
54 | "schema": {
55 | "type": "string"
56 | }
57 | },
58 | {
59 | "name": "page[size]",
60 | "in": "query",
61 | "description": "Default: 20. Min: 1. Max: 100.",
62 | "required": false,
63 | "schema": {
64 | "type": "integer",
65 | "default": 20,
66 | "maximum": 100,
67 | "minimum": 1
68 | }
69 | },
70 | {
71 | "name": "revision",
72 | "in": "header",
73 | "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])",
74 | "required": true,
75 | "schema": {
76 | "type": "string",
77 | "default": "2025-04-15.pre"
78 | }
79 | }
80 | ],
81 | "responses": {
82 | "200": {
83 | "description": "Success",
84 | "content": {
85 | "application/vnd.api+json": {
86 | "schema": {
87 | "$ref": "#/components/schemas/GetDataSourceResponseCollection"
88 | }
89 | }
90 | }
91 | },
92 | "4XX": {
93 | "$ref": "#/components/responses/ClientError"
94 | },
95 | "5XX": {
96 | "$ref": "#/components/responses/ServerError"
97 | }
98 | },
99 | "tags": [
100 | "Beta APIs"
101 | ],
102 | "x-klaviyo-pre-release": "BETA",
103 | "x-klaviyo-ratelimit": {
104 | "burst": "3/s",
105 | "steady": "60/m"
106 | },
107 | "x-klaviyo-scopes": [
108 | "custom-objects:read"
109 | ],
110 | "x-klaviyo-subtag": "Custom Objects"
111 | },
112 | "post": {
113 | "operationId": "create_data_source_beta",
114 | "summary": "Create Data Source",
115 | "description": "\n > 🚧 This endpoint is in beta and subject to change.\n >\n > A beta revision header (2025-04-15.pre) is required to use our beta APIs. Klaviyo APIs in beta are not intended for use in production. See our [versioning and deprecation policy](https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy) for more information.\n \n\nCreate a new data source in an account\n\nCustom objects is a paid feature in Klaviyo, only available to customers with a paid email plan. To request access to custom objects, submit [this form](https://docs.google.com/forms/d/e/1FAIpQLScg1yZbkCpWnJCLTuaAJ_NkvecjSjVTBW55AWZst1yhobkbRg/viewform).
*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`custom-objects:write`",
116 | "parameters": [
117 | {
118 | "name": "revision",
119 | "in": "header",
120 | "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])",
121 | "required": true,
122 | "schema": {
123 | "type": "string",
124 | "default": "2025-04-15.pre"
125 | }
126 | }
127 | ],
128 | "requestBody": {
129 | "description": "Create data source",
130 | "required": true,
131 | "content": {
132 | "application/vnd.api+json": {
133 | "schema": {
134 | "$ref": "#/components/schemas/DataSourceCreateQuery"
135 | }
136 | }
137 | }
138 | },
139 | "responses": {
140 | "201": {
141 | "description": "Success",
142 | "content": {
143 | "application/vnd.api+json": {
144 | "schema": {
145 | "$ref": "#/components/schemas/PostDataSourceResponse"
146 | }
147 | }
148 | }
149 | },
150 | "4XX": {
151 | "$ref": "#/components/responses/ClientError"
152 | },
153 | "5XX": {
154 | "$ref": "#/components/responses/ServerError"
155 | }
156 | },
157 | "tags": [
158 | "Beta APIs"
159 | ],
160 | "x-klaviyo-pre-release": "BETA",
161 | "x-klaviyo-ratelimit": {
162 | "burst": "3/s",
163 | "steady": "60/m"
164 | },
165 | "x-klaviyo-scopes": [
166 | "custom-objects:write"
167 | ],
168 | "x-klaviyo-subtag": "Custom Objects"
169 | }
170 | },
171 | "/api/data-sources/{id}": {
172 | "get": {
173 | "operationId": "get_data_source_beta",
174 | "summary": "Get Data Source",
175 | "description": "\n > 🚧 This endpoint is in beta and subject to change.\n >\n > A beta revision header (2025-04-15.pre) is required to use our beta APIs. Klaviyo APIs in beta are not intended for use in production. See our [versioning and deprecation policy](https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy) for more information.\n \n\nRetrieve a data source in an account.\n\nCustom objects is a paid feature in Klaviyo, only available to customers with a paid email plan. To request access to custom objects, submit [this form](https://docs.google.com/forms/d/e/1FAIpQLScg1yZbkCpWnJCLTuaAJ_NkvecjSjVTBW55AWZst1yhobkbRg/viewform).
*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`custom-objects:read`",
176 | "parameters": [
177 | {
178 | "name": "id",
179 | "in": "path",
180 | "description": "The ID of the data source",
181 | "required": true,
182 | "schema": {
183 | "description": "The ID of the data source",
184 | "type": "string"
185 | }
186 | },
187 | {
188 | "name": "fields[data-source]",
189 | "in": "query",
190 | "description": "For more information please visit https://developers.klaviyo.com/en/v2025-04-15.pre/reference/api-overview#sparse-fieldsets",
191 | "required": false,
192 | "schema": {
193 | "type": "array",
194 | "items": {
195 | "type": "string",
196 | "enum": [
197 | "title",
198 | "visibility",
199 | "description"
200 | ]
201 | }
202 | },
203 | "explode": false
204 | },
205 | {
206 | "name": "revision",
207 | "in": "header",
208 | "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])",
209 | "required": true,
210 | "schema": {
211 | "type": "string",
212 | "default": "2025-04-15.pre"
213 | }
214 | }
215 | ],
216 | "responses": {
217 | "200": {
218 | "description": "Success",
219 | "content": {
220 | "application/vnd.api+json": {
221 | "schema": {
222 | "$ref": "#/components/schemas/GetDataSourceResponse"
223 | }
224 | }
225 | }
226 | },
227 | "4XX": {
228 | "$ref": "#/components/responses/ClientError"
229 | },
230 | "5XX": {
231 | "$ref": "#/components/responses/ServerError"
232 | }
233 | },
234 | "tags": [
235 | "Beta APIs"
236 | ],
237 | "x-klaviyo-pre-release": "BETA",
238 | "x-klaviyo-ratelimit": {
239 | "burst": "3/s",
240 | "steady": "60/m"
241 | },
242 | "x-klaviyo-scopes": [
243 | "custom-objects:read"
244 | ],
245 | "x-klaviyo-subtag": "Custom Objects"
246 | },
247 | "delete": {
248 | "operationId": "delete_data_source_beta",
249 | "summary": "Delete Data Source",
250 | "description": "\n > 🚧 This endpoint is in beta and subject to change.\n >\n > A beta revision header (2025-04-15.pre) is required to use our beta APIs. Klaviyo APIs in beta are not intended for use in production. See our [versioning and deprecation policy](https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy) for more information.\n \n\nDelete a data source in an account.\n\nCustom objects is a paid feature in Klaviyo, only available to customers with a paid email plan. To request access to custom objects, submit [this form](https://docs.google.com/forms/d/e/1FAIpQLScg1yZbkCpWnJCLTuaAJ_NkvecjSjVTBW55AWZst1yhobkbRg/viewform).
*Rate limits*:
Burst: `3/s`
Steady: `60/m`\n\n**Scopes:**\n`custom-objects:write`",
251 | "parameters": [
252 | {
253 | "name": "id",
254 | "in": "path",
255 | "description": "The ID of the data source to delete",
256 | "required": true,
257 | "schema": {
258 | "description": "The ID of the data source to delete",
259 | "type": "string"
260 | }
261 | },
262 | {
263 | "name": "revision",
264 | "in": "header",
265 | "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])",
266 | "required": true,
267 | "schema": {
268 | "type": "string",
269 | "default": "2025-04-15.pre"
270 | }
271 | }
272 | ],
273 | "responses": {
274 | "204": {
275 | "description": "Success"
276 | },
277 | "4XX": {
278 | "$ref": "#/components/responses/ClientError"
279 | },
280 | "5XX": {
281 | "$ref": "#/components/responses/ServerError"
282 | }
283 | },
284 | "tags": [
285 | "Beta APIs"
286 | ],
287 | "x-klaviyo-pre-release": "BETA",
288 | "x-klaviyo-ratelimit": {
289 | "burst": "3/s",
290 | "steady": "60/m"
291 | },
292 | "x-klaviyo-scopes": [
293 | "custom-objects:write"
294 | ],
295 | "x-klaviyo-subtag": "Custom Objects"
296 | }
297 | },
298 | "/api/data-source-record-bulk-create-jobs": {
299 | "post": {
300 | "operationId": "bulk_create_data_source_records_beta",
301 | "summary": "Bulk Create Data Source Records",
302 | "description": "\n > 🚧 This endpoint is in beta and subject to change.\n >\n > A beta revision header (2025-04-15.pre) is required to use our beta APIs. Klaviyo APIs in beta are not intended for use in production. See our [versioning and deprecation policy](https://developers.klaviyo.com/en/docs/api_versioning_and_deprecation_policy) for more information.\n \n\nCreate a data source record job.\n\nCustom objects is a paid feature in Klaviyo, only available to customers with a paid email plan. To request access to custom objects, submit [this form](https://docs.google.com/forms/d/e/1FAIpQLScg1yZbkCpWnJCLTuaAJ_NkvecjSjVTBW55AWZst1yhobkbRg/viewform).
*Rate limits*:
Burst: `3/s`
Steady: `15/m`\n\n**Scopes:**\n`custom-objects:write`",
303 | "parameters": [
304 | {
305 | "name": "revision",
306 | "in": "header",
307 | "description": "API endpoint revision (format: YYYY-MM-DD[.suffix])",
308 | "required": true,
309 | "schema": {
310 | "type": "string",
311 | "default": "2025-04-15.pre"
312 | }
313 | }
314 | ],
315 | "requestBody": {
316 | "description": "Create a data source record job",
317 | "required": true,
318 | "content": {
319 | "application/vnd.api+json": {
320 | "schema": {
321 | "$ref": "#/components/schemas/DataSourceRecordBulkCreateJobCreateQuery"
322 | }
323 | }
324 | }
325 | },
326 | "responses": {
327 | "202": {
328 | "description": "Success"
329 | },
330 | "4XX": {
331 | "$ref": "#/components/responses/ClientError"
332 | },
333 | "5XX": {
334 | "$ref": "#/components/responses/ServerError"
335 | }
336 | },
337 | "tags": [
338 | "Beta APIs"
339 | ],
340 | "x-klaviyo-operation-aliases": [
341 | "create_data_source_record_bulk_create_job"
342 | ],
343 | "x-klaviyo-pre-release": "BETA",
344 | "x-klaviyo-ratelimit": {
345 | "burst": "3/s",
346 | "steady": "15/m"
347 | },
348 | "x-klaviyo-scopes": [
349 | "custom-objects:write"
350 | ],
351 | "x-klaviyo-subtag": "Custom Objects"
352 | }
353 | }
354 | },
355 | "components": {
356 | "schemas": {
357 | "DataSourceEnum": {
358 | "type": "string",
359 | "enum": [
360 | "data-source"
361 | ]
362 | },
363 | "DataSourceResponseObjectResource": {
364 | "type": "object",
365 | "properties": {
366 | "type": {
367 | "$ref": "#/components/schemas/DataSourceEnum"
368 | },
369 | "id": {
370 | "description": "The ID of the data source",
371 | "type": "string",
372 | "example": "925e385b52fb405715f3616c337cc65c"
373 | },
374 | "attributes": {
375 | "type": "object",
376 | "properties": {
377 | "title": {
378 | "description": "The title of the data source",
379 | "type": "string",
380 | "example": "My Data Source"
381 | },
382 | "visibility": {
383 | "description": "The status of this data source",
384 | "type": "string",
385 | "enum": [
386 | "private",
387 | "shared"
388 | ]
389 | },
390 | "description": {
391 | "description": "The description of the data source",
392 | "type": "string",
393 | "example": "This is a data source"
394 | }
395 | },
396 | "required": [
397 | "title",
398 | "visibility",
399 | "description"
400 | ]
401 | },
402 | "links": {
403 | "$ref": "#/components/schemas/ObjectLinks"
404 | }
405 | },
406 | "required": [
407 | "type",
408 | "id",
409 | "attributes",
410 | "links"
411 | ]
412 | },
413 | "GetDataSourceResponseCollection": {
414 | "type": "object",
415 | "properties": {
416 | "data": {
417 | "type": "array",
418 | "items": {
419 | "$ref": "#/components/schemas/DataSourceResponseObjectResource"
420 | }
421 | },
422 | "links": {
423 | "$ref": "#/components/schemas/CollectionLinks"
424 | }
425 | },
426 | "required": [
427 | "data"
428 | ]
429 | },
430 | "GetDataSourceResponse": {
431 | "type": "object",
432 | "properties": {
433 | "data": {
434 | "$ref": "#/components/schemas/DataSourceResponseObjectResource"
435 | }
436 | },
437 | "required": [
438 | "data"
439 | ]
440 | },
441 | "DataSourceRecordEnum": {
442 | "type": "string",
443 | "enum": [
444 | "data-source-record"
445 | ]
446 | },
447 | "DataSourceRecordResourceObject": {
448 | "type": "object",
449 | "properties": {
450 | "type": {
451 | "$ref": "#/components/schemas/DataSourceRecordEnum"
452 | },
453 | "attributes": {
454 | "type": "object",
455 | "properties": {
456 | "record": {
457 | "type": "object"
458 | }
459 | },
460 | "required": [
461 | "record"
462 | ]
463 | }
464 | },
465 | "required": [
466 | "type",
467 | "attributes"
468 | ]
469 | },
470 | "DataSourceRecordBulkCreateJobEnum": {
471 | "type": "string",
472 | "enum": [
473 | "data-source-record-bulk-create-job"
474 | ]
475 | },
476 | "DataSourceRecordBulkCreateJobCreateQueryResourceObject": {
477 | "type": "object",
478 | "properties": {
479 | "type": {
480 | "$ref": "#/components/schemas/DataSourceRecordBulkCreateJobEnum"
481 | },
482 | "attributes": {
483 | "type": "object",
484 | "properties": {
485 | "data-source-records": {
486 | "description": "The records to ingest.",
487 | "type": "object",
488 | "example": {
489 | "data": [
490 | {
491 | "type": "data-source-record",
492 | "attributes": {
493 | "record": {
494 | "key1": "value1",
495 | "key2": "value2"
496 | }
497 | }
498 | }
499 | ]
500 | },
501 | "nullable": true,
502 | "properties": {
503 | "data": {
504 | "type": "array",
505 | "items": {
506 | "$ref": "#/components/schemas/DataSourceRecordResourceObject"
507 | }
508 | }
509 | },
510 | "required": [
511 | "data"
512 | ]
513 | }
514 | }
515 | },
516 | "relationships": {
517 | "type": "object",
518 | "properties": {
519 | "data-source": {
520 | "type": "object",
521 | "properties": {
522 | "data": {
523 | "type": "object",
524 | "properties": {
525 | "type": {
526 | "$ref": "#/components/schemas/DataSourceEnum"
527 | },
528 | "id": {
529 | "description": "The data source to which the records belong.",
530 | "type": "string",
531 | "example": "01J7C23V8XWMRG13FMD7VZN6GW"
532 | }
533 | },
534 | "required": [
535 | "type",
536 | "id"
537 | ]
538 | }
539 | }
540 | }
541 | }
542 | }
543 | },
544 | "required": [
545 | "type",
546 | "attributes"
547 | ]
548 | },
549 | "DataSourceRecordBulkCreateJobCreateQuery": {
550 | "type": "object",
551 | "properties": {
552 | "data": {
553 | "$ref": "#/components/schemas/DataSourceRecordBulkCreateJobCreateQueryResourceObject"
554 | }
555 | },
556 | "required": [
557 | "data"
558 | ]
559 | },
560 | "DataSourceCreateQueryResourceObject": {
561 | "type": "object",
562 | "properties": {
563 | "type": {
564 | "$ref": "#/components/schemas/DataSourceEnum"
565 | },
566 | "attributes": {
567 | "type": "object",
568 | "properties": {
569 | "title": {
570 | "type": "string"
571 | },
572 | "visibility": {
573 | "description": "Visibility of data source. Currently only PRIVATE is supported.",
574 | "type": "string",
575 | "enum": [
576 | "private",
577 | "shared"
578 | ]
579 | },
580 | "description": {
581 | "type": "string",
582 | "default": "",
583 | "nullable": true
584 | }
585 | },
586 | "required": [
587 | "title",
588 | "visibility"
589 | ]
590 | }
591 | },
592 | "required": [
593 | "type",
594 | "attributes"
595 | ]
596 | },
597 | "DataSourceCreateQuery": {
598 | "type": "object",
599 | "properties": {
600 | "data": {
601 | "$ref": "#/components/schemas/DataSourceCreateQueryResourceObject"
602 | }
603 | },
604 | "required": [
605 | "data"
606 | ]
607 | },
608 | "PostDataSourceResponse": {
609 | "type": "object",
610 | "properties": {
611 | "data": {
612 | "type": "object",
613 | "properties": {
614 | "type": {
615 | "$ref": "#/components/schemas/DataSourceEnum"
616 | },
617 | "id": {
618 | "description": "The ID of the data source",
619 | "type": "string",
620 | "example": "925e385b52fb405715f3616c337cc65c"
621 | },
622 | "attributes": {
623 | "type": "object",
624 | "properties": {
625 | "title": {
626 | "description": "The title of the data source",
627 | "type": "string",
628 | "example": "My Data Source"
629 | },
630 | "visibility": {
631 | "description": "The status of this data source",
632 | "type": "string",
633 | "enum": [
634 | "private",
635 | "shared"
636 | ]
637 | },
638 | "description": {
639 | "description": "The description of the data source",
640 | "type": "string",
641 | "example": "This is a data source"
642 | }
643 | },
644 | "required": [
645 | "title",
646 | "visibility",
647 | "description"
648 | ]
649 | },
650 | "links": {
651 | "$ref": "#/components/schemas/ObjectLinks"
652 | }
653 | },
654 | "required": [
655 | "type",
656 | "id",
657 | "attributes",
658 | "links"
659 | ]
660 | }
661 | },
662 | "required": [
663 | "data"
664 | ]
665 | },
666 | "CollectionLinks": {
667 | "type": "object",
668 | "properties": {
669 | "self": {
670 | "type": "string",
671 | "format": "uri"
672 | },
673 | "first": {
674 | "type": "string",
675 | "format": "uri"
676 | },
677 | "last": {
678 | "type": "string",
679 | "format": "uri"
680 | },
681 | "prev": {
682 | "type": "string",
683 | "format": "uri"
684 | },
685 | "next": {
686 | "type": "string",
687 | "format": "uri"
688 | }
689 | },
690 | "required": [
691 | "self"
692 | ]
693 | },
694 | "ObjectLinks": {
695 | "type": "object",
696 | "properties": {
697 | "self": {
698 | "type": "string",
699 | "format": "uri"
700 | }
701 | },
702 | "required": [
703 | "self"
704 | ]
705 | }
706 | },
707 | "responses": {
708 | "ClientError": {
709 | "description": "Client Error",
710 | "content": {
711 | "application/vnd.api+json": {
712 | "schema": {
713 | "type": "object",
714 | "properties": {
715 | "errors": {
716 | "type": "array",
717 | "items": {
718 | "type": "object",
719 | "required": [
720 | "id",
721 | "code",
722 | "title",
723 | "detail"
724 | ],
725 | "properties": {
726 | "id": {
727 | "type": "string"
728 | },
729 | "code": {
730 | "type": "string"
731 | },
732 | "title": {
733 | "type": "string"
734 | },
735 | "detail": {
736 | "type": "string"
737 | },
738 | "source": {
739 | "type": "object",
740 | "properties": {
741 | "pointer": {
742 | "type": "string"
743 | },
744 | "parameter": {
745 | "type": "string"
746 | }
747 | }
748 | }
749 | }
750 | }
751 | }
752 | },
753 | "required": [
754 | "errors"
755 | ]
756 | }
757 | }
758 | }
759 | },
760 | "ServerError": {
761 | "description": "Server Error",
762 | "content": {
763 | "application/vnd.api+json": {
764 | "schema": {
765 | "type": "object",
766 | "properties": {
767 | "errors": {
768 | "type": "array",
769 | "items": {
770 | "type": "object",
771 | "required": [
772 | "id",
773 | "code",
774 | "title",
775 | "detail"
776 | ],
777 | "properties": {
778 | "id": {
779 | "type": "string"
780 | },
781 | "code": {
782 | "type": "string"
783 | },
784 | "title": {
785 | "type": "string"
786 | },
787 | "detail": {
788 | "type": "string"
789 | },
790 | "source": {
791 | "type": "object",
792 | "properties": {
793 | "pointer": {
794 | "type": "string"
795 | },
796 | "parameter": {
797 | "type": "string"
798 | }
799 | }
800 | }
801 | }
802 | }
803 | }
804 | },
805 | "required": [
806 | "errors"
807 | ]
808 | }
809 | }
810 | }
811 | }
812 | },
813 | "securitySchemes": {
814 | "Klaviyo-API-Key": {
815 | "type": "apiKey",
816 | "in": "header",
817 | "name": "Authorization",
818 | "description": "Private key authentication for /api/ endpoints is performed by setting the `Authorization` header to `Klaviyo-API-Key your-private-api-key`
For more information please visit https://developers.klaviyo.com/en/v2025-04-15.pre/reference/api-overview#authentication",
819 | "x-default": "Klaviyo-API-Key your-private-api-key"
820 | }
821 | }
822 | },
823 | "tags": [
824 | {
825 | "name": "Accounts",
826 | "description": "accounts"
827 | },
828 | {
829 | "name": "Beta APIs",
830 | "description": "beta apis"
831 | },
832 | {
833 | "name": "Campaigns",
834 | "description": "campaigns"
835 | },
836 | {
837 | "name": "Catalogs",
838 | "description": "catalogs"
839 | },
840 | {
841 | "name": "Conversations",
842 | "description": "conversations"
843 | },
844 | {
845 | "name": "Coupons",
846 | "description": "coupons"
847 | },
848 | {
849 | "name": "Data Privacy",
850 | "description": "data privacy"
851 | },
852 | {
853 | "name": "Events",
854 | "description": "events"
855 | },
856 | {
857 | "name": "Flows",
858 | "description": "flows"
859 | },
860 | {
861 | "name": "Forms",
862 | "description": "forms"
863 | },
864 | {
865 | "name": "Images",
866 | "description": "images"
867 | },
868 | {
869 | "name": "Lists",
870 | "description": "lists"
871 | },
872 | {
873 | "name": "Metrics",
874 | "description": "metrics"
875 | },
876 | {
877 | "name": "Profiles",
878 | "description": "profiles"
879 | },
880 | {
881 | "name": "Reporting",
882 | "description": "reporting"
883 | },
884 | {
885 | "name": "Reviews",
886 | "description": "reviews"
887 | },
888 | {
889 | "name": "Segments",
890 | "description": "segments"
891 | },
892 | {
893 | "name": "Tags",
894 | "description": "tags"
895 | },
896 | {
897 | "name": "Templates",
898 | "description": "templates"
899 | },
900 | {
901 | "name": "Tracking Settings",
902 | "description": "tracking settings"
903 | },
904 | {
905 | "name": "Web Feeds",
906 | "description": "web feeds"
907 | },
908 | {
909 | "name": "Webhooks",
910 | "description": "webhooks"
911 | },
912 | {
913 | "name": "Client",
914 | "description": "client"
915 | }
916 | ],
917 | "security": [
918 | {
919 | "Klaviyo-API-Key": []
920 | }
921 | ],
922 | "x-readme": {
923 | "explorer-enabled": false,
924 | "proxy-enabled": true,
925 | "samples-enabled": true
926 | }
927 | }
--------------------------------------------------------------------------------