-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathopenapi.json
More file actions
9092 lines (9092 loc) · 285 KB
/
Copy pathopenapi.json
File metadata and controls
9092 lines (9092 loc) · 285 KB
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.3",
"info": {
"title": "Notifuse API",
"description": "API for Notifuse - a transactional email and newsletter management platform",
"version": "1.0.0",
"contact": {
"name": "Notifuse Support",
"url": "https://www.notifuse.com/support",
"email": "hello@notifuse.com"
}
},
"servers": [
{
"url": "https://{notifuseDomain}",
"description": "Customer-specific Notifuse API server",
"variables": {
"notifuseDomain": {
"description": "Your unique Notifuse domain",
"default": "demo.notifuse.com"
}
}
}
],
"paths": {
"/track": {
"post": {
"summary": "Ingest a web analytics beat",
"description": "Public collect endpoint used by the Notifuse Analytics browser SDK. Each beat carries the full cumulative session state (all pageviews and goals), so the server can rebuild the session from any single payload. Beats are typically sent as text/plain to avoid CORS preflights; the body is JSON regardless of Content-Type. Silently-dropped traffic (disabled feature, disallowed origin, bot user agents) still receives success responses.\n\nThe endpoint is public and unauthenticated, so the identity fields (contact_email + contact_email_hmac, or identify_token) are claims until they verify against the workspace secret. One that does not verify is not an error: the beat is recorded anonymously. A single malformed action is dropped the same way, leaving the rest of the beat intact.\n\nVerifying the credential is the FIRST of three gates, not the only one. An address that clears all three is attached to the session; failing any of them costs the identity alone, silently — the beat is still stored and the response is still a 200 with no error. Success and every failure are therefore indistinguishable on the wire:\n\n1. Signature (or token decryption) must verify against the workspace secret. The recipe is in the contact_email_hmac schema; getting the domain-separation prefix wrong is the usual cause.\n\n2. Rate limits, applied to the IDENTIFIED path only (anonymous traffic is the normal firehose and stays unthrottled) and before the contact lookup, so an abusive caller cannot spend database reads: 120 identified beats per minute per workspace + address, and 600 per minute per client IP (that one counted across all workspaces, since an office shares one IP) — both sized around the SDK's 10-30s heartbeat. Exceeding either is deliberately never a 429, which the SDK would only queue for a retry that cannot fix it.\n\n3. The address must ALREADY be a contact in the workspace. A signature proves who the caller is, never that the address belongs to anyone, so without this gate a workspace's own signing key could store the email of people who are not contacts, and erasure would be unenforceable — a deleted contact's next beat would re-stamp the address. The answer is cached for 60 seconds, so a freshly created contact can stay unidentified and a deleted one keep resolving for about that long.\n\nThis is why a correctly-signed beat for an address that is not a contact is indistinguishable from a bad signature: both return 200 and record the session anonymously.\n",
"operationId": "trackWebAnalyticsBeat",
"tags": [
"Web Analytics"
],
"security": [],
"requestBody": {
"required": true,
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/WebTrackPayload"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebTrackPayload"
}
}
}
},
"responses": {
"200": {
"description": "Beat accepted (or silently dropped)",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
}
}
}
}
},
"400": {
"description": "Malformed payload. The full set of causes: an unparseable body; a missing or blank workspace_id; a session_id that is not a UUIDv7 or whose embedded timestamp falls outside [now-48h, now+24h]; an updated_at more than 24h from server time; a negative seq; more actions than the schema's maxItems; a custom_1..custom_10 dimension value over 256 characters; or more than 50 dimension entries. Row building re-derives the session date from session_id and surfaces any failure the same way, which today can only be that same session_id rule.\n\nNever returned for an unverifiable, throttled or unknown identity, and never for a single out-of-range ACTION — that one action is dropped and the beat is kept. An oversized actions ARRAY is a different rule and IS a 400: see maxItems on the actions property.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
}
}
}
},
"413": {
"description": "Body over 1 MB. Distinguished from a 400 because it is the one failure the client can act on: actions[] only grows, so every later beat of that session fails too until it trims its oldest actions or rotates the session.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/api/workspaces.setWebAnalyticsSettings": {
"post": {
"summary": "Replace the workspace's web analytics settings",
"description": "Gated by the web_analytics write permission (like blog settings, members manage the feature without workspace write access). The attribution filters version is recomputed server-side. Passing null settings clears the configuration.\n\nWriting an identified visitor's goals and navigation to their contact timeline is not configured here and has no setting: calling identify() with an HMAC is the opt-in, because minting that credential requires the workspace secret.\n",
"operationId": "setWebAnalyticsSettings",
"tags": [
"Web Analytics"
],
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"workspace_id"
],
"properties": {
"workspace_id": {
"type": "string"
},
"settings": {
"$ref": "#/components/schemas/WebAnalyticsSettings"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Settings updated"
},
"400": {
"description": "Validation failed"
},
"403": {
"description": "The caller lacks web_analytics write, returned with the missing resource named in the error message."
}
}
}
},
"/api/webAnalytics.backfillStart": {
"post": {
"summary": "Start an attribution backfill",
"description": "Rewrites historical web_sessions and web_goals rows with the current attribution rules, one monthly partition per step. Fails while a run is already pending or running.\n",
"operationId": "webAnalyticsBackfillStart",
"tags": [
"Web Analytics"
],
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebAnalyticsBackfillRequest"
}
}
}
},
"responses": {
"200": {
"description": "Backfill task created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebAnalyticsBackfillResponse"
}
}
}
},
"400": {
"description": "A backfill is already in progress"
},
"403": {
"description": "Missing web_analytics write permission"
}
}
}
},
"/api/webAnalytics.backfillStatus": {
"post": {
"summary": "Get the latest backfill run",
"operationId": "webAnalyticsBackfillStatus",
"tags": [
"Web Analytics"
],
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebAnalyticsBackfillRequest"
}
}
}
},
"responses": {
"200": {
"description": "Latest run (null when none exists)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebAnalyticsBackfillResponse"
}
}
}
}
}
}
},
"/api/webAnalytics.backfillCancel": {
"post": {
"summary": "Cancel the in-flight backfill run",
"operationId": "webAnalyticsBackfillCancel",
"tags": [
"Web Analytics"
],
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebAnalyticsBackfillRequest"
}
}
}
},
"responses": {
"200": {
"description": "Run cancelled"
},
"400": {
"description": "No backfill in progress"
}
}
}
},
"/api/annotations.list": {
"get": {
"summary": "List annotations",
"description": "Returns the workspace's annotations, most recent moment first. Every filter is optional; with none the most recent 100 rows come back.\n\nGated by the web_analytics read permission, like the rest of the web analytics surface.\n",
"operationId": "listAnnotations",
"tags": [
"Web Analytics"
],
"security": [
{
"BearerAuth": []
}
],
"parameters": [
{
"name": "workspace_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the workspace",
"example": "ws_1234567890"
},
{
"name": "start",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
},
"description": "Only annotations at or after this instant. Must be RFC3339; a malformed value is a 400 rather than a dropped filter.",
"example": "2026-08-01T00:00:00Z"
},
{
"name": "end",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
},
"description": "Only annotations at or before this instant. Must be RFC3339.",
"example": "2026-08-31T23:59:59Z"
},
{
"name": "sources",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Comma-separated list of sources to keep. Any value outside `manual`/`broadcast` is a 400.",
"example": "manual,broadcast"
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"default": 100,
"maximum": 1000
},
"description": "Maximum rows to return. Values above the maximum are clamped to it rather than refused.",
"example": 100
}
],
"responses": {
"200": {
"description": "Annotations matching the filters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListAnnotationsResponse"
}
}
}
},
"400": {
"description": "Bad request - invalid query parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"missingWorkspaceId": {
"value": {
"error": "workspace_id is required"
}
},
"malformedStart": {
"value": {
"error": "start must be an RFC3339 timestamp"
}
},
"endBeforeStart": {
"value": {
"error": "invalid request: end must not be before start"
}
}
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing authentication token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden - missing required permission",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Insufficient permissions: read access to web analytics required"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Failed to list annotations"
}
}
}
}
}
}
},
"/api/annotations.get": {
"get": {
"summary": "Get an annotation",
"description": "Retrieves a single annotation by ID. Requires the web_analytics read permission.",
"operationId": "getAnnotation",
"tags": [
"Web Analytics"
],
"security": [
{
"BearerAuth": []
}
],
"parameters": [
{
"name": "workspace_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the workspace",
"example": "ws_1234567890"
},
{
"name": "id",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the annotation",
"example": "3f2504e04f8911d39a0c0305e82c3301"
}
],
"responses": {
"200": {
"description": "The annotation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnnotationResponse"
}
}
}
},
"400": {
"description": "Bad request - missing query parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "id is required"
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing authentication token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden - missing required permission",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Insufficient permissions: read access to web analytics required"
}
}
}
},
"404": {
"description": "No annotation with that ID in this workspace",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "annotation not found with ID: 3f2504e04f8911d39a0c0305e82c3301"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Failed to get annotation"
}
}
}
}
}
}
},
"/api/annotations.create": {
"post": {
"summary": "Create an annotation",
"description": "Creates a manual annotation. Requires the web_analytics write permission.\n\n`source` is always stored as `manual` and `source_id` is always empty: only the platform writes automatic rows, so there is no way to attach a caller-supplied key to one. **This endpoint is therefore not idempotent** — a retried call (a CI job re-running a deploy marker, for instance) writes a second annotation. De-duplicate on the caller's side, or delete the extra row.\n\nOmitted `color` and `timezone` are filled in server-side: the default colour, and the workspace timezone falling back to UTC.\n",
"operationId": "createAnnotation",
"tags": [
"Web Analytics"
],
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAnnotationRequest"
}
}
}
},
"responses": {
"201": {
"description": "Annotation created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnnotationResponse"
}
}
}
},
"400": {
"description": "Bad request - unparseable body, validation failed, or the instance runs in demo mode, where every mutating endpoint is closed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"invalidBody": {
"value": {
"error": "Invalid request body"
}
},
"missingTitle": {
"value": {
"error": "invalid request: title is required"
}
},
"invalidColor": {
"value": {
"error": "invalid request: color must be a hex color like #3b82f6"
}
},
"systemSource": {
"value": {
"error": "invalid request: source must be \"manual\""
}
},
"demoMode": {
"value": {
"error": "This operation is not allowed in demo mode"
}
}
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing authentication token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden - missing required permission",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Insufficient permissions: write access to web analytics required"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Failed to create annotation"
}
}
}
}
}
}
},
"/api/annotations.update": {
"post": {
"summary": "Update an annotation",
"description": "Edits an annotation's moment, timezone and presentation. Requires the web_analytics write permission.\n\nAutomatic annotations are editable — an operator may want to reword a broadcast's title — but their origin is not: `source` and `source_id` are reloaded from storage and carried forward, so an edit can neither promote a manual row to a system one nor take over another broadcast's slot.\n",
"operationId": "updateAnnotation",
"tags": [
"Web Analytics"
],
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateAnnotationRequest"
}
}
}
},
"responses": {
"200": {
"description": "Annotation updated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnnotationResponse"
}
}
}
},
"400": {
"description": "Bad request - unparseable body, validation failed, or the instance runs in demo mode.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"missingId": {
"value": {
"error": "invalid request: id is required"
}
},
"missingAnnotatedAt": {
"value": {
"error": "invalid request: annotated_at is required"
}
},
"demoMode": {
"value": {
"error": "This operation is not allowed in demo mode"
}
}
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing authentication token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden - missing required permission",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Insufficient permissions: write access to web analytics required"
}
}
}
},
"404": {
"description": "No annotation with that ID in this workspace",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "annotation not found with ID: 3f2504e04f8911d39a0c0305e82c3301"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Failed to update annotation"
}
}
}
}
}
}
},
"/api/annotations.delete": {
"post": {
"summary": "Delete an annotation",
"description": "Deletes an annotation, automatic ones included — a broadcast annotation cannot come back by accident, since its broadcast has already started. Requires the web_analytics write permission.\n",
"operationId": "deleteAnnotation",
"tags": [
"Web Analytics"
],
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteAnnotationRequest"
}
}
}
},
"responses": {
"200": {
"description": "Annotation deleted. A body rather than a 204, so a delete is never indistinguishable from a proxy swallowing the response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteAnnotationResponse"
}
}
}
},
"400": {
"description": "Bad request - unparseable body, missing id, or the instance runs in demo mode.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"missingId": {
"value": {
"error": "invalid request: id is required"
}
},
"demoMode": {
"value": {
"error": "This operation is not allowed in demo mode"
}
}
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing authentication token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"403": {
"description": "Forbidden - missing required permission",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Insufficient permissions: write access to web analytics required"
}
}
}
},
"404": {
"description": "No annotation with that ID in this workspace",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "annotation not found with ID: 3f2504e04f8911d39a0c0305e82c3301"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Failed to delete annotation"
}
}
}
}
}
}
},
"/api/transactional.send": {
"post": {
"summary": "Send a transactional notification",
"description": "Sends a transactional notification to a contact through specified channels.\nRequires authentication.\n",
"operationId": "sendTransactionalNotification",
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SendTransactionalRequest"
}
}
}
},
"responses": {
"200": {
"description": "Notification sent successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message_id": {
"type": "string",
"description": "Unique identifier for the sent message",
"example": "msg_1234567890abcdef"
},
"success": {
"type": "boolean",
"description": "Whether the notification was sent successfully",
"example": true
}
}
}
}
}
},
"400": {
"description": "Bad request - validation failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"notFoundExample": {
"value": {
"error": "Notification not found"
}
},
"inactiveExample": {
"value": {
"error": "Notification is not active"
}
},
"noChannelsExample": {
"value": {
"error": "No valid channels configured"
}
},
"validationExample": {
"value": {
"error": "notification.contact is required"
}
}
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing authentication token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Unauthorized"
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"example": {
"error": "Failed to send notification"
}
}
}
}
}
}
},
"/api/contacts.list": {
"get": {
"summary": "List contacts with filtering and pagination",
"description": "Retrieves a paginated list of contacts with optional filtering. All contact fields are always returned.\n\n**Filtering**: Use filters to search for contacts. Text filters (email, external_id, first_name, last_name, full_name, phone, country, language) use case-insensitive partial matching (ILIKE).\n\n**List filtering**: Use `list_id` and/or `contact_list_status` to filter contacts by list membership.\n\n**Segment filtering**: Use `segments[]` to filter contacts that belong to specific segments.\n\n**Contact lists**: By default, `contact_lists` is not included in the response. Set `with_contact_lists=true` to include the contact's list subscriptions.\n\n**Pagination**: Uses cursor-based pagination. Use the `next_cursor` from the response to fetch the next page.\n",
"operationId": "listContacts",
"security": [
{
"BearerAuth": []
}
],
"parameters": [
{
"name": "workspace_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the workspace",
"example": "ws_1234567890"
},
{
"name": "email",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Filter by email (case-insensitive partial match)",
"example": "user@example"
},
{
"name": "external_id",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Filter by external ID (case-insensitive partial match)",
"example": "user_123"
},
{
"name": "first_name",
"in": "query",
"required": false,
"schema": {