-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.json
6477 lines (6477 loc) · 501 KB
/
spec.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.0.0",
"info": {
"title": "Braze Endpoints",
"description": "# Braze API overview\n\nBraze provides a high-performance REST API to allow you to track users, send messages, export data, and more. This reference article covers what a REST API is, the terminology, a brief overview of API keys, and API limits.\n\nA REST API is a way to programmatically transfer information over the web using a predefined schema. Braze has created many different endpoints which perform various actions and/or return various data.\n\nBraze manages a number of different instances for our dashboard and REST Endpoints. When your account is provisioned you will log in to one of the following URLs. Use the correct REST endpoint based on which instance you are provisioned to. If you are unsure, open a [support ticket](https://www.braze.com/docs/braze_support/) or use the following table to match the URL of the dashboard you use to the correct REST Endpoint.\n\n> Customers using Braze’s EU database should use the `https://rest.fra-01.braze.eu/` endpoint. This endpoint will be used when configuring the Braze [iOS](https://www.braze.com/docs/developer_guide/platform_integration_guides/ios/initial_sdk_setup/completing_integration/#compile-time-endpoint-configuration-recommended), [Android](https://www.braze.com/docs/developer_guide/platform_integration_guides/android/initial_sdk_setup/android_sdk_integration/#step-2-configure-the-braze-sdk-in-brazexml), and [Web](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/initial_sdk_setup/#step-2-initialize-braze) SDKs.\n\n## Braze Instances\n\n| Instance | Dashboard URL | REST Endpoint |\n| --- | --- | --- |\n| US-01 | `https://dashboard.braze.com` or <br>`https://dashboard-01.braze.com` | `https://rest.iad-01.braze.com` |\n| US-02 | `https://dashboard-02.braze.com` | `https://rest.iad-02.braze.com` |\n| US-03 | `https://dashboard-03.braze.com` | `https://rest.iad-03.braze.com` |\n| US-04 | `https://dashboard-04.braze.com` | `https://rest.iad-04.braze.com` |\n| US-05 | `https://dashboard-05.braze.com` | `https://rest.iad-05.braze.com` |\n| US-06 | `https://dashboard-06.braze.com` | `https://rest.iad-06.braze.com` |\n| US-08 | `https://dashboard-08.braze.com` | `https://rest.iad-08.braze.com` |\n| EU-01 | `https://dashboard-01.braze.eu` | `https://rest.fra-01.braze.eu` |\n| EU-02 | `https://dashboard-02.braze.eu` | `https://rest.fra-02.braze.eu` |\n\n# Using Braze's Postman collection\n\nIf you have a Postman account (you can download macOS, Windows, and Linux versions from the [Postman website](https://www.getpostman.com/) ), you can open our Postman documentation in your own Postman app by clicking the orange **Run in Postman** button. You can then [create an environment](https://www.braze.com/docs/api/postman_collection/#setting-up-your-postman-environment), or use our Braze REST API environment as a template, and edit the available `POST` and `GET` requests to suit your own needs.\n\n## Setting up your Postman environment\n\nThe Braze Postman Collection uses a templating variable, `https://rest.example.braze.com`, to substitute the REST API URL of your Braze instance into the pre-built requests, and the `{{api_key}}` variable for your API Key. Rather than having to manually edit all requests in the Collection, you can set up this variable in your Postman environment. You can either select our templated environment (Braze REST API Environment Template) from the dropdown and replace the variable values with your own, or you can set up your own environment.\n\nTo set up your own environment, perform the following steps:\n\n1. From the **Workspaces** tab, select **Environments**.\n2. Click the **+** plus button to create a new environment.\n3. Give this environment a name (e.g., “Braze API Requests”) and add keys for `instance_url` and `api_key` with values corresponding to your [Braze instance](https://www.braze.com/docs/developer_guide/rest_api/basics/#endpoints) and [Braze REST API Key](https://www.braze.com/docs/api/api_key/).\n4. Click **Save**.\n \n\n## Using the pre-built requests from the collection\n\nOnce you have configured your environment. You can use any of the pre-built requests in the collection as a template for building new API requests. To start using one of the pre-built requests, click on it within the **Collections** menu of Postman. This will open the request as a new tab in the main window of the Postman app.\n\nIn general, there are two types of requests that Braze’s API endpoints accept - `GET` and `POST`. Depending on which `HTTP` method the endpoint uses, you’ll need to edit the pre-built request differently.\n\n### Edit a POST request\n\nWhen editing a `POST` request, open the request and navigate to the **Body** section in the request editor. For readability, select the **raw** radio button to format the `JSON` request body.\n\n### Edit a GET request\n\nWhen editing a `GET` request, edit the parameters passed in the request URL. To do so, select the **Params** tab and edit the key-value pairs in the fields that appear.\n\n## Send your request\n\nOnce your API request is ready, click **Send**. The request sends and the response data populates in a section underneath the request editor. From here, you can view the raw data returned from Braze’s API, see the HTTP response code, see how long the request took to process, and view header information.\n\nThe following documentation can be found on the Braze documentation site:\n\n* [Object & filter specifications](https://www.braze.com/docs/api/objects_filters/)\n* [API key overview](https://www.braze.com/docs/api/api_key/)\n* [API identifier types](https://www.braze.com/docs/api/identifier_types/)\n* [Errors & responses](https://www.braze.com/docs/api/errors/)\n* [Parameters](https://www.braze.com/docs/api/parameters)\n* [Data retention](https://www.braze.com/docs/api/data_retention/)\n* [API network connectivity issues](https://www.braze.com/docs/api/network_connectivity_issues)\n* [Rate limits](https://www.braze.com/docs/api/api_limits/)\n* [API campaigns](https://www.braze.com/docs/api/api_campaigns/)",
"version": "1.0.0"
},
"servers": [
{
"url": "https://rest.iad-01.braze.com",
"description": "REST endpoint for instance US-01"
},
{
"url": "https://rest.iad-01.braze.com",
"description": "REST endpoint for instance US-01"
},
{
"url": "https://rest.iad-02.braze.com",
"description": "REST endpoint for instance US-02"
},
{
"url": "https://rest.iad-03.braze.com",
"description": "REST endpoint for instance US-03"
},
{
"url": "https://rest.iad-04.braze.com",
"description": "REST endpoint for instance US-04"
},
{
"url": "https://rest.iad-05.braze.com",
"description": "REST endpoint for instance US-05"
},
{
"url": "https://rest.iad-06.braze.com",
"description": "REST endpoint for instance US-06"
},
{
"url": "https://rest.iad-08.braze.com",
"description": "REST endpoint for instance US-08"
},
{
"url": "https://rest.fra-01.braze.eu",
"description": "REST endpoint for instance EU-01"
},
{
"url": "https://rest.fra-02.braze.eu",
"description": "REST endpoint for instance EU-02"
}
],
"components": {
"responses": {
"BadRequest": {
"description": "400 Bad Request",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Error" }
}
}
},
"Unauthorized": {
"description": "401 Unauthorized",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Error" }
}
}
},
"Forbidden": {
"description": "403 Forbidden",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Error" }
}
}
},
"NotFound": {
"description": "404 Not Found",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Error" }
}
}
},
"TooManyRequests": {
"description": "429 Rate Limited",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Error" }
}
}
},
"InternalServerError": {
"description": "500 Internal Server Error",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/Error" }
}
}
}
},
"schemas": {
"Error": {
"type": "object",
"properties": {
"message": { "type": "string" },
"errors": { "type": "array", "items": { "type": "string" } }
}
}
},
"securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } }
},
"tags": [
{
"name": "Catalogs",
"description": "Use the Braze Catalogs Endpoints to add, edit, and manage your catalogs and catalog item details. You can use the asynchronous catalog endpoints to make bulk changes to your catalog.\n\nLooking for guidance on creating a catalog? Check out our article for [creating and using catalogs](https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/catalog/)."
},
{ "name": "Catalogs > Catalog Management" },
{ "name": "Catalogs > Catalog Management > Synchronous" },
{ "name": "Catalogs > Catalog Items" },
{ "name": "Catalogs > Catalog Items > Asynchronous" },
{ "name": "Catalogs > Catalog Items > Synchronous" },
{
"name": "Email Lists & Addresses",
"description": "Users’ email subscription status can be updated and retrieved via Braze using a RESTful API. You can use the API to set up bi-directional sync between Braze and other email systems or your own database."
},
{
"name": "Export",
"description": "With this collection of endpoints, you will be able to access and export various levels of details on your users, segments, campaigns, and Canvases. \n\nPlease be sure to reference the correct Instance when making API requests.\n\n"
},
{ "name": "Export > Campaign" },
{ "name": "Export > Canvas" },
{ "name": "Export > Custom Events" },
{ "name": "Export > KPI" },
{ "name": "Export > News Feed" },
{ "name": "Export > Purchases" },
{ "name": "Export > Segment" },
{ "name": "Export > Session Analytics" },
{ "name": "Export > Users" },
{
"name": "Messaging",
"description": "The Braze messaging API provides you with two distinct options for sending messages to your users. You can provide the message contents and configuration in the API request with the /messages/send and /messages/schedule endpoints. Alternatively, you can manage the details of your message with an API-Triggered Delivery campaign in the dashboard and just control when and to whom it is sent with the campaigns/trigger/send and campaigns/trigger/schedule endpoints. The following sections will detail the request specification for both methods.\n\nThe examples below contain the URL https://rest.iad-01.braze.com, but some customers will need to use a different endpoint URL, for example if you are hosted in Braze’s EU data center or have a dedicated Braze installation. Your Success Manager will inform you if you should use a different endpoint URL.\n\nSimilarly to other campaigns, you can limit the number of times a particular user can receive a Messaging API campaign by configuring re-eligibility settings in the Braze Dashboard. Braze will not deliver API messages to users that haven’t become re-eligible for the campaign regardless of how many API requests are sent.\n\n"
},
{ "name": "Messaging > Live Activities" },
{ "name": "Messaging > Schedule Mesages" },
{ "name": "Messaging > Send Messages" },
{ "name": "Preference Center" },
{ "name": "SCIM" },
{
"name": "SMS",
"description": "Use the Braze SMS Endpoints to manage your users’ phone numbers in your subscription groups."
},
{
"name": "Subscription Groups",
"description": "Use the Subscription Group REST APIs to programmatically manage the subscription groups that you have stored on the Braze dashboard, on the Subscription Group page."
},
{ "name": "Subscription Groups > Email" },
{ "name": "Subscription Groups > SMS and WhatsApp" },
{ "name": "Templates" },
{
"name": "Templates > Content Blocks",
"description": "Content Blocks are an Email Templating feature that allow you to: \n- Create a consistent look and feel to your Email campaigns using Content Blocks as Headers and Footers.\n- Distribute the same offer codes through different channels.\n- Create pre-defined assets that can be used to build messages with consistent information and assets.\n- Copy entire message bodies to other messages.\n\nYou can edit Content Blocks in the Templates & Media section of the Braze UI, or here, via API."
},
{ "name": "Templates > Email Templates" },
{
"name": "User Data",
"description": "The User API allows you to track information on your users by logging data about your users that comes from outside your mobile app. You can also use this API to delete users for testing or other purposes.\n\nAll API endpoints have a data payload limit of 4MB. Attempts to post more data than 4MB will fail with an HTTP 413 Request Entity Too Large.\n\nThe examples below contain the URL https://rest.iad-01.braze.com, but some customers will need to use a different endpoint URL, for example if you are hosted in Braze’s EU data center or have a dedicated Braze installation. Your Success Manager will inform you if you should use a different endpoint URL.\n\n"
},
{
"name": "User Data > External ID Migration",
"description": "The External ID Migration API allows you to rename existing external IDs (creating a new primary ID and deprecating the existing ID) and remove deprecated IDs post-migration. <br><br> We've architected this solution to allow multiple External IDs in order to support a migration period whereby older versions of your apps still in the wild that use the previous External ID naming schema don’t break. We highly recommend removing deprecated External IDs once your old naming schema is no longer in use."
}
],
"paths": {
"/templates/email/update": {
"post": {
"tags": ["Templates > Email Templates"],
"summary": "Update Email Template",
"description": "> Use this endpoint to update email templates on the Braze dashboard. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `templates.email.update` permission.\n\nYou can access an email template’s `email_template_id` by navigating to it on the **Templates & Media** page. The [Create email template endpoint](https://www.braze.com/docs/api/endpoints/templates/email_templates/post_create_email_template/) will also return an `email_template_id` reference.\n\nAll fields other than the `email_template_id` are optional, but you must specify at least one field to update.\n\n### Rate limit\n\nWe apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n### Request parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `email_template_id` | Required | String | Your [email template's API identifier](https://www.braze.com/docs/api/identifier_types/). |\n| `template_name` | Optional | String | Name of your email template. |\n| `subject` | Optional | String | Email template subject line. |\n| `body` | Optional | String | Email template body that may include HTML. |\n| `plaintext_body` | Optional | String | A plaintext version of the email template body. |\n| `preheader` | Optional | String | Email preheader used to generate previews in some clients. |\n| `tags` | Optional | String | [Tags](https://www.braze.com/docs/user_guide/administrative/app_settings/manage_app_group/tags/) must already exist. |\n| `should_inline_css` | Optional | Boolean | Enables or disables the `inline_css` feature per template. If not provided, Braze will use the default setting for the AppGroup. One of `true` or `false` is expected. |\n\n### Possible errors\n\nThe following table lists possible returned errors and their associated troubleshooting steps, if applicable.\n\n| Error | Troubleshooting |\n| --- | --- |\n| Template name is required | |\n| Tags must be an array | Tags must be formatted as an array of strings, for example `[\"marketing\", \"promotional\", \"transactional\"]`. |\n| All tags must be strings | Make sure your tags are encapsulated in quotes (`\"\"`). |\n| Some tags could not be found | To add a tag when creating an email template, the tag must already exist in Braze. |\n| Invalid value for `should_inline_css`. One of `true` or `false` was expected | This parameter only accepts boolean values (true or false). Make sure the value for `should_inline_css` is not encapsulated in quotes (`\"\"`), which causes the value to be sent as a string instead. |",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"example": {
"email_template_id": "email_template_id",
"template_name": "Weekly Newsletter",
"subject": "This Week's Styles",
"body": "Check out this week's digital lookbook to inspire your outfits. Take a look at https://www.braze.com/",
"plaintext_body": "This is the updated text within my email body and here is a link to https://www.braze.com/.",
"preheader": "We want you to have the best looks this Summer",
"tags": ["Tag1", "Tag2"]
},
"properties": {
"email_template_id": { "type": "string" },
"template_name": { "type": "string" },
"subject": { "type": "string" },
"body": { "type": "string" },
"plaintext_body": { "type": "string" },
"preheader": { "type": "string" },
"tags": { "type": "array", "items": { "type": "string" } }
}
}
}
}
},
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"201": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
}
},
"/users/track": {
"post": {
"tags": ["User Data"],
"summary": "Track Users",
"description": "> Use this endpoint to record custom events, purchases, and update user profile attributes. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `users.track` permission.\n\n**Note:** Braze processes the data passed via API at face value and customers should only pass deltas (changing data) to minimize unnecessary data point consumption. To read more, refer to [Data points](https://www.braze.com/docs/user_guide/onboarding_with_braze/data_points#data-points).\n\nCustomers using the API for server-to-server calls may need to allowlist `rest.iad-01.braze.com` if they’re behind a firewall.\n\n### Rate limit\n\nWe apply a base speed limit of 50,000 requests per minute to this endpoint for all customers. Each request to the `/users/track` endpoint can contain up to 75 events, 75 attribute updates, and 75 purchases. Each component (event, attribute, and purchase arrays), can update up to 75 users each for a max of 225 individual data points. Each update can also belong to the same user for a max of 225 updates to a single user in a request.\n\nSee our page on [API rate limits](https://www.braze.com/docs/api/api_limits/) for details, and reach out to your customer success manager if you need your limit increased.\n\n### Request parameters\n\nFor each of the request components listed in the following table, one of `external_id`, `user_alias`, or `braze_id` is required.\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `attributes` | Optional | Array of attributes objects | See [user attributes object](https://www.braze.com/docs/api/objects_filters/user_attributes_object/) |\n| `events` | Optional | Array of event objects | See [events object](https://www.braze.com/docs/api/objects_filters/event_object/) |\n| `purchases` | Optional | Array of purchase objects | See [purchases object](https://www.braze.com/docs/api/objects_filters/purchase_object/) |\n\n## User track responses\n\nUpon using any of the aforementioned API requests you should receive one of the following three general responses:\n\n#### Successful message\n\nSuccessful messages will be met with the following response:\n\n``` json\n{\n \"message\" : \"success\",\n \"attributes_processed\" : (optional, integer), if attributes are included in the request, this will return an integer of the number of external_ids with attributes that were queued to be processed,\n \"events_processed\" : (optional, integer), if events are included in the request, this will return an integer of the number of events that were queued to be processed,\n \"purchases_processed\" : (optional, integer), if purchases are included in the request, this will return an integer of the number of purchases that were queued to be processed,\n}\n\n```\n\n#### Successful message with non-fatal errors\n\nIf your message is successful but has non-fatal errors such as one invalid event object out of a long list of events, then you will receive the following response:\n\n``` json\n{\n \"message\" : \"success\",\n \"errors\" : [\n {\n }\n ]\n}\n\n```\n\n#### Message with fatal errors\n\nIn the case of a success, any data that was not affected by an error in the `errors` array will still be processed. If your message has a fatal error you will receive the following response:\n\n``` json\n{\n \"message\" : ,\n \"errors\" : [\n {\n }\n ]\n}\n\n```\n\n### Fatal error response codes\n\nFor status codes and associated error messages that will be returned if your request encounters a fatal error, reference [Fatal errors & responses](https://www.braze.com/api/errors/#fatal-errors).\n\nIf you receive the error “provided external_id is blacklisted and disallowed”, your request may have included a “dummy user”. For more information, refer to [Spam blocking](https://www.braze.com/docs/user_guide/data_and_analytics/user_data_collection/user_archival/#spam-blocking).\n\n### Creating an alias-only user profile\n\nKeep the following nuances in mind when using the `/users/track` endpoint:\n\nYou can use the `/users/track` endpoint to create a new alias-only user by setting the `_update_existing_only` key with a value of `false` in the body of the request. If this value is omitted, the alias-only user profile will not be created. Using an alias-only user guarantees that one profile with that alias will exist. This is especially helpful when building a new integration as it prevents the creation of duplicate user profiles.\n\n### Importing legacy user data\n\nYou may submit data through the Braze API for a user who has not yet used your mobile app in order to generate a user profile. If the user subsequently uses the application all information following their identification via the SDK will be merged with the existing user profile you created via the API call. Any user behavior that is recorded anonymously by the SDK prior to identification will be lost upon merging with the existing API-generated user profile.\n\nThe segmentation tool will include these users regardless of whether they have engaged with the app. If you want to exclude users uploaded via the User API who have not yet engaged with the app, simply add the filter: `Session Count > 0`.\n\n### Making bulk updates\n\nIf you have a use case where you need to make batch updates to the `users/track` endpoint, we recommend adding the bulk update header so that Braze can properly identify, observe, and route your request.\n\nRefer to the following sample request with the `X-Braze-Bulk` header:\n\n``` json\ncurl --location --request POST 'https://rest.iad-01.braze.com/users/track' \\\n--header 'Content-Type: application/json' \\\n--header 'X-Braze-Bulk: true' \\\n--header 'Authorization: Bearer YOUR-API-KEY-HERE' \\\n--data-raw '{ \"attributes\": [ ], \"events\": [ ], \"purchases\": [ ] }'\n\n```\n\nWarning: When the `X-Braze-Bulk` header is present with any value, Braze will consider the request a bulk request. Set the value to `true`. Currently, setting the value to `false` does not disable the header—it will still be treated as if it were true.\n\n#### Use cases\n\nConsider the following use cases where you may use the bulk update header:\n\n- A daily job where multiple users’ custom attributes are updated via the `/users/track` endpoint.\n- An ad-hoc user data backfill script which updates user information via the `/users/track` endpoint.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"example": {
"attributes": [
{
"external_id": "rachel_feinberg",
"string_attribute": "fruit",
"boolean_attribute_1": true,
"integer_attribute": 25,
"array_attribute": ["banana", "apple"]
}
],
"events": [
{
"external_id": "user_identifier",
"app_id": "your_app_identifier",
"name": "rented_movie",
"time": "2022-12-06T19:20:45+01:00",
"properties": {
"release": { "studio": "FilmStudio", "year": "2022" },
"cast": [{ "name": "Actor1" }, { "name": "Actor2" }]
}
},
{
"user_alias": {
"alias_name": "device123",
"alias_label": "my_device_identifier"
},
"app_id": "your_app_identifier",
"name": "rented_movie",
"time": "2013-07-16T19:20:50+01:00"
}
],
"purchases": [
{
"external_id": "user_identifier",
"app_id": "your_app_identifier",
"product_id": "product_name",
"currency": "USD",
"price": 12.12,
"quantity": 6,
"time": "2017-05-12T18:47:12Z",
"properties": {
"color": "red",
"monogram": "ABC",
"checkout_duration": 180,
"size": "Large",
"brand": "Backpack Locker"
}
}
]
},
"properties": {
"attributes": {
"type": "array",
"items": { "type": "object" }
},
"events": { "type": "array", "items": { "type": "object" } },
"purchases": {
"type": "array",
"items": { "type": "object" }
}
}
}
}
}
},
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"201": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
}
},
"/catalogs/{catalog_name}": {
"delete": {
"tags": ["Catalogs > Catalog Management > Synchronous"],
"summary": "Delete Catalog",
"description": "> Use this endpoint to delete a catalog. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.delete` permission.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 5 requests per minute between all synchronous catalog endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Path parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalog_name` | Required | String | Name of the catalog. |\n\n## Response\n\nThere are two status code responses for this endpoint: `200` and `404`.\n\n### Example success response\n\nThe status code `200` could return the following response body.\n\n``` json\n{\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `404` could return the following response body. Refer to [Troubleshooting](https://www.braze.com/docs/api/endpoints/catalogs/catalog_management/synchronous/delete_catalog/#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"catalog-not-found\",\n \"message\": \"Could not find catalog\",\n \"parameters\": [\n \"catalog_name\"\n ],\n \"parameter_values\": [\n \"restaurants\"\n ]\n }\n ],\n \"message\": \"Invalid Request\"\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `catalog-not-found` | Check that the catalog name is valid. |",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
},
{
"name": "catalog_name",
"in": "path",
"schema": { "type": "string" },
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
}
},
"/catalogs": {
"get": {
"tags": ["Catalogs > Catalog Management > Synchronous"],
"summary": "List Catalogs",
"description": "> Use this endpoint to return a list of catalogs in a workspace. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.get` permission.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 5 requests per minute between all synchronous catalog endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Path and request parameters\n\nThere are no path or request parameters for this endpoint.\n\n## Example request\n\n```\ncurl --location --request GET 'https://rest.iad-03.braze.com/catalogs' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY'\n\n```\n\n## Response\n\n### Example success response\n\nThe status code `200` could return the following response body.\n\n``` json\n{\n \"catalogs\": [\n {\n \"description\": \"My Restaurants\",\n \"fields\": [\n {\n \"name\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"Name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"City\",\n \"type\": \"string\"\n },\n {\n \"name\": \"Cuisine\",\n \"type\": \"string\"\n },\n {\n \"name\": \"Rating\",\n \"type\": \"number\"\n },\n {\n \"name\": \"Loyalty_Program\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"Created_At\",\n \"type\": \"time\"\n }\n ],\n \"name\": \"restaurants\",\n \"num_items\": 10,\n \"updated_at\": \"2022-11-02T20:04:06.879+00:00\"\n },\n {\n \"description\": \"My Catalog\",\n \"fields\": [\n {\n \"name\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"string_field\",\n \"type\": \"string\"\n },\n {\n \"name\": \"number_field\",\n \"type\": \"number\"\n },\n {\n \"name\": \"boolean_field\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"time_field\",\n \"type\": \"time\"\n },\n ],\n \"name\": \"my_catalog\",\n \"num_items\": 3,\n \"updated_at\": \"2022-11-02T09:03:19.967+00:00\"\n },\n ],\n \"message\": \"success\"\n}\n\n```",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
},
"post": {
"tags": ["Catalogs > Catalog Management > Synchronous"],
"summary": "Create Catalog",
"description": "> Use this endpoint to create a catalog. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.create` permission.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 5 requests per minute between all synchronous catalog endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Request parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalogs` | Required | Array | An array that contains catalog objects. Only one catalog object is allowed for this request. |\n\n### Catalog object parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `name` | Required | String | The name of the catalog that you want to create. |\n| `description` | Required | String | The description of the catalog that you want to create. |\n| `fields` | Required | Array | An array of objects where the object contains keys `name` and `type`. |\n\n## Example request\n\n```\ncurl --location --request POST 'https://rest.iad-03.braze.com/catalogs' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY' \\\n--data-raw '{\n \"catalogs\": [\n {\n \"name\": \"restaurants\",\n \"description\": \"My Restaurants\",\n \"fields\": [\n {\n \"name\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"Name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"City\",\n \"type\": \"string\"\n },\n {\n \"name\": \"Cuisine\",\n \"type\": \"string\"\n },\n {\n \"name\": \"Rating\",\n \"type\": \"number\"\n },\n {\n \"name\": \"Loyalty_Program\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"Created_At\",\n \"type\": \"time\"\n }\n ]\n }\n ]\n}'\n\n```\n\n## Response\n\nThere are two status code responses for this endpoint: `201` and `400`.\n\n### Example success response\n\nThe status code `201` could return the following response body.\n\n``` json\n{\n \"catalogs\": [\n {\n \"description\": \"My Restaurants\",\n \"fields\": [\n {\n \"name\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"Name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"City\",\n \"type\": \"string\"\n },\n {\n \"name\": \"Cuisine\",\n \"type\": \"string\"\n },\n {\n \"name\": \"Rating\",\n \"type\": \"number\"\n },\n {\n \"name\": \"Loyalty_Program\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"Created_At\",\n \"type\": \"time\"\n }\n ],\n \"name\": \"restaurants\",\n \"num_items\": 0,\n \"updated_at\": \"2022-11-02T20:04:06.879+00:00\"\n }\n ],\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"catalog-name-already-exists\",\n \"message\": \"A catalog with that name already exists\",\n \"parameters\": [\n \"name\"\n ],\n \"parameter_values\": [\n \"restaurants\"\n ]\n }\n ],\n \"message\": \"Invalid Request\"\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `catalog-array-invalid` | `catalogs` must be an array of objects. |\n| `catalog-name-already-exists` | Catalog with that name already exists. |\n| `catalog-name-too-large` | Character limit for a catalog name is 250. |\n| `description-too-long` | Character limit for description is 250. |\n| `field-names-not-unique` | The same field name is referenced twice. |\n| `field-names-too-large` | Character limit for a field name is 250. |\n| `id-not-first-column` | The `id` must be the first field in the array. Check that the type is a string. |\n| `invalid_catalog_name` | Catalog name can only include letters, numbers, hyphens, and underscores. |\n| `invalid-field-names` | Fields can only include letters, numbers, hyphens, and underscores. |\n| `invalid-field-types` | Make sure the field types are valid. |\n| `invalid-fields` | `fields` is not formatted correctly. |\n| `reached-company-catalogs-limit` | Maximum number of catalogs reached. Contact your Braze account manager for more information. |\n| `too-many-catalog-atoms` | You can only create one catalog per request. |\n| `too-many-fields` | Number of fields limit is 30. |",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"example": {
"catalogs": [
{
"name": "restaurants",
"description": "My Restaurants",
"fields": [{ "name": "id", "type": "string" }]
}
]
},
"properties": {
"catalogs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"description": { "type": "string" },
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"type": { "type": "string" }
}
}
}
}
}
}
}
}
}
}
},
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"201": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
}
},
"/catalogs/{catalog_name}/items": {
"delete": {
"tags": ["Catalogs > Catalog Items > Asynchronous"],
"summary": "Delete Multiple Catalog Items",
"description": "> Use this endpoint to delete multiple items in your catalog. \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.delete_items` permission.\n\nEach request can support up to 50 items. This endpoint is asynchronous.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 100 requests per minute between all asynchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Path parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalog_name` | Required | String | Name of the catalog. |\n\n## Request parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `items` | Required | Array | An array that contains item objects. The item objects should contain an `id` referencing the items Braze should delete. Up to 50 item objects are allowed per request. |\n\n## Example request\n\n```\ncurl --location --request DELETE 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY' \\\n--data-raw '{\n \"items\": [\n {\"id\": \"restaurant1\"},\n {\"id\": \"restaurant2\"},\n {\"id\": \"restaurant3\"}\n ]\n}'\n\n```\n\n## Response\n\nThere are three status code responses for this endpoint: `202`, `400`, and `404`.\n\n### Example success response\n\nThe status code `202` could return the following response body.\n\n``` json\n{\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"items-missing-ids\",\n \"message\": \"There are 1 item(s) that do not have ids\",\n \"parameters\": [],\n \"parameter_values\": []\n }\n ],\n \"message\": \"Invalid Request\",\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `catalog-not-found` | Check that the catalog name is valid. |\n| `ids-too-large` | Item IDs can't be more than 250 characters. |\n| `ids-not-unique` | Check that the item IDs are unique in the request. |\n| `ids-not-strings` | Item IDs must be of type string. |\n| `items-missing-ids` | There are items that do not have item IDs. Check that each item has an item ID. |\n| `invalid-ids` | Item IDs can only include letters, numbers, hyphens, and underscores. |\n| `request-includes-too-many-items` | Your request has too many items. The item limit per request is 50. |",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
},
{
"name": "catalog_name",
"in": "path",
"schema": { "type": "string" },
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
},
"patch": {
"tags": ["Catalogs > Catalog Items > Asynchronous"],
"summary": "Edit Multiple Catalog Items",
"description": "> Use this endpoint to delete multiple items in your catalog. \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.delete_items` permission.\n\nEach request can support up to 50 items. This endpoint is asynchronous.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 100 requests per minute between all asynchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Path parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalog_name` | Required | String | Name of the catalog. |\n\n## Request parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `items` | Required | Array | An array that contains item objects. The item objects should contain an `id` referencing the items Braze should delete. Up to 50 item objects are allowed per request. |\n\n## Example request\n\n```\ncurl --location --request DELETE 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY' \\\n--data-raw '{\n \"items\": [\n {\"id\": \"restaurant1\"},\n {\"id\": \"restaurant2\"},\n {\"id\": \"restaurant3\"}\n ]\n}'\n\n```\n\n## Response\n\nThere are three status code responses for this endpoint: `202`, `400`, and `404`.\n\n### Example success response\n\nThe status code `202` could return the following response body.\n\n``` json\n{\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"items-missing-ids\",\n \"message\": \"There are 1 item(s) that do not have ids\",\n \"parameters\": [],\n \"parameter_values\": []\n }\n ],\n \"message\": \"Invalid Request\",\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `catalog-not-found` | Check that the catalog name is valid. |\n| `ids-too-large` | Item IDs can't be more than 250 characters. |\n| `ids-not-unique` | Check that the item IDs are unique in the request. |\n| `ids-not-strings` | Item IDs must be of type string. |\n| `items-missing-ids` | There are items that do not have item IDs. Check that each item has an item ID. |\n| `invalid-ids` | Item IDs can only include letters, numbers, hyphens, and underscores. |\n| `request-includes-too-many-items` | Your request has too many items. The item limit per request is 50. |",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"example": { "items": [{ "id": "restaurant1" }] },
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": { "id": { "type": "string" } }
}
}
}
}
}
}
},
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
},
{
"name": "catalog_name",
"in": "path",
"schema": { "type": "string" },
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
},
"post": {
"tags": ["Catalogs > Catalog Items > Asynchronous"],
"summary": "Create Multiple Catalog Items",
"description": "> Use this endpoint to create multiple items in your catalog. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.add_items` permission.\n\nEach request can support up to 50 items. This endpoint is asynchronous.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 100 requests per minute between all asynchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Path parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalog_name` | Required | String | Name of the catalog. |\n\n## Request parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `items` | Required | Array | An array that contains item objects. The item objects should contain all of the fields in the catalog. Up to 50 item objects are allowed per request. |\n\n## Example request\n\n```\ncurl --location --request POST 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY' \\\n--data-raw '{\n \"items\": [\n {\n \"id\": \"restaurant1\",\n \"Name\": \"Restaurant1\",\n \"City\": \"New York\",\n \"Cuisine\": \"American\",\n \"Rating\": 5,\n \"Loyalty_Program\": true,\n \"Created_At\": \"2022-11-01T09:03:19.967+00:00\"\n },\n {\n \"id\": \"restaurant2\",\n \"Name\": \"Restaurant2\",\n \"City\": \"New York\",\n \"Cuisine\": \"American\",\n \"Rating\": 10,\n \"Loyalty_Program\": true,\n \"Created_At\": \"2022-11-02T09:03:19.967+00:00\"\n },\n {\n \"id\": \"restaurant3\",\n \"Name\": \"Restaurant3\",\n \"City\": \"New York\",\n \"Cuisine\": \"American\",\n \"Rating\": 3,\n \"Loyalty_Program\": false,\n \"Created_At\": \"2022-11-03T09:03:19.967+00:00\"\n }\n ]\n}'\n\n```\n\n## Response\n\nThere are three status code responses for this endpoint: `202`, `400`, and `404`.\n\n### Example success response\n\nThe status code `202` could return the following response body.\n\n``` json\n{\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"fields-do-not-match\",\n \"message\": \"Fields do not match with fields on the catalog\",\n \"parameters\": [\n \"id\"\n ],\n \"parameter_values\": [\n \"restaurant2\"\n ]\n }\n ],\n \"message\": \"Invalid Request\"\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `catalog-not-found` | Check that the catalog name is valid. |\n| `ids-not-strings` | Item IDs must be of type string. |\n| `ids-not-unique` | Item IDs must be unique in the request. |\n| `ids-too-large` | Item IDs can't be more than 250 characters. |\n| `invalid-ids` | Item IDs can only include letters, numbers, hyphens, and underscores. |\n| `invalid-fields` | Confirm that the fields in the request exist in the catalog. |\n| `invalid-keys-in-value-object` | Item object keys can't include `.` or `$`. |\n| `item-array-invalid` | `items` must be an array of objects. |\n| `items-missing-ids` | There are items that do not have item IDs. Check that each item has an item ID. |\n| `items-too-large` | Item values can't exceed 5,000 characters. |\n| `request-includes-too-many-items` | Your request has too many items. The item limit per request is 50. |\n| `too-deep-nesting-in-value-object` | Item objects can't have more than 50 levels of nesting. |\n| `unable-to-coerce-value` | Item types can't be converted. |",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"example": {
"items": [
{
"id": "restaurant1",
"Name": "Restaurant1",
"City": "New York",
"Cuisine": "American",
"Rating": 5,
"Loyalty_Program": true,
"Created_At": "2022-11-01T09:03:19.967+00:00"
}
]
},
"properties": {
"items": { "type": "array", "items": { "type": "object" } }
}
}
}
}
},
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
},
{
"name": "catalog_name",
"in": "path",
"schema": { "type": "string" },
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"201": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
},
"put": {
"tags": ["Catalogs > Catalog Items > Asynchronous"],
"summary": "Update Catalog Item",
"description": "> Use this endpoint to send Canvas messages via API-triggered delivery. \n \n\nTo use this endpoint, you'll need to generate an API key with the `catalogs.replace_item` permission.\n\nAPI-triggered Delivery allows you to store message content in the Braze dashboard while dictating when a message is sent, and to whom via your API.\n\nNote that to send messages with this endpoint, you must have a [Canvas ID](https://www.braze.com/docs/api/identifier_types/#canvas-api-identifier), created when you build a Canvas.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Request parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalog_name` | Required | String | Name of the catalog. |\n| `item_id` | Required | String | The ID of the catalog item. |\n\n## Request parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `items` | Required | Array | An array that contains item objects. The item objects should contain fields that exist in the catalog except for the `id` field. Only one item object is allowed per request. |\n\n## Example request\n\n## Response\n\nThere are three status code responses for this endpoint: `200`, `400`, and `404`.\n\n### Example success response\n\nThe status code `200` could return the following response body.\n\n``` json\n{\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"invalid-fields\",\n \"message\": \"Some of the fields given do not exist in the catalog\",\n \"parameters\": [\n \"id\"\n ],\n \"parameter_values\": [\n \"restaurant1\"\n ]\n }\n ],\n \"message\": \"Invalid Request\"\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `catalog_not_found` | Check that the catalog name is valid. | \n| `ids_not_string` | Confirm that each item ID is a string. |\n| `ids_not_unique` | Check that each item ID is unique. |\n| `ids_too_large` | Character limit for each item ID is 250 characters. |\n| `item_array_invalid` | `items` must be an array of objects. |\n| `items_missing_ids` | Confirm that each item has an ID. |\n| `items_too_large` | Item values can't exceed 5,000 characters. |\n| `invalid_ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |\n| `invalid_fields` | Confirm that the fields in the request exist in the catalog. |\n| `invalid_keys_in_value_object` | Item object keys can't include `.` or `$`. |\n| `too_deep_nesting_in_value_object` | Item objects can't have more than 50 levels of nesting. \n| `request_includes_too_many_items` | Your request has too many items. The item limit per request is 50. |\n| `unable_to_coerce_value` | Item types can't be converted. |",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"example": {
"items": [
{
"Name": "Restaurant",
"Loyalty_Program": false,
"Location": {
"Latitude": 33.6112,
"Longitude": -117.8711
},
"Open_Time": "2021-09-03T09:03:19.967+00:00"
}
]
},
"properties": {
"items": { "type": "array", "items": { "type": "object" } }
}
}
}
}
},
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
},
{
"name": "catalog_name",
"in": "path",
"schema": { "type": "string" },
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
},
"get": {
"tags": ["Catalogs > Catalog Items > Synchronous"],
"summary": "List Multiple Catalog Item Details",
"description": "> Use this endpoint to return multiple catalog items and their content. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.get_items` permission.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Path parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalog_name` | Required | String | Name of the catalog. |\n\n## Query parameters\n\nNote that each call to this endpoint will return 50 items. For a catalog with more than 50 items, use the `Link` header to retrieve the data on the next page as shown in the following example response.\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `cursor` | Optional | String | Determines the pagination of the catalog items. |\n\n## Example requests\n\n### Without cursor\n\n```\ncurl --location --request GET 'https://rest.iad-03.braze.com/catalogs/restaurants/items' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY'\n\n```\n\n### With cursor\n\n```\ncurl --location --request GET 'https://rest.iad-03.braze.com/catalogs/restaurants/items?cursor=c2tpcDow' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY'\n\n```\n\n## Response\n\nThere are three status code responses for this endpoint: `200`, `400`, and `404`.\n\n### Example success response\n\nThe status code `200` could return the following response header and body.\n\n{% alert note %} \nThe `Link` header won't exist if the catalog has less than or equal to 50 items. For calls without a cursor, `prev` will not show. When looking at the last page of items, `next` will not show. \n{% endalert %}\n\n```\nLink: ; rel=\"prev\",; rel=\"next\"\n\n```\n\n``` json\n{\n \"items\": [\n {\n \"id\": \"restaurant1\",\n \"Name\": \"Restaurant1\",\n \"City\": \"New York\",\n \"Cuisine\": \"American\",\n \"Rating\": 5,\n \"Loyalty_Program\": true,\n \"Open_Time\": \"2022-11-02T09:03:19.967Z\"\n },\n {\n \"id\": \"restaurant2\",\n \"Name\": \"Restaurant2\",\n \"City\": \"New York\",\n \"Cuisine\": \"American\",\n \"Rating\": 10,\n \"Loyalty_Program\": true,\n \"Open_Time\": \"2022-11-02T09:03:19.967Z\"\n },\n {\n \"id\": \"restaurant3\",\n \"Name\": \"Restaurant3\",\n \"City\": \"New York\",\n \"Cuisine\": \"American\",\n \"Rating\": 5,\n \"Loyalty_Program\": false,\n \"Open_Time\": \"2022-11-02T09:03:19.967Z\"\n }\n ],\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"invalid-cursor\",\n \"message\": \"'cursor' is not valid\",\n \"parameters\": [\n \"cursor\"\n ],\n \"parameter_values\": [\n \"bad-cursor\"\n ]\n }\n ],\n \"message\": \"Invalid Request\"\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `catalog-not-found` | Check that the catalog name is valid. |\n| `invalid-cursor` | Check that your `cursor` is valid. |",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
},
{
"name": "catalog_name",
"in": "path",
"schema": { "type": "string" },
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
}
},
"/catalogs/{catalog_name}/items/{item_id}": {
"delete": {
"tags": ["Catalogs > Catalog Items > Synchronous"],
"summary": "Delete a Catalog Item",
"description": "> Use this endpoint to delete an item in your catalog. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.delete_item` permission.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Path parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalog_name` | Required | String | Name of the catalog. |\n| `item_id` | Required | String | The ID of the catalog item. |\n\n## Request parameters\n\nThere is no request body for this endpoint.\n\n## Example request\n\n```\ncurl --location --request DELETE 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY'\n\n```\n\n## Response\n\nThere are three status code responses for this endpoint: `202`, `400`, and `404`.\n\n### Example success response\n\nThe status code `202` could return the following response body.\n\n``` json\n{\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"item-not-found\",\n \"message\": \"Could not find item\",\n \"parameters\": [\n \"item_id\"\n ],\n \"parameter_values\": [\n \"restaurant34\"\n ]\n }\n ],\n \"message\": \"Invalid Request\"\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `arbitrary-error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |\n| `catalog-not-found` | Check that the catalog name is valid. |\n| `item-not-found` | Check that the item to be deleted exists in your catalog. |",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
},
{
"name": "catalog_name",
"in": "path",
"schema": { "type": "string" },
"required": true
},
{
"name": "item_id",
"in": "path",
"schema": { "type": "string" },
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
},
"get": {
"tags": ["Catalogs > Catalog Items > Synchronous"],
"summary": "List Catalog Item Details",
"description": "> Use this endpoint to return a catalog item and its content. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.get_item` permission.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Path parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalog_name` | Required | String | Name of the catalog. |\n| `item_id` | Required | String | The ID of the catalog item. |\n\n## Request parameters\n\nThere is no request body for this endpoint.\n\n## Example request\n\n```\ncurl --location --request GET 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY'\n\n```\n\n## Response\n\nThere are two status code responses for this endpoint: `200` and `404`.\n\n### Example success response\n\nThe status code `200` could return the following response body.\n\n``` json\n{\n \"items\": [\n {\n \"id\": \"restaurant3\",\n \"Name\": \"Restaurant1\",\n \"City\": \"New York\",\n \"Cuisine\": \"American\",\n \"Rating\": 5,\n \"Loyalty_Program\": true,\n \"Open_Time\": \"2022-11-01T09:03:19.967Z\"\n }\n ],\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `404` could return the following response. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"item-not-found\",\n \"message\": \"Could not find item\",\n \"parameters\": [\n \"item_id\"\n ],\n \"parameter_values\": [\n \"restaurant34\"\n ]\n }\n ],\n \"message\": \"Invalid Request\"\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps, if applicable.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `catalog-not-found` | Check that the catalog name is valid. |\n| `item-not-found` | Check that the item is in the catalog. |",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
},
{
"name": "catalog_name",
"in": "path",
"schema": { "type": "string" },
"required": true
},
{
"name": "item_id",
"in": "path",
"schema": { "type": "string" },
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
},
"patch": {
"tags": ["Catalogs > Catalog Items > Synchronous"],
"summary": "Edit Catalog Items",
"description": "> Use this endpoint to edit an item in your catalog. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.update_item` permission.\n\n## Rate Limit\n\nThis endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Path parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalog_name` | Required | String | Name of the catalog. |\n| `item_id` | Required | String | The ID of the catalog item. |\n\n## Request parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `items` | Required | Array | An array that contains item objects. The item objects should contain fields that exist in the catalog except for the `id` field. Only one item object is allowed per request. |\n\n## Example request\n\n```\ncurl --location --request PATCH 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY' \\\n--data-raw '{\n \"items\": [\n {\n \"Name\": \"Restaurant\",\n \"Loyalty_Program\": false,\n \"Open_Time\": \"2021-09-03T09:03:19.967+00:00\"\n }\n ]\n}'\n\n```\n\n## Response\n\nThere are three status code responses for this endpoint: `200`, `400`, and `404`.\n\n### Example success response\n\nThe status code `200` could return the following response body.\n\n``` json\n{\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"invalid-fields\",\n \"message\": \"Some of the fields given do not exist in the catalog\",\n \"parameters\": [\n \"id\"\n ],\n \"parameter_values\": [\n \"restaurant1\"\n ]\n }\n ],\n \"message\": \"Invalid Request\"\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `arbitrary-error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |\n| `catalog-not-found` | Check that the catalog name is valid. |\n| `filtered-set-field-too-long` | The field value is being used in a filtered set that exceeds the character limit for an item. |\n| `id-in-body` | An item ID already exists in the catalog. |\n| `ids-too-large` | Character limit for each item ID is 250 characters. |\n| `invalid-ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |\n| `invalid-fields` | Confirm that the fields in the request exist in the catalog. |\n| `invalid-keys-in-value-object` | Item object keys can't include `.` or `$`. |\n| `item-not-found` | Check that the item is in the catalog. |\n| `item-array-invalid` | `items` must be an array of objects. |\n| `items-too-large` | Character limit for each item is 5,000 characters. |\n| `request-includes-too-many-items` | You can only edit one catalog item per request. |\n| `too-deep-nesting-in-value-object` | Item objects can't have more than 50 levels of nesting. |\n| `unable-to-coerce-value` | Item types can't be converted. |",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"example": {
"items": [
{
"Name": "Restaurant",
"Loyalty_Program": false,
"Open_Time": "2021-09-03T09:03:19.967+00:00"
}
]
},
"properties": {
"items": { "type": "array", "items": { "type": "object" } }
}
}
}
}
},
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
},
{
"name": "catalog_name",
"in": "path",
"schema": { "type": "string" },
"required": true
},
{
"name": "item_id",
"in": "path",
"schema": { "type": "string" },
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"400": { "$ref": "#/components/responses/BadRequest" },
"401": { "$ref": "#/components/responses/Unauthorized" },
"403": { "$ref": "#/components/responses/Forbidden" },
"404": { "$ref": "#/components/responses/NotFound" },
"429": { "$ref": "#/components/responses/TooManyRequests" },
"500": { "$ref": "#/components/responses/InternalServerError" }
}
},
"post": {
"tags": ["Catalogs > Catalog Items > Synchronous"],
"summary": "Create Catalog Item",
"description": "> Use this endpoint to create an item in your catalog. \n \n\nTo use this endpoint, you’ll need to generate an API key with the `catalogs.create_item` permission.\n\n## Rate limit\n\nThis endpoint has a shared rate limit of 50 requests per minute between all synchronous catalog item endpoints, as documented in [API rate limits](https://www.braze.com/docs/api/api_limits/).\n\n## Path parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `catalog_name` | Required | String | Name of the catalog. |\n| `item_id` | Required | String | The ID of the catalog item. |\n\n## Request parameters\n\n| Parameter | Required | Data Type | Description |\n| --- | --- | --- | --- |\n| `items` | Required | Array | An array that contains item objects. The item objects should contain all of the fields in the catalog except for the `id` field. Only one item object is allowed per request. |\n\n## Example Request\n\n```\ncurl --location --request POST 'https://rest.iad-03.braze.com/catalogs/restaurants/items/restaurant1' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer YOUR-REST-API-KEY' \\\n--data-raw '{\n \"items\": [\n {\n \"Name\": \"Restaurant1\",\n \"City\": \"New York\",\n \"Cuisine\": \"American\",\n \"Rating\": 5,\n \"Loyalty_Program\": true,\n \"Created_At\": \"2022-11-01T09:03:19.967+00:00\"\n }\n ]\n}'\n\n```\n\n## Response\n\nThere are three status code responses for this endpoint: `201`, `400`, and `404`.\n\n### Example success response\n\nThe status code `201` could return the following response body.\n\n``` json\n{\n \"message\": \"success\"\n}\n\n```\n\n### Example error response\n\nThe status code `400` could return the following response body. Refer to [Troubleshooting](#troubleshooting) for more information about errors you may encounter.\n\n``` json\n{\n \"errors\": [\n {\n \"id\": \"fields-do-not-match\",\n \"message\": \"Fields do not match with fields on the catalog\",\n \"parameters\": [\n \"id\"\n ],\n \"parameter_values\": [\n \"restaurant2\"\n ]\n }\n ],\n \"message\": \"Invalid Request\"\n}\n\n```\n\n## Troubleshooting\n\nThe following table lists possible returned errors and their associated troubleshooting steps.\n\n| Error | Troubleshooting |\n| --- | --- |\n| `already-reached-catalog-item-limit` | Maximum number of catalogs reached. Contact your Braze account manager for more information. |\n| `already-reached-company-item-limit` | Maximum number of catalog items reached. Contact your Braze account manager for more information. |\n| `arbitrary-error` | An arbitrary error occurred. Please try again or contact [Support](https://www.braze.com/docs/support_contact/). |\n| `catalog-not-found` | Check that the catalog name is valid. |\n| `filtered-set-field-too-long` | The field value is being used in a filtered set that exceeds the character limit for an item. |\n| `id-in-body` | Remove any item IDs in the request body. |\n| `ids-too-large` | Character limit for each item ID is 250 characters. |\n| `invalid-ids` | Supported characters for item ID names are letters, numbers, hyphens, and underscores. |\n| `invalid-fields` | Confirm that the fields in the request exist in the catalog. |\n| `invalid-keys-in-value-object` | Item object keys can't include `.` or `$`. |\n| `item-already-exists` | The item already exists in the catalog. |\n| `item-array-invalid` | `items` must be an array of objects. |\n| `items-too-large` | Character limit for each item is 5,000 characters. |\n| `request-includes-too-many-items` | You can only create one catalog item per request. |\n| `too-deep-nesting-in-value-object` | Item objects can't have more than 50 levels of nesting. |\n| `unable-to-coerce-value` | Item types can't be converted. |",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"example": {
"items": [
{
"Name": "Restaurant1",
"City": "New York",
"Cuisine": "American",
"Rating": 5,
"Loyalty_Program": true,
"Created_At": "2022-11-01T09:03:19.967+00:00"
}
]
},
"properties": {
"items": { "type": "array", "items": { "type": "object" } }
}
}
}
}
},
"parameters": [
{
"name": "Content-Type",
"in": "header",
"schema": { "type": "string" },
"example": "application/json"
},
{
"name": "Authorization",
"in": "header",
"schema": { "type": "string" },
"example": "Bearer {{api_key}}"
},
{
"name": "catalog_name",
"in": "path",
"schema": { "type": "string" },
"required": true
},
{
"name": "item_id",
"in": "path",
"schema": { "type": "string" },
"required": true
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": { "schema": { "type": "object" } }
}
},
"201": {
"description": "Successful response",
"content": {