@unsent/sdk 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1602 -632
- package/dist/index.d.ts +1602 -632
- package/dist/index.js +231 -2
- package/dist/index.mjs +226 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -11,13 +11,17 @@ type ErrorResponse = {
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
interface paths {
|
|
14
|
-
"/v1/
|
|
14
|
+
"/v1/health": {
|
|
15
15
|
parameters: {
|
|
16
16
|
query?: never;
|
|
17
17
|
header?: never;
|
|
18
18
|
path?: never;
|
|
19
19
|
cookie?: never;
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Health Check
|
|
23
|
+
* @description Check if the API is running correctly
|
|
24
|
+
*/
|
|
21
25
|
get: {
|
|
22
26
|
parameters: {
|
|
23
27
|
query?: never;
|
|
@@ -27,82 +31,52 @@ interface paths {
|
|
|
27
31
|
};
|
|
28
32
|
requestBody?: never;
|
|
29
33
|
responses: {
|
|
30
|
-
/** @description
|
|
34
|
+
/** @description API is healthy */
|
|
31
35
|
200: {
|
|
32
36
|
headers: {
|
|
33
37
|
[name: string]: unknown;
|
|
34
38
|
};
|
|
35
39
|
content: {
|
|
36
40
|
"application/json": {
|
|
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
|
-
* @example TXT
|
|
77
|
-
* @enum {string}
|
|
78
|
-
*/
|
|
79
|
-
type: "MX" | "TXT";
|
|
80
|
-
/**
|
|
81
|
-
* @description DNS record name
|
|
82
|
-
* @example mail
|
|
83
|
-
*/
|
|
84
|
-
name: string;
|
|
85
|
-
/**
|
|
86
|
-
* @description DNS record value
|
|
87
|
-
* @example v=spf1 include:amazonses.com ~all
|
|
88
|
-
*/
|
|
89
|
-
value: string;
|
|
90
|
-
/**
|
|
91
|
-
* @description DNS record TTL
|
|
92
|
-
* @example Auto
|
|
93
|
-
*/
|
|
94
|
-
ttl: string;
|
|
95
|
-
/**
|
|
96
|
-
* @description DNS record priority
|
|
97
|
-
* @example 10
|
|
98
|
-
*/
|
|
99
|
-
priority?: string | null;
|
|
100
|
-
/** @enum {string} */
|
|
101
|
-
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
|
102
|
-
/** @description Whether the record is recommended */
|
|
103
|
-
recommended?: boolean;
|
|
104
|
-
}[];
|
|
105
|
-
}[];
|
|
41
|
+
status: string;
|
|
42
|
+
uptime: number;
|
|
43
|
+
timestamp: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
put?: never;
|
|
50
|
+
post?: never;
|
|
51
|
+
delete?: never;
|
|
52
|
+
options?: never;
|
|
53
|
+
head?: never;
|
|
54
|
+
patch?: never;
|
|
55
|
+
trace?: never;
|
|
56
|
+
};
|
|
57
|
+
"/v1/api-keys": {
|
|
58
|
+
parameters: {
|
|
59
|
+
query?: never;
|
|
60
|
+
header?: never;
|
|
61
|
+
path?: never;
|
|
62
|
+
cookie?: never;
|
|
63
|
+
};
|
|
64
|
+
get: {
|
|
65
|
+
parameters: {
|
|
66
|
+
query?: never;
|
|
67
|
+
header?: never;
|
|
68
|
+
path?: never;
|
|
69
|
+
cookie?: never;
|
|
70
|
+
};
|
|
71
|
+
requestBody?: never;
|
|
72
|
+
responses: {
|
|
73
|
+
/** @description List API Keys */
|
|
74
|
+
200: {
|
|
75
|
+
headers: {
|
|
76
|
+
[name: string]: unknown;
|
|
77
|
+
};
|
|
78
|
+
content: {
|
|
79
|
+
"application/json": unknown[];
|
|
106
80
|
};
|
|
107
81
|
};
|
|
108
82
|
};
|
|
@@ -115,91 +89,26 @@ interface paths {
|
|
|
115
89
|
path?: never;
|
|
116
90
|
cookie?: never;
|
|
117
91
|
};
|
|
118
|
-
requestBody
|
|
92
|
+
requestBody?: {
|
|
119
93
|
content: {
|
|
120
94
|
"application/json": {
|
|
121
95
|
name: string;
|
|
122
|
-
|
|
96
|
+
/**
|
|
97
|
+
* @default FULL
|
|
98
|
+
* @enum {string}
|
|
99
|
+
*/
|
|
100
|
+
permission?: "FULL" | "SENDING";
|
|
123
101
|
};
|
|
124
102
|
};
|
|
125
103
|
};
|
|
126
104
|
responses: {
|
|
127
|
-
/** @description Create
|
|
105
|
+
/** @description Create API Key */
|
|
128
106
|
200: {
|
|
129
107
|
headers: {
|
|
130
108
|
[name: string]: unknown;
|
|
131
109
|
};
|
|
132
110
|
content: {
|
|
133
|
-
"application/json":
|
|
134
|
-
/**
|
|
135
|
-
* @description The ID of the domain
|
|
136
|
-
* @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
|
|
137
|
-
*/
|
|
138
|
-
id: string;
|
|
139
|
-
/**
|
|
140
|
-
* @description The name of the domain
|
|
141
|
-
* @example example.com
|
|
142
|
-
*/
|
|
143
|
-
name: string;
|
|
144
|
-
/**
|
|
145
|
-
* @description The ID of the team
|
|
146
|
-
* @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
|
|
147
|
-
*/
|
|
148
|
-
teamId: string;
|
|
149
|
-
/** @enum {string} */
|
|
150
|
-
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
|
151
|
-
/** @default us-east-1 */
|
|
152
|
-
region: string;
|
|
153
|
-
/** @default false */
|
|
154
|
-
clickTracking: boolean;
|
|
155
|
-
/** @default false */
|
|
156
|
-
openTracking: boolean;
|
|
157
|
-
publicKey: string;
|
|
158
|
-
dkimStatus?: string | null;
|
|
159
|
-
spfDetails?: string | null;
|
|
160
|
-
createdAt: string;
|
|
161
|
-
updatedAt: string;
|
|
162
|
-
/** @default false */
|
|
163
|
-
dmarcAdded: boolean;
|
|
164
|
-
/** @default false */
|
|
165
|
-
isVerifying: boolean;
|
|
166
|
-
errorMessage?: string | null;
|
|
167
|
-
subdomain?: string | null;
|
|
168
|
-
verificationError?: string | null;
|
|
169
|
-
lastCheckedTime?: string | null;
|
|
170
|
-
dnsRecords: {
|
|
171
|
-
/**
|
|
172
|
-
* @description DNS record type
|
|
173
|
-
* @example TXT
|
|
174
|
-
* @enum {string}
|
|
175
|
-
*/
|
|
176
|
-
type: "MX" | "TXT";
|
|
177
|
-
/**
|
|
178
|
-
* @description DNS record name
|
|
179
|
-
* @example mail
|
|
180
|
-
*/
|
|
181
|
-
name: string;
|
|
182
|
-
/**
|
|
183
|
-
* @description DNS record value
|
|
184
|
-
* @example v=spf1 include:amazonses.com ~all
|
|
185
|
-
*/
|
|
186
|
-
value: string;
|
|
187
|
-
/**
|
|
188
|
-
* @description DNS record TTL
|
|
189
|
-
* @example Auto
|
|
190
|
-
*/
|
|
191
|
-
ttl: string;
|
|
192
|
-
/**
|
|
193
|
-
* @description DNS record priority
|
|
194
|
-
* @example 10
|
|
195
|
-
*/
|
|
196
|
-
priority?: string | null;
|
|
197
|
-
/** @enum {string} */
|
|
198
|
-
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
|
199
|
-
/** @description Whether the record is recommended */
|
|
200
|
-
recommended?: boolean;
|
|
201
|
-
}[];
|
|
202
|
-
};
|
|
111
|
+
"application/json": Record<string, never>;
|
|
203
112
|
};
|
|
204
113
|
};
|
|
205
114
|
};
|
|
@@ -210,7 +119,7 @@ interface paths {
|
|
|
210
119
|
patch?: never;
|
|
211
120
|
trace?: never;
|
|
212
121
|
};
|
|
213
|
-
"/v1/
|
|
122
|
+
"/v1/api-keys/{id}": {
|
|
214
123
|
parameters: {
|
|
215
124
|
query?: never;
|
|
216
125
|
header?: never;
|
|
@@ -218,7 +127,9 @@ interface paths {
|
|
|
218
127
|
cookie?: never;
|
|
219
128
|
};
|
|
220
129
|
get?: never;
|
|
221
|
-
put
|
|
130
|
+
put?: never;
|
|
131
|
+
post?: never;
|
|
132
|
+
delete: {
|
|
222
133
|
parameters: {
|
|
223
134
|
query?: never;
|
|
224
135
|
header?: never;
|
|
@@ -229,49 +140,23 @@ interface paths {
|
|
|
229
140
|
};
|
|
230
141
|
requestBody?: never;
|
|
231
142
|
responses: {
|
|
232
|
-
/** @description
|
|
143
|
+
/** @description Delete API Key */
|
|
233
144
|
200: {
|
|
234
145
|
headers: {
|
|
235
146
|
[name: string]: unknown;
|
|
236
147
|
};
|
|
237
148
|
content: {
|
|
238
|
-
"application/json":
|
|
239
|
-
message: string;
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
/** @description Forbidden - API key doesn't have access to this domain */
|
|
244
|
-
403: {
|
|
245
|
-
headers: {
|
|
246
|
-
[name: string]: unknown;
|
|
247
|
-
};
|
|
248
|
-
content: {
|
|
249
|
-
"application/json": {
|
|
250
|
-
error: string;
|
|
251
|
-
};
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
/** @description Domain not found */
|
|
255
|
-
404: {
|
|
256
|
-
headers: {
|
|
257
|
-
[name: string]: unknown;
|
|
258
|
-
};
|
|
259
|
-
content: {
|
|
260
|
-
"application/json": {
|
|
261
|
-
error: string;
|
|
262
|
-
};
|
|
149
|
+
"application/json": Record<string, never>;
|
|
263
150
|
};
|
|
264
151
|
};
|
|
265
152
|
};
|
|
266
153
|
};
|
|
267
|
-
post?: never;
|
|
268
|
-
delete?: never;
|
|
269
154
|
options?: never;
|
|
270
155
|
head?: never;
|
|
271
156
|
patch?: never;
|
|
272
157
|
trace?: never;
|
|
273
158
|
};
|
|
274
|
-
"/v1/
|
|
159
|
+
"/v1/settings": {
|
|
275
160
|
parameters: {
|
|
276
161
|
query?: never;
|
|
277
162
|
header?: never;
|
|
@@ -282,144 +167,66 @@ interface paths {
|
|
|
282
167
|
parameters: {
|
|
283
168
|
query?: never;
|
|
284
169
|
header?: never;
|
|
285
|
-
path
|
|
286
|
-
id: string;
|
|
287
|
-
};
|
|
170
|
+
path?: never;
|
|
288
171
|
cookie?: never;
|
|
289
172
|
};
|
|
290
173
|
requestBody?: never;
|
|
291
174
|
responses: {
|
|
292
|
-
/** @description
|
|
175
|
+
/** @description Get Settings */
|
|
293
176
|
200: {
|
|
294
177
|
headers: {
|
|
295
178
|
[name: string]: unknown;
|
|
296
179
|
};
|
|
297
180
|
content: {
|
|
298
|
-
"application/json":
|
|
299
|
-
/**
|
|
300
|
-
* @description The ID of the domain
|
|
301
|
-
* @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
|
|
302
|
-
*/
|
|
303
|
-
id: string;
|
|
304
|
-
/**
|
|
305
|
-
* @description The name of the domain
|
|
306
|
-
* @example example.com
|
|
307
|
-
*/
|
|
308
|
-
name: string;
|
|
309
|
-
/**
|
|
310
|
-
* @description The ID of the team
|
|
311
|
-
* @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
|
|
312
|
-
*/
|
|
313
|
-
teamId: string;
|
|
314
|
-
/** @enum {string} */
|
|
315
|
-
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
|
316
|
-
/** @default us-east-1 */
|
|
317
|
-
region: string;
|
|
318
|
-
/** @default false */
|
|
319
|
-
clickTracking: boolean;
|
|
320
|
-
/** @default false */
|
|
321
|
-
openTracking: boolean;
|
|
322
|
-
publicKey: string;
|
|
323
|
-
dkimStatus?: string | null;
|
|
324
|
-
spfDetails?: string | null;
|
|
325
|
-
createdAt: string;
|
|
326
|
-
updatedAt: string;
|
|
327
|
-
/** @default false */
|
|
328
|
-
dmarcAdded: boolean;
|
|
329
|
-
/** @default false */
|
|
330
|
-
isVerifying: boolean;
|
|
331
|
-
errorMessage?: string | null;
|
|
332
|
-
subdomain?: string | null;
|
|
333
|
-
verificationError?: string | null;
|
|
334
|
-
lastCheckedTime?: string | null;
|
|
335
|
-
dnsRecords: {
|
|
336
|
-
/**
|
|
337
|
-
* @description DNS record type
|
|
338
|
-
* @example TXT
|
|
339
|
-
* @enum {string}
|
|
340
|
-
*/
|
|
341
|
-
type: "MX" | "TXT";
|
|
342
|
-
/**
|
|
343
|
-
* @description DNS record name
|
|
344
|
-
* @example mail
|
|
345
|
-
*/
|
|
346
|
-
name: string;
|
|
347
|
-
/**
|
|
348
|
-
* @description DNS record value
|
|
349
|
-
* @example v=spf1 include:amazonses.com ~all
|
|
350
|
-
*/
|
|
351
|
-
value: string;
|
|
352
|
-
/**
|
|
353
|
-
* @description DNS record TTL
|
|
354
|
-
* @example Auto
|
|
355
|
-
*/
|
|
356
|
-
ttl: string;
|
|
357
|
-
/**
|
|
358
|
-
* @description DNS record priority
|
|
359
|
-
* @example 10
|
|
360
|
-
*/
|
|
361
|
-
priority?: string | null;
|
|
362
|
-
/** @enum {string} */
|
|
363
|
-
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
|
364
|
-
/** @description Whether the record is recommended */
|
|
365
|
-
recommended?: boolean;
|
|
366
|
-
}[];
|
|
367
|
-
};
|
|
181
|
+
"application/json": Record<string, never>;
|
|
368
182
|
};
|
|
369
183
|
};
|
|
370
184
|
};
|
|
371
185
|
};
|
|
372
186
|
put?: never;
|
|
373
187
|
post?: never;
|
|
374
|
-
delete
|
|
188
|
+
delete?: never;
|
|
189
|
+
options?: never;
|
|
190
|
+
head?: never;
|
|
191
|
+
patch?: never;
|
|
192
|
+
trace?: never;
|
|
193
|
+
};
|
|
194
|
+
"/v1/analytics": {
|
|
195
|
+
parameters: {
|
|
196
|
+
query?: never;
|
|
197
|
+
header?: never;
|
|
198
|
+
path?: never;
|
|
199
|
+
cookie?: never;
|
|
200
|
+
};
|
|
201
|
+
get: {
|
|
375
202
|
parameters: {
|
|
376
203
|
query?: never;
|
|
377
204
|
header?: never;
|
|
378
|
-
path
|
|
379
|
-
id: string;
|
|
380
|
-
};
|
|
205
|
+
path?: never;
|
|
381
206
|
cookie?: never;
|
|
382
207
|
};
|
|
383
208
|
requestBody?: never;
|
|
384
209
|
responses: {
|
|
385
|
-
/** @description
|
|
210
|
+
/** @description Get Analytics */
|
|
386
211
|
200: {
|
|
387
212
|
headers: {
|
|
388
213
|
[name: string]: unknown;
|
|
389
214
|
};
|
|
390
215
|
content: {
|
|
391
|
-
"application/json":
|
|
392
|
-
success: boolean;
|
|
393
|
-
message: string;
|
|
394
|
-
};
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
/** @description Forbidden - API key doesn't have access */
|
|
398
|
-
403: {
|
|
399
|
-
headers: {
|
|
400
|
-
[name: string]: unknown;
|
|
401
|
-
};
|
|
402
|
-
content?: never;
|
|
403
|
-
};
|
|
404
|
-
/** @description Domain not found */
|
|
405
|
-
404: {
|
|
406
|
-
headers: {
|
|
407
|
-
[name: string]: unknown;
|
|
408
|
-
};
|
|
409
|
-
content: {
|
|
410
|
-
"application/json": {
|
|
411
|
-
error: string;
|
|
412
|
-
};
|
|
216
|
+
"application/json": Record<string, never>;
|
|
413
217
|
};
|
|
414
218
|
};
|
|
415
219
|
};
|
|
416
220
|
};
|
|
221
|
+
put?: never;
|
|
222
|
+
post?: never;
|
|
223
|
+
delete?: never;
|
|
417
224
|
options?: never;
|
|
418
225
|
head?: never;
|
|
419
226
|
patch?: never;
|
|
420
227
|
trace?: never;
|
|
421
228
|
};
|
|
422
|
-
"/v1/
|
|
229
|
+
"/v1/analytics/time-series": {
|
|
423
230
|
parameters: {
|
|
424
231
|
query?: never;
|
|
425
232
|
header?: never;
|
|
@@ -428,42 +235,23 @@ interface paths {
|
|
|
428
235
|
};
|
|
429
236
|
get: {
|
|
430
237
|
parameters: {
|
|
431
|
-
query?:
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
emailId: string;
|
|
238
|
+
query?: {
|
|
239
|
+
days?: string;
|
|
240
|
+
domain?: string;
|
|
435
241
|
};
|
|
242
|
+
header?: never;
|
|
243
|
+
path?: never;
|
|
436
244
|
cookie?: never;
|
|
437
245
|
};
|
|
438
246
|
requestBody?: never;
|
|
439
247
|
responses: {
|
|
440
|
-
/** @description
|
|
248
|
+
/** @description Get Email Time Series */
|
|
441
249
|
200: {
|
|
442
250
|
headers: {
|
|
443
251
|
[name: string]: unknown;
|
|
444
252
|
};
|
|
445
253
|
content: {
|
|
446
|
-
"application/json":
|
|
447
|
-
id: string;
|
|
448
|
-
teamId: string;
|
|
449
|
-
to: string | string[];
|
|
450
|
-
replyTo?: string | string[];
|
|
451
|
-
cc?: string | string[];
|
|
452
|
-
bcc?: string | string[];
|
|
453
|
-
from: string;
|
|
454
|
-
subject: string;
|
|
455
|
-
html: string | null;
|
|
456
|
-
text: string | null;
|
|
457
|
-
createdAt: string;
|
|
458
|
-
updatedAt: string;
|
|
459
|
-
emailEvents: {
|
|
460
|
-
emailId: string;
|
|
461
|
-
/** @enum {string} */
|
|
462
|
-
status: "SCHEDULED" | "QUEUED" | "SENT" | "DELIVERY_DELAYED" | "BOUNCED" | "REJECTED" | "RENDERING_FAILURE" | "DELIVERED" | "OPENED" | "CLICKED" | "COMPLAINED" | "FAILED" | "CANCELLED" | "SUPPRESSED";
|
|
463
|
-
createdAt: string;
|
|
464
|
-
data?: unknown;
|
|
465
|
-
}[];
|
|
466
|
-
};
|
|
254
|
+
"application/json": Record<string, never>;
|
|
467
255
|
};
|
|
468
256
|
};
|
|
469
257
|
};
|
|
@@ -473,40 +261,804 @@ interface paths {
|
|
|
473
261
|
delete?: never;
|
|
474
262
|
options?: never;
|
|
475
263
|
head?: never;
|
|
476
|
-
patch
|
|
264
|
+
patch?: never;
|
|
265
|
+
trace?: never;
|
|
266
|
+
};
|
|
267
|
+
"/v1/analytics/reputation": {
|
|
268
|
+
parameters: {
|
|
269
|
+
query?: never;
|
|
270
|
+
header?: never;
|
|
271
|
+
path?: never;
|
|
272
|
+
cookie?: never;
|
|
273
|
+
};
|
|
274
|
+
get: {
|
|
477
275
|
parameters: {
|
|
478
|
-
query?:
|
|
479
|
-
|
|
480
|
-
path: {
|
|
481
|
-
emailId: string;
|
|
276
|
+
query?: {
|
|
277
|
+
domain?: string;
|
|
482
278
|
};
|
|
279
|
+
header?: never;
|
|
280
|
+
path?: never;
|
|
483
281
|
cookie?: never;
|
|
484
282
|
};
|
|
485
|
-
requestBody
|
|
486
|
-
content: {
|
|
487
|
-
"application/json": {
|
|
488
|
-
/** Format: date-time */
|
|
489
|
-
scheduledAt: string;
|
|
490
|
-
};
|
|
491
|
-
};
|
|
492
|
-
};
|
|
283
|
+
requestBody?: never;
|
|
493
284
|
responses: {
|
|
494
|
-
/** @description
|
|
285
|
+
/** @description Get Reputation Metrics */
|
|
495
286
|
200: {
|
|
496
287
|
headers: {
|
|
497
288
|
[name: string]: unknown;
|
|
498
289
|
};
|
|
499
290
|
content: {
|
|
500
|
-
"application/json":
|
|
501
|
-
emailId?: string;
|
|
502
|
-
};
|
|
291
|
+
"application/json": Record<string, never>;
|
|
503
292
|
};
|
|
504
293
|
};
|
|
505
294
|
};
|
|
506
295
|
};
|
|
507
|
-
|
|
296
|
+
put?: never;
|
|
297
|
+
post?: never;
|
|
298
|
+
delete?: never;
|
|
299
|
+
options?: never;
|
|
300
|
+
head?: never;
|
|
301
|
+
patch?: never;
|
|
302
|
+
trace?: never;
|
|
303
|
+
};
|
|
304
|
+
"/v1/domains": {
|
|
305
|
+
parameters: {
|
|
306
|
+
query?: never;
|
|
307
|
+
header?: never;
|
|
308
|
+
path?: never;
|
|
309
|
+
cookie?: never;
|
|
310
|
+
};
|
|
311
|
+
get: {
|
|
312
|
+
parameters: {
|
|
313
|
+
query?: never;
|
|
314
|
+
header?: never;
|
|
315
|
+
path?: never;
|
|
316
|
+
cookie?: never;
|
|
317
|
+
};
|
|
318
|
+
requestBody?: never;
|
|
319
|
+
responses: {
|
|
320
|
+
/** @description Retrieve domains accessible by the API key */
|
|
321
|
+
200: {
|
|
322
|
+
headers: {
|
|
323
|
+
[name: string]: unknown;
|
|
324
|
+
};
|
|
325
|
+
content: {
|
|
326
|
+
"application/json": unknown[];
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
put?: never;
|
|
332
|
+
post: {
|
|
333
|
+
parameters: {
|
|
334
|
+
query?: never;
|
|
335
|
+
header?: never;
|
|
336
|
+
path?: never;
|
|
337
|
+
cookie?: never;
|
|
338
|
+
};
|
|
339
|
+
requestBody: {
|
|
340
|
+
content: {
|
|
341
|
+
"application/json": {
|
|
342
|
+
name: string;
|
|
343
|
+
region: string;
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
responses: {
|
|
348
|
+
/** @description Create a new domain */
|
|
349
|
+
200: {
|
|
350
|
+
headers: {
|
|
351
|
+
[name: string]: unknown;
|
|
352
|
+
};
|
|
353
|
+
content: {
|
|
354
|
+
"application/json": {
|
|
355
|
+
/**
|
|
356
|
+
* @description The ID of the domain
|
|
357
|
+
* @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
|
|
358
|
+
*/
|
|
359
|
+
id: string;
|
|
360
|
+
/**
|
|
361
|
+
* @description The name of the domain
|
|
362
|
+
* @example example.com
|
|
363
|
+
*/
|
|
364
|
+
name: string;
|
|
365
|
+
/**
|
|
366
|
+
* @description The ID of the team
|
|
367
|
+
* @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
|
|
368
|
+
*/
|
|
369
|
+
teamId: string;
|
|
370
|
+
/** @description The status of the domain */
|
|
371
|
+
status: string;
|
|
372
|
+
/**
|
|
373
|
+
* @description The region of the domain
|
|
374
|
+
* @default us-east-1
|
|
375
|
+
* @example us-east-1
|
|
376
|
+
*/
|
|
377
|
+
region: string;
|
|
378
|
+
/**
|
|
379
|
+
* @description Whether click tracking is enabled
|
|
380
|
+
* @default false
|
|
381
|
+
* @example false
|
|
382
|
+
*/
|
|
383
|
+
clickTracking: boolean;
|
|
384
|
+
/**
|
|
385
|
+
* @description Whether open tracking is enabled
|
|
386
|
+
* @default false
|
|
387
|
+
* @example false
|
|
388
|
+
*/
|
|
389
|
+
openTracking: boolean;
|
|
390
|
+
/** @description The public key of the domain */
|
|
391
|
+
publicKey: string;
|
|
392
|
+
/** @description The DKIM status of the domain */
|
|
393
|
+
dkimStatus?: string | null;
|
|
394
|
+
/** @description The SPF details of the domain */
|
|
395
|
+
spfDetails?: string | null;
|
|
396
|
+
/** @description The creation date of the domain */
|
|
397
|
+
createdAt: string;
|
|
398
|
+
/** @description The last update date of the domain */
|
|
399
|
+
updatedAt: string;
|
|
400
|
+
/**
|
|
401
|
+
* @description Whether DMARC is added
|
|
402
|
+
* @default false
|
|
403
|
+
*/
|
|
404
|
+
dmarcAdded: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* @description Whether the domain is verifying
|
|
407
|
+
* @default false
|
|
408
|
+
*/
|
|
409
|
+
isVerifying: boolean;
|
|
410
|
+
/** @description The error message of the domain */
|
|
411
|
+
errorMessage?: string | null;
|
|
412
|
+
/** @description The subdomain of the domain */
|
|
413
|
+
subdomain?: string | null;
|
|
414
|
+
/** @description The verification error of the domain */
|
|
415
|
+
verificationError?: string | null;
|
|
416
|
+
/** @description The last checked time of the domain */
|
|
417
|
+
lastCheckedTime?: string | null;
|
|
418
|
+
/** @description The DNS records of the domain */
|
|
419
|
+
dnsRecords: unknown[];
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
delete?: never;
|
|
426
|
+
options?: never;
|
|
427
|
+
head?: never;
|
|
428
|
+
patch?: never;
|
|
429
|
+
trace?: never;
|
|
430
|
+
};
|
|
431
|
+
"/v1/domains/{id}/verify": {
|
|
432
|
+
parameters: {
|
|
433
|
+
query?: never;
|
|
434
|
+
header?: never;
|
|
435
|
+
path?: never;
|
|
436
|
+
cookie?: never;
|
|
437
|
+
};
|
|
438
|
+
get?: never;
|
|
439
|
+
put: {
|
|
440
|
+
parameters: {
|
|
441
|
+
query?: never;
|
|
442
|
+
header?: never;
|
|
443
|
+
path: {
|
|
444
|
+
id: string;
|
|
445
|
+
};
|
|
446
|
+
cookie?: never;
|
|
447
|
+
};
|
|
448
|
+
requestBody?: never;
|
|
449
|
+
responses: {
|
|
450
|
+
/** @description Verify domain */
|
|
451
|
+
200: {
|
|
452
|
+
headers: {
|
|
453
|
+
[name: string]: unknown;
|
|
454
|
+
};
|
|
455
|
+
content: {
|
|
456
|
+
"application/json": Record<string, never>;
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
/** @description Forbidden - API key doesn't have access to this domain */
|
|
460
|
+
403: {
|
|
461
|
+
headers: {
|
|
462
|
+
[name: string]: unknown;
|
|
463
|
+
};
|
|
464
|
+
content: {
|
|
465
|
+
"application/json": Record<string, never>;
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
/** @description Domain not found */
|
|
469
|
+
404: {
|
|
470
|
+
headers: {
|
|
471
|
+
[name: string]: unknown;
|
|
472
|
+
};
|
|
473
|
+
content: {
|
|
474
|
+
"application/json": Record<string, never>;
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
post?: never;
|
|
480
|
+
delete?: never;
|
|
481
|
+
options?: never;
|
|
482
|
+
head?: never;
|
|
483
|
+
patch?: never;
|
|
484
|
+
trace?: never;
|
|
485
|
+
};
|
|
486
|
+
"/v1/domains/{id}": {
|
|
487
|
+
parameters: {
|
|
488
|
+
query?: never;
|
|
489
|
+
header?: never;
|
|
490
|
+
path?: never;
|
|
491
|
+
cookie?: never;
|
|
492
|
+
};
|
|
493
|
+
get: {
|
|
494
|
+
parameters: {
|
|
495
|
+
query?: never;
|
|
496
|
+
header?: never;
|
|
497
|
+
path: {
|
|
498
|
+
id: string;
|
|
499
|
+
};
|
|
500
|
+
cookie?: never;
|
|
501
|
+
};
|
|
502
|
+
requestBody?: never;
|
|
503
|
+
responses: {
|
|
504
|
+
/** @description Retrieve the domain */
|
|
505
|
+
200: {
|
|
506
|
+
headers: {
|
|
507
|
+
[name: string]: unknown;
|
|
508
|
+
};
|
|
509
|
+
content: {
|
|
510
|
+
"application/json": {
|
|
511
|
+
/**
|
|
512
|
+
* @description The ID of the domain
|
|
513
|
+
* @example 0Lleb1FOUnB60jSueJ/mkPId1vrdB68T8/u9tiInsi4=
|
|
514
|
+
*/
|
|
515
|
+
id: string;
|
|
516
|
+
/**
|
|
517
|
+
* @description The name of the domain
|
|
518
|
+
* @example example.com
|
|
519
|
+
*/
|
|
520
|
+
name: string;
|
|
521
|
+
/**
|
|
522
|
+
* @description The ID of the team
|
|
523
|
+
* @example jonVNF8M+EbJObaRAz2XBHnoJ6Add/tazP9lfOiPJ3E=
|
|
524
|
+
*/
|
|
525
|
+
teamId: string;
|
|
526
|
+
/** @description The status of the domain */
|
|
527
|
+
status: string;
|
|
528
|
+
/**
|
|
529
|
+
* @description The region of the domain
|
|
530
|
+
* @default us-east-1
|
|
531
|
+
* @example us-east-1
|
|
532
|
+
*/
|
|
533
|
+
region: string;
|
|
534
|
+
/**
|
|
535
|
+
* @description Whether click tracking is enabled
|
|
536
|
+
* @default false
|
|
537
|
+
* @example false
|
|
538
|
+
*/
|
|
539
|
+
clickTracking: boolean;
|
|
540
|
+
/**
|
|
541
|
+
* @description Whether open tracking is enabled
|
|
542
|
+
* @default false
|
|
543
|
+
* @example false
|
|
544
|
+
*/
|
|
545
|
+
openTracking: boolean;
|
|
546
|
+
/** @description The public key of the domain */
|
|
547
|
+
publicKey: string;
|
|
548
|
+
/** @description The DKIM status of the domain */
|
|
549
|
+
dkimStatus?: string | null;
|
|
550
|
+
/** @description The SPF details of the domain */
|
|
551
|
+
spfDetails?: string | null;
|
|
552
|
+
/** @description The creation date of the domain */
|
|
553
|
+
createdAt: string;
|
|
554
|
+
/** @description The last update date of the domain */
|
|
555
|
+
updatedAt: string;
|
|
556
|
+
/**
|
|
557
|
+
* @description Whether DMARC is added
|
|
558
|
+
* @default false
|
|
559
|
+
*/
|
|
560
|
+
dmarcAdded: boolean;
|
|
561
|
+
/**
|
|
562
|
+
* @description Whether the domain is verifying
|
|
563
|
+
* @default false
|
|
564
|
+
*/
|
|
565
|
+
isVerifying: boolean;
|
|
566
|
+
/** @description The error message of the domain */
|
|
567
|
+
errorMessage?: string | null;
|
|
568
|
+
/** @description The subdomain of the domain */
|
|
569
|
+
subdomain?: string | null;
|
|
570
|
+
/** @description The verification error of the domain */
|
|
571
|
+
verificationError?: string | null;
|
|
572
|
+
/** @description The last checked time of the domain */
|
|
573
|
+
lastCheckedTime?: string | null;
|
|
574
|
+
/** @description The DNS records of the domain */
|
|
575
|
+
dnsRecords: unknown[];
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
put?: never;
|
|
582
|
+
post?: never;
|
|
583
|
+
delete: {
|
|
584
|
+
parameters: {
|
|
585
|
+
query?: never;
|
|
586
|
+
header?: never;
|
|
587
|
+
path: {
|
|
588
|
+
id: string;
|
|
589
|
+
};
|
|
590
|
+
cookie?: never;
|
|
591
|
+
};
|
|
592
|
+
requestBody?: never;
|
|
593
|
+
responses: {
|
|
594
|
+
/** @description Domain deleted successfully */
|
|
595
|
+
200: {
|
|
596
|
+
headers: {
|
|
597
|
+
[name: string]: unknown;
|
|
598
|
+
};
|
|
599
|
+
content: {
|
|
600
|
+
"application/json": Record<string, never>;
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
/** @description Forbidden - API key doesn't have access */
|
|
604
|
+
403: {
|
|
605
|
+
headers: {
|
|
606
|
+
[name: string]: unknown;
|
|
607
|
+
};
|
|
608
|
+
content?: never;
|
|
609
|
+
};
|
|
610
|
+
/** @description Domain not found */
|
|
611
|
+
404: {
|
|
612
|
+
headers: {
|
|
613
|
+
[name: string]: unknown;
|
|
614
|
+
};
|
|
615
|
+
content: {
|
|
616
|
+
"application/json": Record<string, never>;
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
options?: never;
|
|
622
|
+
head?: never;
|
|
623
|
+
patch?: never;
|
|
624
|
+
trace?: never;
|
|
625
|
+
};
|
|
626
|
+
"/v1/emails/{emailId}": {
|
|
627
|
+
parameters: {
|
|
628
|
+
query?: never;
|
|
629
|
+
header?: never;
|
|
630
|
+
path?: never;
|
|
631
|
+
cookie?: never;
|
|
632
|
+
};
|
|
633
|
+
get: {
|
|
634
|
+
parameters: {
|
|
635
|
+
query?: never;
|
|
636
|
+
header?: never;
|
|
637
|
+
path: {
|
|
638
|
+
emailId: string;
|
|
639
|
+
};
|
|
640
|
+
cookie?: never;
|
|
641
|
+
};
|
|
642
|
+
requestBody?: never;
|
|
643
|
+
responses: {
|
|
644
|
+
/** @description Retrieve the email */
|
|
645
|
+
200: {
|
|
646
|
+
headers: {
|
|
647
|
+
[name: string]: unknown;
|
|
648
|
+
};
|
|
649
|
+
content: {
|
|
650
|
+
"application/json": Record<string, never>;
|
|
651
|
+
};
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
put?: never;
|
|
656
|
+
post?: never;
|
|
657
|
+
delete?: never;
|
|
658
|
+
options?: never;
|
|
659
|
+
head?: never;
|
|
660
|
+
patch: {
|
|
661
|
+
parameters: {
|
|
662
|
+
query?: never;
|
|
663
|
+
header?: never;
|
|
664
|
+
path: {
|
|
665
|
+
emailId: string;
|
|
666
|
+
};
|
|
667
|
+
cookie?: never;
|
|
668
|
+
};
|
|
669
|
+
requestBody: {
|
|
670
|
+
content: {
|
|
671
|
+
"application/json": Record<string, never>;
|
|
672
|
+
};
|
|
673
|
+
};
|
|
674
|
+
responses: {
|
|
675
|
+
/** @description Retrieve the user */
|
|
676
|
+
200: {
|
|
677
|
+
headers: {
|
|
678
|
+
[name: string]: unknown;
|
|
679
|
+
};
|
|
680
|
+
content: {
|
|
681
|
+
"application/json": Record<string, never>;
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
};
|
|
686
|
+
trace?: never;
|
|
687
|
+
};
|
|
688
|
+
"/v1/emails": {
|
|
689
|
+
parameters: {
|
|
690
|
+
query?: never;
|
|
691
|
+
header?: never;
|
|
692
|
+
path?: never;
|
|
693
|
+
cookie?: never;
|
|
694
|
+
};
|
|
695
|
+
get: {
|
|
696
|
+
parameters: {
|
|
697
|
+
query?: {
|
|
698
|
+
page?: string;
|
|
699
|
+
limit?: string;
|
|
700
|
+
startDate?: string;
|
|
701
|
+
endDate?: string;
|
|
702
|
+
domainId?: string | string[];
|
|
703
|
+
};
|
|
704
|
+
header?: never;
|
|
705
|
+
path?: never;
|
|
706
|
+
cookie?: never;
|
|
707
|
+
};
|
|
708
|
+
requestBody?: never;
|
|
709
|
+
responses: {
|
|
710
|
+
/** @description Retrieve a list of emails */
|
|
711
|
+
200: {
|
|
712
|
+
headers: {
|
|
713
|
+
[name: string]: unknown;
|
|
714
|
+
};
|
|
715
|
+
content: {
|
|
716
|
+
"application/json": Record<string, never>;
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
put?: never;
|
|
722
|
+
/** @description Send an email.
|
|
723
|
+
*
|
|
724
|
+
* You can send an email by providing the `subject`, `html`, and `text` directly, or by using a `templateId`.
|
|
725
|
+
*
|
|
726
|
+
* **Using Templates:**
|
|
727
|
+
* - If `templateId` is provided, `subject`, `html`, and `text` are optional. The template's values will be used.
|
|
728
|
+
* - You can override the template's subject or body by providing them in the request.
|
|
729
|
+
* - Use the `variables` object to replace placeholders in the template (e.g. `{{name}}`).
|
|
730
|
+
* - The `templateId` must belong to your team.
|
|
731
|
+
* */
|
|
732
|
+
post: {
|
|
733
|
+
parameters: {
|
|
734
|
+
query?: never;
|
|
735
|
+
header?: {
|
|
736
|
+
/** @description Pass the optional Idempotency-Key header to make the request safe to retry. The key can be up to 256 characters. The server stores the canonical request body and behaves as follows:
|
|
737
|
+
*
|
|
738
|
+
* - Same key + same request body → returns the original emailId with 200 OK without re-sending.
|
|
739
|
+
* - Same key + different request body → returns 409 Conflict with code: NOT_UNIQUE so you can detect the mismatch.
|
|
740
|
+
* - Same key while another request is still being processed → returns 409 Conflict; retry after a short delay or once the first request completes.
|
|
741
|
+
*
|
|
742
|
+
* Entries expire after 24 hours. Use a unique key per logical send (for example, an order or signup ID). */
|
|
743
|
+
"Idempotency-Key"?: string;
|
|
744
|
+
};
|
|
745
|
+
path?: never;
|
|
746
|
+
cookie?: never;
|
|
747
|
+
};
|
|
748
|
+
requestBody: {
|
|
749
|
+
content: {
|
|
750
|
+
"application/json": {
|
|
751
|
+
to: string | string[];
|
|
752
|
+
from: string;
|
|
753
|
+
/** @description Optional when templateId is provided */
|
|
754
|
+
subject?: string;
|
|
755
|
+
/** @description ID of a template from the dashboard */
|
|
756
|
+
templateId?: string;
|
|
757
|
+
variables?: {
|
|
758
|
+
[key: string]: string;
|
|
759
|
+
};
|
|
760
|
+
replyTo?: string | string[];
|
|
761
|
+
cc?: string | string[];
|
|
762
|
+
bcc?: string | string[];
|
|
763
|
+
text?: string | null;
|
|
764
|
+
html?: string | null;
|
|
765
|
+
/** @description Custom headers to included with the emails */
|
|
766
|
+
headers?: {
|
|
767
|
+
[key: string]: string;
|
|
768
|
+
};
|
|
769
|
+
attachments?: unknown[];
|
|
770
|
+
/** Format: date-time */
|
|
771
|
+
scheduledAt?: string;
|
|
772
|
+
inReplyToId?: string | null;
|
|
773
|
+
};
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
responses: {
|
|
777
|
+
/** @description Retrieve the user */
|
|
778
|
+
200: {
|
|
779
|
+
headers: {
|
|
780
|
+
[name: string]: unknown;
|
|
781
|
+
};
|
|
782
|
+
content: {
|
|
783
|
+
"application/json": Record<string, never>;
|
|
784
|
+
};
|
|
785
|
+
};
|
|
786
|
+
};
|
|
787
|
+
};
|
|
788
|
+
delete?: never;
|
|
789
|
+
options?: never;
|
|
790
|
+
head?: never;
|
|
791
|
+
patch?: never;
|
|
792
|
+
trace?: never;
|
|
793
|
+
};
|
|
794
|
+
"/v1/emails/bounces": {
|
|
795
|
+
parameters: {
|
|
796
|
+
query?: never;
|
|
797
|
+
header?: never;
|
|
798
|
+
path?: never;
|
|
799
|
+
cookie?: never;
|
|
800
|
+
};
|
|
801
|
+
get: {
|
|
802
|
+
parameters: {
|
|
803
|
+
query?: {
|
|
804
|
+
page?: number;
|
|
805
|
+
limit?: number;
|
|
806
|
+
};
|
|
807
|
+
header?: never;
|
|
808
|
+
path?: never;
|
|
809
|
+
cookie?: never;
|
|
810
|
+
};
|
|
811
|
+
requestBody?: never;
|
|
812
|
+
responses: {
|
|
813
|
+
/** @description List bounced emails */
|
|
814
|
+
200: {
|
|
815
|
+
headers: {
|
|
816
|
+
[name: string]: unknown;
|
|
817
|
+
};
|
|
818
|
+
content: {
|
|
819
|
+
"application/json": Record<string, never>;
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
};
|
|
823
|
+
};
|
|
824
|
+
put?: never;
|
|
825
|
+
post?: never;
|
|
826
|
+
delete?: never;
|
|
827
|
+
options?: never;
|
|
828
|
+
head?: never;
|
|
829
|
+
patch?: never;
|
|
830
|
+
trace?: never;
|
|
831
|
+
};
|
|
832
|
+
"/v1/emails/complaints": {
|
|
833
|
+
parameters: {
|
|
834
|
+
query?: never;
|
|
835
|
+
header?: never;
|
|
836
|
+
path?: never;
|
|
837
|
+
cookie?: never;
|
|
838
|
+
};
|
|
839
|
+
get: {
|
|
840
|
+
parameters: {
|
|
841
|
+
query?: {
|
|
842
|
+
page?: number;
|
|
843
|
+
limit?: number;
|
|
844
|
+
};
|
|
845
|
+
header?: never;
|
|
846
|
+
path?: never;
|
|
847
|
+
cookie?: never;
|
|
848
|
+
};
|
|
849
|
+
requestBody?: never;
|
|
850
|
+
responses: {
|
|
851
|
+
/** @description List email complaints */
|
|
852
|
+
200: {
|
|
853
|
+
headers: {
|
|
854
|
+
[name: string]: unknown;
|
|
855
|
+
};
|
|
856
|
+
content: {
|
|
857
|
+
"application/json": Record<string, never>;
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
put?: never;
|
|
863
|
+
post?: never;
|
|
864
|
+
delete?: never;
|
|
865
|
+
options?: never;
|
|
866
|
+
head?: never;
|
|
867
|
+
patch?: never;
|
|
868
|
+
trace?: never;
|
|
869
|
+
};
|
|
870
|
+
"/v1/emails/unsubscribes": {
|
|
871
|
+
parameters: {
|
|
872
|
+
query?: never;
|
|
873
|
+
header?: never;
|
|
874
|
+
path?: never;
|
|
875
|
+
cookie?: never;
|
|
876
|
+
};
|
|
877
|
+
get: {
|
|
878
|
+
parameters: {
|
|
879
|
+
query?: {
|
|
880
|
+
page?: number;
|
|
881
|
+
limit?: number;
|
|
882
|
+
};
|
|
883
|
+
header?: never;
|
|
884
|
+
path?: never;
|
|
885
|
+
cookie?: never;
|
|
886
|
+
};
|
|
887
|
+
requestBody?: never;
|
|
888
|
+
responses: {
|
|
889
|
+
/** @description List unsubscribed emails (contacts) */
|
|
890
|
+
200: {
|
|
891
|
+
headers: {
|
|
892
|
+
[name: string]: unknown;
|
|
893
|
+
};
|
|
894
|
+
content: {
|
|
895
|
+
"application/json": Record<string, never>;
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
put?: never;
|
|
901
|
+
post?: never;
|
|
902
|
+
delete?: never;
|
|
903
|
+
options?: never;
|
|
904
|
+
head?: never;
|
|
905
|
+
patch?: never;
|
|
906
|
+
trace?: never;
|
|
907
|
+
};
|
|
908
|
+
"/v1/emails/batch": {
|
|
909
|
+
parameters: {
|
|
910
|
+
query?: never;
|
|
911
|
+
header?: never;
|
|
912
|
+
path?: never;
|
|
913
|
+
cookie?: never;
|
|
914
|
+
};
|
|
915
|
+
get?: never;
|
|
916
|
+
put?: never;
|
|
917
|
+
post: {
|
|
918
|
+
parameters: {
|
|
919
|
+
query?: never;
|
|
920
|
+
header?: never;
|
|
921
|
+
path?: never;
|
|
922
|
+
cookie?: never;
|
|
923
|
+
};
|
|
924
|
+
requestBody: {
|
|
925
|
+
content: {
|
|
926
|
+
"application/json": unknown[];
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
responses: {
|
|
930
|
+
/** @description List of successfully created email IDs */
|
|
931
|
+
200: {
|
|
932
|
+
headers: {
|
|
933
|
+
[name: string]: unknown;
|
|
934
|
+
};
|
|
935
|
+
content: {
|
|
936
|
+
"application/json": Record<string, never>;
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
};
|
|
941
|
+
delete?: never;
|
|
942
|
+
options?: never;
|
|
943
|
+
head?: never;
|
|
944
|
+
patch?: never;
|
|
945
|
+
trace?: never;
|
|
946
|
+
};
|
|
947
|
+
"/v1/emails/{emailId}/cancel": {
|
|
948
|
+
parameters: {
|
|
949
|
+
query?: never;
|
|
950
|
+
header?: never;
|
|
951
|
+
path?: never;
|
|
952
|
+
cookie?: never;
|
|
953
|
+
};
|
|
954
|
+
get?: never;
|
|
955
|
+
put?: never;
|
|
956
|
+
post: {
|
|
957
|
+
parameters: {
|
|
958
|
+
query?: never;
|
|
959
|
+
header?: never;
|
|
960
|
+
path: {
|
|
961
|
+
emailId: string;
|
|
962
|
+
};
|
|
963
|
+
cookie?: never;
|
|
964
|
+
};
|
|
965
|
+
requestBody?: never;
|
|
966
|
+
responses: {
|
|
967
|
+
/** @description Retrieve the user */
|
|
968
|
+
200: {
|
|
969
|
+
headers: {
|
|
970
|
+
[name: string]: unknown;
|
|
971
|
+
};
|
|
972
|
+
content: {
|
|
973
|
+
"application/json": Record<string, never>;
|
|
974
|
+
};
|
|
975
|
+
};
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
delete?: never;
|
|
979
|
+
options?: never;
|
|
980
|
+
head?: never;
|
|
981
|
+
patch?: never;
|
|
982
|
+
trace?: never;
|
|
983
|
+
};
|
|
984
|
+
"/v1/contactBooks/{contactBookId}/contacts": {
|
|
985
|
+
parameters: {
|
|
986
|
+
query?: never;
|
|
987
|
+
header?: never;
|
|
988
|
+
path?: never;
|
|
989
|
+
cookie?: never;
|
|
990
|
+
};
|
|
991
|
+
get: {
|
|
992
|
+
parameters: {
|
|
993
|
+
query?: {
|
|
994
|
+
emails?: string;
|
|
995
|
+
page?: number;
|
|
996
|
+
limit?: number;
|
|
997
|
+
ids?: string;
|
|
998
|
+
};
|
|
999
|
+
header?: never;
|
|
1000
|
+
path: {
|
|
1001
|
+
contactBookId: string;
|
|
1002
|
+
};
|
|
1003
|
+
cookie?: never;
|
|
1004
|
+
};
|
|
1005
|
+
requestBody?: never;
|
|
1006
|
+
responses: {
|
|
1007
|
+
/** @description Retrieve multiple contacts */
|
|
1008
|
+
200: {
|
|
1009
|
+
headers: {
|
|
1010
|
+
[name: string]: unknown;
|
|
1011
|
+
};
|
|
1012
|
+
content: {
|
|
1013
|
+
"application/json": unknown[];
|
|
1014
|
+
};
|
|
1015
|
+
};
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
put?: never;
|
|
1019
|
+
post: {
|
|
1020
|
+
parameters: {
|
|
1021
|
+
query?: never;
|
|
1022
|
+
header?: never;
|
|
1023
|
+
path: {
|
|
1024
|
+
contactBookId: string;
|
|
1025
|
+
};
|
|
1026
|
+
cookie?: never;
|
|
1027
|
+
};
|
|
1028
|
+
requestBody: {
|
|
1029
|
+
content: {
|
|
1030
|
+
"application/json": {
|
|
1031
|
+
email: string;
|
|
1032
|
+
firstName?: string;
|
|
1033
|
+
lastName?: string;
|
|
1034
|
+
properties?: {
|
|
1035
|
+
[key: string]: string;
|
|
1036
|
+
};
|
|
1037
|
+
subscribed?: boolean;
|
|
1038
|
+
};
|
|
1039
|
+
};
|
|
1040
|
+
};
|
|
1041
|
+
responses: {
|
|
1042
|
+
/** @description Retrieve the user */
|
|
1043
|
+
200: {
|
|
1044
|
+
headers: {
|
|
1045
|
+
[name: string]: unknown;
|
|
1046
|
+
};
|
|
1047
|
+
content: {
|
|
1048
|
+
"application/json": {
|
|
1049
|
+
contactId?: string;
|
|
1050
|
+
};
|
|
1051
|
+
};
|
|
1052
|
+
};
|
|
1053
|
+
};
|
|
1054
|
+
};
|
|
1055
|
+
delete?: never;
|
|
1056
|
+
options?: never;
|
|
1057
|
+
head?: never;
|
|
1058
|
+
patch?: never;
|
|
1059
|
+
trace?: never;
|
|
508
1060
|
};
|
|
509
|
-
"/v1/
|
|
1061
|
+
"/v1/contactBooks/{contactBookId}/contacts/{contactId}": {
|
|
510
1062
|
parameters: {
|
|
511
1063
|
query?: never;
|
|
512
1064
|
header?: never;
|
|
@@ -515,99 +1067,322 @@ interface paths {
|
|
|
515
1067
|
};
|
|
516
1068
|
get: {
|
|
517
1069
|
parameters: {
|
|
518
|
-
query?:
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
1070
|
+
query?: never;
|
|
1071
|
+
header?: never;
|
|
1072
|
+
path: {
|
|
1073
|
+
contactBookId: string;
|
|
1074
|
+
contactId: string;
|
|
1075
|
+
};
|
|
1076
|
+
cookie?: never;
|
|
1077
|
+
};
|
|
1078
|
+
requestBody?: never;
|
|
1079
|
+
responses: {
|
|
1080
|
+
/** @description Retrieve the contact */
|
|
1081
|
+
200: {
|
|
1082
|
+
headers: {
|
|
1083
|
+
[name: string]: unknown;
|
|
1084
|
+
};
|
|
1085
|
+
content: {
|
|
1086
|
+
"application/json": Record<string, never>;
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
};
|
|
1090
|
+
};
|
|
1091
|
+
put: {
|
|
1092
|
+
parameters: {
|
|
1093
|
+
query?: never;
|
|
1094
|
+
header?: never;
|
|
1095
|
+
path: {
|
|
1096
|
+
contactBookId: string;
|
|
1097
|
+
};
|
|
1098
|
+
cookie?: never;
|
|
1099
|
+
};
|
|
1100
|
+
requestBody: {
|
|
1101
|
+
content: {
|
|
1102
|
+
"application/json": Record<string, never>;
|
|
1103
|
+
};
|
|
1104
|
+
};
|
|
1105
|
+
responses: {
|
|
1106
|
+
/** @description Contact upserted successfully */
|
|
1107
|
+
200: {
|
|
1108
|
+
headers: {
|
|
1109
|
+
[name: string]: unknown;
|
|
1110
|
+
};
|
|
1111
|
+
content: {
|
|
1112
|
+
"application/json": Record<string, never>;
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
};
|
|
1117
|
+
post?: never;
|
|
1118
|
+
delete: {
|
|
1119
|
+
parameters: {
|
|
1120
|
+
query?: never;
|
|
1121
|
+
header?: never;
|
|
1122
|
+
path: {
|
|
1123
|
+
contactBookId: string;
|
|
1124
|
+
contactId: string;
|
|
1125
|
+
};
|
|
1126
|
+
cookie?: never;
|
|
1127
|
+
};
|
|
1128
|
+
requestBody?: never;
|
|
1129
|
+
responses: {
|
|
1130
|
+
/** @description Contact deleted successfully */
|
|
1131
|
+
200: {
|
|
1132
|
+
headers: {
|
|
1133
|
+
[name: string]: unknown;
|
|
1134
|
+
};
|
|
1135
|
+
content: {
|
|
1136
|
+
"application/json": Record<string, never>;
|
|
1137
|
+
};
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
};
|
|
1141
|
+
options?: never;
|
|
1142
|
+
head?: never;
|
|
1143
|
+
patch: {
|
|
1144
|
+
parameters: {
|
|
1145
|
+
query?: never;
|
|
1146
|
+
header?: never;
|
|
1147
|
+
path: {
|
|
1148
|
+
contactBookId: string;
|
|
1149
|
+
contactId: string;
|
|
1150
|
+
};
|
|
1151
|
+
cookie?: never;
|
|
1152
|
+
};
|
|
1153
|
+
requestBody: {
|
|
1154
|
+
content: {
|
|
1155
|
+
"application/json": {
|
|
1156
|
+
firstName?: string;
|
|
1157
|
+
lastName?: string;
|
|
1158
|
+
properties?: {
|
|
1159
|
+
[key: string]: string;
|
|
1160
|
+
};
|
|
1161
|
+
subscribed?: boolean;
|
|
1162
|
+
};
|
|
1163
|
+
};
|
|
1164
|
+
};
|
|
1165
|
+
responses: {
|
|
1166
|
+
/** @description Retrieve the user */
|
|
1167
|
+
200: {
|
|
1168
|
+
headers: {
|
|
1169
|
+
[name: string]: unknown;
|
|
1170
|
+
};
|
|
1171
|
+
content: {
|
|
1172
|
+
"application/json": {
|
|
1173
|
+
contactId?: string;
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
};
|
|
1177
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
trace?: never;
|
|
1180
|
+
};
|
|
1181
|
+
"/v1/campaigns": {
|
|
1182
|
+
parameters: {
|
|
1183
|
+
query?: never;
|
|
1184
|
+
header?: never;
|
|
1185
|
+
path?: never;
|
|
1186
|
+
cookie?: never;
|
|
1187
|
+
};
|
|
1188
|
+
get: {
|
|
1189
|
+
parameters: {
|
|
1190
|
+
query?: never;
|
|
1191
|
+
header?: never;
|
|
1192
|
+
path?: never;
|
|
1193
|
+
cookie?: never;
|
|
1194
|
+
};
|
|
1195
|
+
requestBody?: never;
|
|
1196
|
+
responses: {
|
|
1197
|
+
/** @description List campaigns */
|
|
1198
|
+
200: {
|
|
1199
|
+
headers: {
|
|
1200
|
+
[name: string]: unknown;
|
|
1201
|
+
};
|
|
1202
|
+
content: {
|
|
1203
|
+
"application/json": unknown[];
|
|
1204
|
+
};
|
|
524
1205
|
};
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
put?: never;
|
|
1209
|
+
post: {
|
|
1210
|
+
parameters: {
|
|
1211
|
+
query?: never;
|
|
525
1212
|
header?: never;
|
|
526
1213
|
path?: never;
|
|
527
1214
|
cookie?: never;
|
|
528
1215
|
};
|
|
1216
|
+
requestBody: {
|
|
1217
|
+
content: {
|
|
1218
|
+
"application/json": {
|
|
1219
|
+
name: string;
|
|
1220
|
+
from: string;
|
|
1221
|
+
subject: string;
|
|
1222
|
+
previewText?: string;
|
|
1223
|
+
contactBookId: string;
|
|
1224
|
+
content?: string;
|
|
1225
|
+
html?: string;
|
|
1226
|
+
replyTo?: string | string[];
|
|
1227
|
+
cc?: string | string[];
|
|
1228
|
+
bcc?: string | string[];
|
|
1229
|
+
sendNow?: boolean;
|
|
1230
|
+
/** @description Timestamp in ISO 8601 format or natural language (e.g., 'tomorrow 9am', 'next monday 10:30') */
|
|
1231
|
+
scheduledAt?: string;
|
|
1232
|
+
batchSize?: number;
|
|
1233
|
+
};
|
|
1234
|
+
};
|
|
1235
|
+
};
|
|
1236
|
+
responses: {
|
|
1237
|
+
/** @description Create a campaign. Note: The campaign content MUST include an unsubscribe link placeholder `{{unsent_unsubscribe_url}}`. */
|
|
1238
|
+
200: {
|
|
1239
|
+
headers: {
|
|
1240
|
+
[name: string]: unknown;
|
|
1241
|
+
};
|
|
1242
|
+
content: {
|
|
1243
|
+
"application/json": {
|
|
1244
|
+
id: string;
|
|
1245
|
+
name: string;
|
|
1246
|
+
from: string;
|
|
1247
|
+
subject: string;
|
|
1248
|
+
previewText: string | null;
|
|
1249
|
+
contactBookId: string | null;
|
|
1250
|
+
html: string | null;
|
|
1251
|
+
content: string | null;
|
|
1252
|
+
status: string;
|
|
1253
|
+
/** Format: date-time */
|
|
1254
|
+
scheduledAt: string | null;
|
|
1255
|
+
batchSize: number;
|
|
1256
|
+
batchWindowMinutes: number;
|
|
1257
|
+
total: number;
|
|
1258
|
+
sent: number;
|
|
1259
|
+
delivered: number;
|
|
1260
|
+
opened: number;
|
|
1261
|
+
clicked: number;
|
|
1262
|
+
unsubscribed: number;
|
|
1263
|
+
bounced: number;
|
|
1264
|
+
hardBounced: number;
|
|
1265
|
+
complained: number;
|
|
1266
|
+
replyTo: unknown[];
|
|
1267
|
+
cc: unknown[];
|
|
1268
|
+
bcc: unknown[];
|
|
1269
|
+
/** Format: date-time */
|
|
1270
|
+
createdAt: string;
|
|
1271
|
+
/** Format: date-time */
|
|
1272
|
+
updatedAt: string;
|
|
1273
|
+
};
|
|
1274
|
+
};
|
|
1275
|
+
};
|
|
1276
|
+
};
|
|
1277
|
+
};
|
|
1278
|
+
delete?: never;
|
|
1279
|
+
options?: never;
|
|
1280
|
+
head?: never;
|
|
1281
|
+
patch?: never;
|
|
1282
|
+
trace?: never;
|
|
1283
|
+
};
|
|
1284
|
+
"/v1/campaigns/{campaignId}": {
|
|
1285
|
+
parameters: {
|
|
1286
|
+
query?: never;
|
|
1287
|
+
header?: never;
|
|
1288
|
+
path?: never;
|
|
1289
|
+
cookie?: never;
|
|
1290
|
+
};
|
|
1291
|
+
get: {
|
|
1292
|
+
parameters: {
|
|
1293
|
+
query?: never;
|
|
1294
|
+
header?: never;
|
|
1295
|
+
path: {
|
|
1296
|
+
campaignId: string;
|
|
1297
|
+
};
|
|
1298
|
+
cookie?: never;
|
|
1299
|
+
};
|
|
529
1300
|
requestBody?: never;
|
|
530
1301
|
responses: {
|
|
531
|
-
/** @description
|
|
1302
|
+
/** @description Get campaign details */
|
|
532
1303
|
200: {
|
|
533
1304
|
headers: {
|
|
534
1305
|
[name: string]: unknown;
|
|
535
1306
|
};
|
|
536
1307
|
content: {
|
|
537
1308
|
"application/json": {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
1309
|
+
id: string;
|
|
1310
|
+
name: string;
|
|
1311
|
+
from: string;
|
|
1312
|
+
subject: string;
|
|
1313
|
+
previewText: string | null;
|
|
1314
|
+
contactBookId: string | null;
|
|
1315
|
+
html: string | null;
|
|
1316
|
+
content: string | null;
|
|
1317
|
+
status: string;
|
|
1318
|
+
/** Format: date-time */
|
|
1319
|
+
scheduledAt: string | null;
|
|
1320
|
+
batchSize: number;
|
|
1321
|
+
batchWindowMinutes: number;
|
|
1322
|
+
total: number;
|
|
1323
|
+
sent: number;
|
|
1324
|
+
delivered: number;
|
|
1325
|
+
opened: number;
|
|
1326
|
+
clicked: number;
|
|
1327
|
+
unsubscribed: number;
|
|
1328
|
+
bounced: number;
|
|
1329
|
+
hardBounced: number;
|
|
1330
|
+
complained: number;
|
|
1331
|
+
replyTo: unknown[];
|
|
1332
|
+
cc: unknown[];
|
|
1333
|
+
bcc: unknown[];
|
|
1334
|
+
/** Format: date-time */
|
|
1335
|
+
createdAt: string;
|
|
1336
|
+
/** Format: date-time */
|
|
1337
|
+
updatedAt: string;
|
|
557
1338
|
};
|
|
558
1339
|
};
|
|
559
1340
|
};
|
|
560
1341
|
};
|
|
561
1342
|
};
|
|
562
1343
|
put?: never;
|
|
1344
|
+
post?: never;
|
|
1345
|
+
delete?: never;
|
|
1346
|
+
options?: never;
|
|
1347
|
+
head?: never;
|
|
1348
|
+
patch?: never;
|
|
1349
|
+
trace?: never;
|
|
1350
|
+
};
|
|
1351
|
+
"/v1/campaigns/{campaignId}/schedule": {
|
|
1352
|
+
parameters: {
|
|
1353
|
+
query?: never;
|
|
1354
|
+
header?: never;
|
|
1355
|
+
path?: never;
|
|
1356
|
+
cookie?: never;
|
|
1357
|
+
};
|
|
1358
|
+
get?: never;
|
|
1359
|
+
put?: never;
|
|
563
1360
|
post: {
|
|
564
1361
|
parameters: {
|
|
565
1362
|
query?: never;
|
|
566
1363
|
header?: never;
|
|
567
|
-
path
|
|
1364
|
+
path: {
|
|
1365
|
+
campaignId: string;
|
|
1366
|
+
};
|
|
568
1367
|
cookie?: never;
|
|
569
1368
|
};
|
|
570
1369
|
requestBody: {
|
|
571
1370
|
content: {
|
|
572
1371
|
"application/json": {
|
|
573
|
-
|
|
574
|
-
from: string;
|
|
575
|
-
/** @description Optional when templateId is provided */
|
|
576
|
-
subject?: string;
|
|
577
|
-
/** @description ID of a template from the dashboard */
|
|
578
|
-
templateId?: string;
|
|
579
|
-
variables?: {
|
|
580
|
-
[key: string]: string;
|
|
581
|
-
};
|
|
582
|
-
replyTo?: string | string[];
|
|
583
|
-
cc?: string | string[];
|
|
584
|
-
bcc?: string | string[];
|
|
585
|
-
text?: string | null;
|
|
586
|
-
html?: string | null;
|
|
587
|
-
/** @description Custom headers to included with the emails */
|
|
588
|
-
headers?: {
|
|
589
|
-
[key: string]: string;
|
|
590
|
-
};
|
|
591
|
-
attachments?: {
|
|
592
|
-
filename: string;
|
|
593
|
-
content: string;
|
|
594
|
-
}[];
|
|
595
|
-
/** Format: date-time */
|
|
1372
|
+
/** @description Timestamp in ISO 8601 format or natural language (e.g., 'tomorrow 9am', 'next monday 10:30') */
|
|
596
1373
|
scheduledAt?: string;
|
|
597
|
-
|
|
1374
|
+
batchSize?: number;
|
|
598
1375
|
};
|
|
599
1376
|
};
|
|
600
1377
|
};
|
|
601
1378
|
responses: {
|
|
602
|
-
/** @description
|
|
1379
|
+
/** @description Schedule a campaign */
|
|
603
1380
|
200: {
|
|
604
1381
|
headers: {
|
|
605
1382
|
[name: string]: unknown;
|
|
606
1383
|
};
|
|
607
1384
|
content: {
|
|
608
|
-
"application/json":
|
|
609
|
-
emailId?: string;
|
|
610
|
-
};
|
|
1385
|
+
"application/json": Record<string, never>;
|
|
611
1386
|
};
|
|
612
1387
|
};
|
|
613
1388
|
};
|
|
@@ -618,7 +1393,7 @@ interface paths {
|
|
|
618
1393
|
patch?: never;
|
|
619
1394
|
trace?: never;
|
|
620
1395
|
};
|
|
621
|
-
"/v1/
|
|
1396
|
+
"/v1/campaigns/{campaignId}/pause": {
|
|
622
1397
|
parameters: {
|
|
623
1398
|
query?: never;
|
|
624
1399
|
header?: never;
|
|
@@ -631,52 +1406,20 @@ interface paths {
|
|
|
631
1406
|
parameters: {
|
|
632
1407
|
query?: never;
|
|
633
1408
|
header?: never;
|
|
634
|
-
path
|
|
635
|
-
|
|
636
|
-
};
|
|
637
|
-
requestBody: {
|
|
638
|
-
content: {
|
|
639
|
-
"application/json": {
|
|
640
|
-
to: string | string[];
|
|
641
|
-
from: string;
|
|
642
|
-
/** @description Optional when templateId is provided */
|
|
643
|
-
subject?: string;
|
|
644
|
-
/** @description ID of a template from the dashboard */
|
|
645
|
-
templateId?: string;
|
|
646
|
-
variables?: {
|
|
647
|
-
[key: string]: string;
|
|
648
|
-
};
|
|
649
|
-
replyTo?: string | string[];
|
|
650
|
-
cc?: string | string[];
|
|
651
|
-
bcc?: string | string[];
|
|
652
|
-
text?: string | null;
|
|
653
|
-
html?: string | null;
|
|
654
|
-
/** @description Custom headers to included with the emails */
|
|
655
|
-
headers?: {
|
|
656
|
-
[key: string]: string;
|
|
657
|
-
};
|
|
658
|
-
attachments?: {
|
|
659
|
-
filename: string;
|
|
660
|
-
content: string;
|
|
661
|
-
}[];
|
|
662
|
-
/** Format: date-time */
|
|
663
|
-
scheduledAt?: string;
|
|
664
|
-
inReplyToId?: string | null;
|
|
665
|
-
}[];
|
|
1409
|
+
path: {
|
|
1410
|
+
campaignId: string;
|
|
666
1411
|
};
|
|
1412
|
+
cookie?: never;
|
|
667
1413
|
};
|
|
1414
|
+
requestBody?: never;
|
|
668
1415
|
responses: {
|
|
669
|
-
/** @description
|
|
1416
|
+
/** @description Pause a campaign */
|
|
670
1417
|
200: {
|
|
671
1418
|
headers: {
|
|
672
1419
|
[name: string]: unknown;
|
|
673
1420
|
};
|
|
674
1421
|
content: {
|
|
675
|
-
"application/json":
|
|
676
|
-
data: {
|
|
677
|
-
emailId: string;
|
|
678
|
-
}[];
|
|
679
|
-
};
|
|
1422
|
+
"application/json": Record<string, never>;
|
|
680
1423
|
};
|
|
681
1424
|
};
|
|
682
1425
|
};
|
|
@@ -687,7 +1430,7 @@ interface paths {
|
|
|
687
1430
|
patch?: never;
|
|
688
1431
|
trace?: never;
|
|
689
1432
|
};
|
|
690
|
-
"/v1/
|
|
1433
|
+
"/v1/campaigns/{campaignId}/resume": {
|
|
691
1434
|
parameters: {
|
|
692
1435
|
query?: never;
|
|
693
1436
|
header?: never;
|
|
@@ -701,21 +1444,19 @@ interface paths {
|
|
|
701
1444
|
query?: never;
|
|
702
1445
|
header?: never;
|
|
703
1446
|
path: {
|
|
704
|
-
|
|
1447
|
+
campaignId: string;
|
|
705
1448
|
};
|
|
706
1449
|
cookie?: never;
|
|
707
1450
|
};
|
|
708
1451
|
requestBody?: never;
|
|
709
1452
|
responses: {
|
|
710
|
-
/** @description
|
|
1453
|
+
/** @description Resume a campaign */
|
|
711
1454
|
200: {
|
|
712
1455
|
headers: {
|
|
713
1456
|
[name: string]: unknown;
|
|
714
1457
|
};
|
|
715
1458
|
content: {
|
|
716
|
-
"application/json":
|
|
717
|
-
emailId?: string;
|
|
718
|
-
};
|
|
1459
|
+
"application/json": Record<string, never>;
|
|
719
1460
|
};
|
|
720
1461
|
};
|
|
721
1462
|
};
|
|
@@ -726,7 +1467,7 @@ interface paths {
|
|
|
726
1467
|
patch?: never;
|
|
727
1468
|
trace?: never;
|
|
728
1469
|
};
|
|
729
|
-
"/v1/contactBooks
|
|
1470
|
+
"/v1/contactBooks": {
|
|
730
1471
|
parameters: {
|
|
731
1472
|
query?: never;
|
|
732
1473
|
header?: never;
|
|
@@ -735,40 +1476,20 @@ interface paths {
|
|
|
735
1476
|
};
|
|
736
1477
|
get: {
|
|
737
1478
|
parameters: {
|
|
738
|
-
query?:
|
|
739
|
-
emails?: string;
|
|
740
|
-
page?: number;
|
|
741
|
-
limit?: number;
|
|
742
|
-
ids?: string;
|
|
743
|
-
};
|
|
1479
|
+
query?: never;
|
|
744
1480
|
header?: never;
|
|
745
|
-
path
|
|
746
|
-
contactBookId: string;
|
|
747
|
-
};
|
|
1481
|
+
path?: never;
|
|
748
1482
|
cookie?: never;
|
|
749
1483
|
};
|
|
750
1484
|
requestBody?: never;
|
|
751
1485
|
responses: {
|
|
752
|
-
/** @description Retrieve
|
|
1486
|
+
/** @description Retrieve all contact books */
|
|
753
1487
|
200: {
|
|
754
1488
|
headers: {
|
|
755
1489
|
[name: string]: unknown;
|
|
756
1490
|
};
|
|
757
1491
|
content: {
|
|
758
|
-
"application/json":
|
|
759
|
-
id: string;
|
|
760
|
-
firstName?: string | null;
|
|
761
|
-
lastName?: string | null;
|
|
762
|
-
email: string;
|
|
763
|
-
/** @default true */
|
|
764
|
-
subscribed: boolean;
|
|
765
|
-
properties: {
|
|
766
|
-
[key: string]: string;
|
|
767
|
-
};
|
|
768
|
-
contactBookId: string;
|
|
769
|
-
createdAt: string;
|
|
770
|
-
updatedAt: string;
|
|
771
|
-
}[];
|
|
1492
|
+
"application/json": unknown[];
|
|
772
1493
|
};
|
|
773
1494
|
};
|
|
774
1495
|
};
|
|
@@ -778,33 +1499,35 @@ interface paths {
|
|
|
778
1499
|
parameters: {
|
|
779
1500
|
query?: never;
|
|
780
1501
|
header?: never;
|
|
781
|
-
path
|
|
782
|
-
contactBookId: string;
|
|
783
|
-
};
|
|
1502
|
+
path?: never;
|
|
784
1503
|
cookie?: never;
|
|
785
1504
|
};
|
|
786
|
-
requestBody
|
|
1505
|
+
requestBody?: {
|
|
787
1506
|
content: {
|
|
788
1507
|
"application/json": {
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
lastName?: string;
|
|
1508
|
+
name: string;
|
|
1509
|
+
emoji?: string;
|
|
792
1510
|
properties?: {
|
|
793
1511
|
[key: string]: string;
|
|
794
1512
|
};
|
|
795
|
-
subscribed?: boolean;
|
|
796
1513
|
};
|
|
797
1514
|
};
|
|
798
1515
|
};
|
|
799
1516
|
responses: {
|
|
800
|
-
/** @description
|
|
1517
|
+
/** @description Create a contact book */
|
|
801
1518
|
200: {
|
|
802
1519
|
headers: {
|
|
803
1520
|
[name: string]: unknown;
|
|
804
1521
|
};
|
|
805
1522
|
content: {
|
|
806
1523
|
"application/json": {
|
|
807
|
-
|
|
1524
|
+
id: string;
|
|
1525
|
+
name: string;
|
|
1526
|
+
emoji: string;
|
|
1527
|
+
properties?: unknown;
|
|
1528
|
+
teamId: string;
|
|
1529
|
+
createdAt: string;
|
|
1530
|
+
updatedAt: string;
|
|
808
1531
|
};
|
|
809
1532
|
};
|
|
810
1533
|
};
|
|
@@ -816,7 +1539,7 @@ interface paths {
|
|
|
816
1539
|
patch?: never;
|
|
817
1540
|
trace?: never;
|
|
818
1541
|
};
|
|
819
|
-
"/v1/contactBooks/{
|
|
1542
|
+
"/v1/contactBooks/{id}": {
|
|
820
1543
|
parameters: {
|
|
821
1544
|
query?: never;
|
|
822
1545
|
header?: never;
|
|
@@ -828,14 +1551,13 @@ interface paths {
|
|
|
828
1551
|
query?: never;
|
|
829
1552
|
header?: never;
|
|
830
1553
|
path: {
|
|
831
|
-
|
|
832
|
-
contactId: string;
|
|
1554
|
+
id: string;
|
|
833
1555
|
};
|
|
834
1556
|
cookie?: never;
|
|
835
1557
|
};
|
|
836
1558
|
requestBody?: never;
|
|
837
1559
|
responses: {
|
|
838
|
-
/** @description
|
|
1560
|
+
/** @description Get contact book details */
|
|
839
1561
|
200: {
|
|
840
1562
|
headers: {
|
|
841
1563
|
[name: string]: unknown;
|
|
@@ -843,72 +1565,36 @@ interface paths {
|
|
|
843
1565
|
content: {
|
|
844
1566
|
"application/json": {
|
|
845
1567
|
id: string;
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
subscribed: boolean;
|
|
851
|
-
properties: {
|
|
852
|
-
[key: string]: string;
|
|
853
|
-
};
|
|
854
|
-
contactBookId: string;
|
|
1568
|
+
name: string;
|
|
1569
|
+
emoji: string;
|
|
1570
|
+
properties?: unknown;
|
|
1571
|
+
teamId: string;
|
|
855
1572
|
createdAt: string;
|
|
856
1573
|
updatedAt: string;
|
|
1574
|
+
details: {
|
|
1575
|
+
totalContacts: number;
|
|
1576
|
+
unsubscribedContacts: number;
|
|
1577
|
+
campaigns: unknown[];
|
|
1578
|
+
};
|
|
857
1579
|
};
|
|
858
1580
|
};
|
|
859
1581
|
};
|
|
860
1582
|
};
|
|
861
1583
|
};
|
|
862
|
-
put
|
|
863
|
-
parameters: {
|
|
864
|
-
query?: never;
|
|
865
|
-
header?: never;
|
|
866
|
-
path: {
|
|
867
|
-
contactBookId: string;
|
|
868
|
-
};
|
|
869
|
-
cookie?: never;
|
|
870
|
-
};
|
|
871
|
-
requestBody: {
|
|
872
|
-
content: {
|
|
873
|
-
"application/json": {
|
|
874
|
-
email: string;
|
|
875
|
-
firstName?: string;
|
|
876
|
-
lastName?: string;
|
|
877
|
-
properties?: {
|
|
878
|
-
[key: string]: string;
|
|
879
|
-
};
|
|
880
|
-
subscribed?: boolean;
|
|
881
|
-
};
|
|
882
|
-
};
|
|
883
|
-
};
|
|
884
|
-
responses: {
|
|
885
|
-
/** @description Contact upserted successfully */
|
|
886
|
-
200: {
|
|
887
|
-
headers: {
|
|
888
|
-
[name: string]: unknown;
|
|
889
|
-
};
|
|
890
|
-
content: {
|
|
891
|
-
"application/json": {
|
|
892
|
-
contactId: string;
|
|
893
|
-
};
|
|
894
|
-
};
|
|
895
|
-
};
|
|
896
|
-
};
|
|
897
|
-
};
|
|
1584
|
+
put?: never;
|
|
898
1585
|
post?: never;
|
|
899
1586
|
delete: {
|
|
900
1587
|
parameters: {
|
|
901
1588
|
query?: never;
|
|
902
1589
|
header?: never;
|
|
903
1590
|
path: {
|
|
904
|
-
|
|
905
|
-
contactId: string;
|
|
1591
|
+
id: string;
|
|
906
1592
|
};
|
|
907
1593
|
cookie?: never;
|
|
908
1594
|
};
|
|
909
1595
|
requestBody?: never;
|
|
910
1596
|
responses: {
|
|
911
|
-
/** @description
|
|
1597
|
+
/** @description Delete contact book */
|
|
912
1598
|
200: {
|
|
913
1599
|
headers: {
|
|
914
1600
|
[name: string]: unknown;
|
|
@@ -928,32 +1614,31 @@ interface paths {
|
|
|
928
1614
|
query?: never;
|
|
929
1615
|
header?: never;
|
|
930
1616
|
path: {
|
|
931
|
-
|
|
932
|
-
contactId: string;
|
|
1617
|
+
id: string;
|
|
933
1618
|
};
|
|
934
1619
|
cookie?: never;
|
|
935
1620
|
};
|
|
936
|
-
requestBody
|
|
1621
|
+
requestBody?: {
|
|
937
1622
|
content: {
|
|
938
1623
|
"application/json": {
|
|
939
|
-
|
|
940
|
-
|
|
1624
|
+
name?: string;
|
|
1625
|
+
emoji?: string;
|
|
941
1626
|
properties?: {
|
|
942
1627
|
[key: string]: string;
|
|
943
1628
|
};
|
|
944
|
-
subscribed?: boolean;
|
|
945
1629
|
};
|
|
946
1630
|
};
|
|
947
1631
|
};
|
|
948
1632
|
responses: {
|
|
949
|
-
/** @description
|
|
1633
|
+
/** @description Update contact book */
|
|
950
1634
|
200: {
|
|
951
1635
|
headers: {
|
|
952
1636
|
[name: string]: unknown;
|
|
953
1637
|
};
|
|
954
1638
|
content: {
|
|
955
1639
|
"application/json": {
|
|
956
|
-
|
|
1640
|
+
id: string;
|
|
1641
|
+
name: string;
|
|
957
1642
|
};
|
|
958
1643
|
};
|
|
959
1644
|
};
|
|
@@ -961,14 +1646,33 @@ interface paths {
|
|
|
961
1646
|
};
|
|
962
1647
|
trace?: never;
|
|
963
1648
|
};
|
|
964
|
-
"/v1/
|
|
1649
|
+
"/v1/templates": {
|
|
965
1650
|
parameters: {
|
|
966
1651
|
query?: never;
|
|
967
1652
|
header?: never;
|
|
968
1653
|
path?: never;
|
|
969
1654
|
cookie?: never;
|
|
970
1655
|
};
|
|
971
|
-
get
|
|
1656
|
+
get: {
|
|
1657
|
+
parameters: {
|
|
1658
|
+
query?: never;
|
|
1659
|
+
header?: never;
|
|
1660
|
+
path?: never;
|
|
1661
|
+
cookie?: never;
|
|
1662
|
+
};
|
|
1663
|
+
requestBody?: never;
|
|
1664
|
+
responses: {
|
|
1665
|
+
/** @description List templates */
|
|
1666
|
+
200: {
|
|
1667
|
+
headers: {
|
|
1668
|
+
[name: string]: unknown;
|
|
1669
|
+
};
|
|
1670
|
+
content: {
|
|
1671
|
+
"application/json": unknown[];
|
|
1672
|
+
};
|
|
1673
|
+
};
|
|
1674
|
+
};
|
|
1675
|
+
};
|
|
972
1676
|
put?: never;
|
|
973
1677
|
post: {
|
|
974
1678
|
parameters: {
|
|
@@ -977,63 +1681,25 @@ interface paths {
|
|
|
977
1681
|
path?: never;
|
|
978
1682
|
cookie?: never;
|
|
979
1683
|
};
|
|
980
|
-
requestBody
|
|
1684
|
+
requestBody?: {
|
|
981
1685
|
content: {
|
|
982
1686
|
"application/json": {
|
|
983
1687
|
name: string;
|
|
984
|
-
from: string;
|
|
985
1688
|
subject: string;
|
|
986
|
-
previewText?: string;
|
|
987
|
-
contactBookId: string;
|
|
988
|
-
content?: string;
|
|
989
1689
|
html?: string;
|
|
990
|
-
|
|
991
|
-
cc?: string | string[];
|
|
992
|
-
bcc?: string | string[];
|
|
993
|
-
sendNow?: boolean;
|
|
994
|
-
/** @description Timestamp in ISO 8601 format or natural language (e.g., 'tomorrow 9am', 'next monday 10:30') */
|
|
995
|
-
scheduledAt?: string;
|
|
996
|
-
batchSize?: number;
|
|
1690
|
+
content?: string;
|
|
997
1691
|
};
|
|
998
1692
|
};
|
|
999
1693
|
};
|
|
1000
1694
|
responses: {
|
|
1001
|
-
/** @description Create
|
|
1695
|
+
/** @description Create template */
|
|
1002
1696
|
200: {
|
|
1003
1697
|
headers: {
|
|
1004
1698
|
[name: string]: unknown;
|
|
1005
1699
|
};
|
|
1006
1700
|
content: {
|
|
1007
|
-
"application/json": {
|
|
1008
|
-
id: string;
|
|
1009
|
-
name: string;
|
|
1010
|
-
from: string;
|
|
1011
|
-
subject: string;
|
|
1012
|
-
previewText: string | null;
|
|
1013
|
-
contactBookId: string | null;
|
|
1014
|
-
html: string | null;
|
|
1015
|
-
content: string | null;
|
|
1016
|
-
status: string;
|
|
1017
|
-
/** Format: date-time */
|
|
1018
|
-
scheduledAt: string | null;
|
|
1019
|
-
batchSize: number;
|
|
1020
|
-
batchWindowMinutes: number;
|
|
1021
|
-
total: number;
|
|
1022
|
-
sent: number;
|
|
1023
|
-
delivered: number;
|
|
1024
|
-
opened: number;
|
|
1025
|
-
clicked: number;
|
|
1026
|
-
unsubscribed: number;
|
|
1027
|
-
bounced: number;
|
|
1028
|
-
hardBounced: number;
|
|
1029
|
-
complained: number;
|
|
1030
|
-
replyTo: string[];
|
|
1031
|
-
cc: string[];
|
|
1032
|
-
bcc: string[];
|
|
1033
|
-
/** Format: date-time */
|
|
1034
|
-
createdAt: string;
|
|
1035
|
-
/** Format: date-time */
|
|
1036
|
-
updatedAt: string;
|
|
1701
|
+
"application/json": {
|
|
1702
|
+
id: string;
|
|
1037
1703
|
};
|
|
1038
1704
|
};
|
|
1039
1705
|
};
|
|
@@ -1045,7 +1711,7 @@ interface paths {
|
|
|
1045
1711
|
patch?: never;
|
|
1046
1712
|
trace?: never;
|
|
1047
1713
|
};
|
|
1048
|
-
"/v1/
|
|
1714
|
+
"/v1/templates/{id}": {
|
|
1049
1715
|
parameters: {
|
|
1050
1716
|
query?: never;
|
|
1051
1717
|
header?: never;
|
|
@@ -1057,13 +1723,13 @@ interface paths {
|
|
|
1057
1723
|
query?: never;
|
|
1058
1724
|
header?: never;
|
|
1059
1725
|
path: {
|
|
1060
|
-
|
|
1726
|
+
id: string;
|
|
1061
1727
|
};
|
|
1062
1728
|
cookie?: never;
|
|
1063
1729
|
};
|
|
1064
1730
|
requestBody?: never;
|
|
1065
1731
|
responses: {
|
|
1066
|
-
/** @description Get
|
|
1732
|
+
/** @description Get template */
|
|
1067
1733
|
200: {
|
|
1068
1734
|
headers: {
|
|
1069
1735
|
[name: string]: unknown;
|
|
@@ -1072,32 +1738,11 @@ interface paths {
|
|
|
1072
1738
|
"application/json": {
|
|
1073
1739
|
id: string;
|
|
1074
1740
|
name: string;
|
|
1075
|
-
from: string;
|
|
1076
1741
|
subject: string;
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
content: string | null;
|
|
1081
|
-
status: string;
|
|
1082
|
-
/** Format: date-time */
|
|
1083
|
-
scheduledAt: string | null;
|
|
1084
|
-
batchSize: number;
|
|
1085
|
-
batchWindowMinutes: number;
|
|
1086
|
-
total: number;
|
|
1087
|
-
sent: number;
|
|
1088
|
-
delivered: number;
|
|
1089
|
-
opened: number;
|
|
1090
|
-
clicked: number;
|
|
1091
|
-
unsubscribed: number;
|
|
1092
|
-
bounced: number;
|
|
1093
|
-
hardBounced: number;
|
|
1094
|
-
complained: number;
|
|
1095
|
-
replyTo: string[];
|
|
1096
|
-
cc: string[];
|
|
1097
|
-
bcc: string[];
|
|
1098
|
-
/** Format: date-time */
|
|
1742
|
+
html?: string | null;
|
|
1743
|
+
content?: string | null;
|
|
1744
|
+
teamId: string;
|
|
1099
1745
|
createdAt: string;
|
|
1100
|
-
/** Format: date-time */
|
|
1101
1746
|
updatedAt: string;
|
|
1102
1747
|
};
|
|
1103
1748
|
};
|
|
@@ -1106,41 +1751,53 @@ interface paths {
|
|
|
1106
1751
|
};
|
|
1107
1752
|
put?: never;
|
|
1108
1753
|
post?: never;
|
|
1109
|
-
delete
|
|
1754
|
+
delete: {
|
|
1755
|
+
parameters: {
|
|
1756
|
+
query?: never;
|
|
1757
|
+
header?: never;
|
|
1758
|
+
path: {
|
|
1759
|
+
id: string;
|
|
1760
|
+
};
|
|
1761
|
+
cookie?: never;
|
|
1762
|
+
};
|
|
1763
|
+
requestBody?: never;
|
|
1764
|
+
responses: {
|
|
1765
|
+
/** @description Delete template */
|
|
1766
|
+
200: {
|
|
1767
|
+
headers: {
|
|
1768
|
+
[name: string]: unknown;
|
|
1769
|
+
};
|
|
1770
|
+
content: {
|
|
1771
|
+
"application/json": {
|
|
1772
|
+
success: boolean;
|
|
1773
|
+
};
|
|
1774
|
+
};
|
|
1775
|
+
};
|
|
1776
|
+
};
|
|
1777
|
+
};
|
|
1110
1778
|
options?: never;
|
|
1111
1779
|
head?: never;
|
|
1112
|
-
patch
|
|
1113
|
-
trace?: never;
|
|
1114
|
-
};
|
|
1115
|
-
"/v1/campaigns/{campaignId}/schedule": {
|
|
1116
|
-
parameters: {
|
|
1117
|
-
query?: never;
|
|
1118
|
-
header?: never;
|
|
1119
|
-
path?: never;
|
|
1120
|
-
cookie?: never;
|
|
1121
|
-
};
|
|
1122
|
-
get?: never;
|
|
1123
|
-
put?: never;
|
|
1124
|
-
post: {
|
|
1780
|
+
patch: {
|
|
1125
1781
|
parameters: {
|
|
1126
1782
|
query?: never;
|
|
1127
1783
|
header?: never;
|
|
1128
1784
|
path: {
|
|
1129
|
-
|
|
1785
|
+
id: string;
|
|
1130
1786
|
};
|
|
1131
1787
|
cookie?: never;
|
|
1132
1788
|
};
|
|
1133
|
-
requestBody
|
|
1789
|
+
requestBody?: {
|
|
1134
1790
|
content: {
|
|
1135
1791
|
"application/json": {
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1792
|
+
name?: string;
|
|
1793
|
+
subject?: string;
|
|
1794
|
+
html?: string;
|
|
1795
|
+
content?: string;
|
|
1139
1796
|
};
|
|
1140
1797
|
};
|
|
1141
1798
|
};
|
|
1142
1799
|
responses: {
|
|
1143
|
-
/** @description
|
|
1800
|
+
/** @description Update template */
|
|
1144
1801
|
200: {
|
|
1145
1802
|
headers: {
|
|
1146
1803
|
[name: string]: unknown;
|
|
@@ -1153,41 +1810,67 @@ interface paths {
|
|
|
1153
1810
|
};
|
|
1154
1811
|
};
|
|
1155
1812
|
};
|
|
1156
|
-
delete?: never;
|
|
1157
|
-
options?: never;
|
|
1158
|
-
head?: never;
|
|
1159
|
-
patch?: never;
|
|
1160
1813
|
trace?: never;
|
|
1161
1814
|
};
|
|
1162
|
-
"/v1/
|
|
1815
|
+
"/v1/suppressions": {
|
|
1163
1816
|
parameters: {
|
|
1164
1817
|
query?: never;
|
|
1165
1818
|
header?: never;
|
|
1166
1819
|
path?: never;
|
|
1167
1820
|
cookie?: never;
|
|
1168
1821
|
};
|
|
1169
|
-
get
|
|
1822
|
+
get: {
|
|
1823
|
+
parameters: {
|
|
1824
|
+
query?: {
|
|
1825
|
+
page?: number;
|
|
1826
|
+
limit?: number;
|
|
1827
|
+
search?: string;
|
|
1828
|
+
reason?: "HARD_BOUNCE" | "COMPLAINT" | "MANUAL" | "UNSUBSCRIBE" | null;
|
|
1829
|
+
};
|
|
1830
|
+
header?: never;
|
|
1831
|
+
path?: never;
|
|
1832
|
+
cookie?: never;
|
|
1833
|
+
};
|
|
1834
|
+
requestBody?: never;
|
|
1835
|
+
responses: {
|
|
1836
|
+
/** @description List suppressions */
|
|
1837
|
+
200: {
|
|
1838
|
+
headers: {
|
|
1839
|
+
[name: string]: unknown;
|
|
1840
|
+
};
|
|
1841
|
+
content: {
|
|
1842
|
+
"application/json": Record<string, never>;
|
|
1843
|
+
};
|
|
1844
|
+
};
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1170
1847
|
put?: never;
|
|
1171
1848
|
post: {
|
|
1172
1849
|
parameters: {
|
|
1173
1850
|
query?: never;
|
|
1174
1851
|
header?: never;
|
|
1175
|
-
path
|
|
1176
|
-
campaignId: string;
|
|
1177
|
-
};
|
|
1852
|
+
path?: never;
|
|
1178
1853
|
cookie?: never;
|
|
1179
1854
|
};
|
|
1180
|
-
requestBody?:
|
|
1855
|
+
requestBody?: {
|
|
1856
|
+
content: {
|
|
1857
|
+
"application/json": {
|
|
1858
|
+
/** Format: email */
|
|
1859
|
+
email: string;
|
|
1860
|
+
/** @enum {string} */
|
|
1861
|
+
reason: "HARD_BOUNCE" | "COMPLAINT" | "MANUAL" | "UNSUBSCRIBE";
|
|
1862
|
+
source?: string;
|
|
1863
|
+
};
|
|
1864
|
+
};
|
|
1865
|
+
};
|
|
1181
1866
|
responses: {
|
|
1182
|
-
/** @description
|
|
1867
|
+
/** @description Create suppression */
|
|
1183
1868
|
200: {
|
|
1184
1869
|
headers: {
|
|
1185
1870
|
[name: string]: unknown;
|
|
1186
1871
|
};
|
|
1187
1872
|
content: {
|
|
1188
|
-
"application/json":
|
|
1189
|
-
success: boolean;
|
|
1190
|
-
};
|
|
1873
|
+
"application/json": Record<string, never>;
|
|
1191
1874
|
};
|
|
1192
1875
|
};
|
|
1193
1876
|
};
|
|
@@ -1198,7 +1881,7 @@ interface paths {
|
|
|
1198
1881
|
patch?: never;
|
|
1199
1882
|
trace?: never;
|
|
1200
1883
|
};
|
|
1201
|
-
"/v1/
|
|
1884
|
+
"/v1/suppressions/email/{email}": {
|
|
1202
1885
|
parameters: {
|
|
1203
1886
|
query?: never;
|
|
1204
1887
|
header?: never;
|
|
@@ -1207,31 +1890,38 @@ interface paths {
|
|
|
1207
1890
|
};
|
|
1208
1891
|
get?: never;
|
|
1209
1892
|
put?: never;
|
|
1210
|
-
post
|
|
1893
|
+
post?: never;
|
|
1894
|
+
delete: {
|
|
1211
1895
|
parameters: {
|
|
1212
1896
|
query?: never;
|
|
1213
1897
|
header?: never;
|
|
1214
1898
|
path: {
|
|
1215
|
-
|
|
1899
|
+
email: string;
|
|
1216
1900
|
};
|
|
1217
1901
|
cookie?: never;
|
|
1218
1902
|
};
|
|
1219
1903
|
requestBody?: never;
|
|
1220
1904
|
responses: {
|
|
1221
|
-
/** @description
|
|
1905
|
+
/** @description Delete suppression */
|
|
1222
1906
|
200: {
|
|
1223
1907
|
headers: {
|
|
1224
1908
|
[name: string]: unknown;
|
|
1225
1909
|
};
|
|
1226
1910
|
content: {
|
|
1227
|
-
"application/json":
|
|
1228
|
-
|
|
1229
|
-
|
|
1911
|
+
"application/json": Record<string, never>;
|
|
1912
|
+
};
|
|
1913
|
+
};
|
|
1914
|
+
/** @description Suppression not found */
|
|
1915
|
+
404: {
|
|
1916
|
+
headers: {
|
|
1917
|
+
[name: string]: unknown;
|
|
1918
|
+
};
|
|
1919
|
+
content: {
|
|
1920
|
+
"application/json": Record<string, never>;
|
|
1230
1921
|
};
|
|
1231
1922
|
};
|
|
1232
1923
|
};
|
|
1233
1924
|
};
|
|
1234
|
-
delete?: never;
|
|
1235
1925
|
options?: never;
|
|
1236
1926
|
head?: never;
|
|
1237
1927
|
patch?: never;
|
|
@@ -1271,6 +1961,10 @@ type DeleteContactResponse = {
|
|
|
1271
1961
|
declare class Contacts {
|
|
1272
1962
|
private readonly unsent;
|
|
1273
1963
|
constructor(unsent: unsent);
|
|
1964
|
+
list(contactBookId: string): Promise<{
|
|
1965
|
+
data: any[] | null;
|
|
1966
|
+
error: ErrorResponse | null;
|
|
1967
|
+
}>;
|
|
1274
1968
|
create(contactBookId: string, payload: CreateContactPayload): Promise<CreateContactResponse>;
|
|
1275
1969
|
get(contactBookId: string, contactId: string): Promise<GetContactResponse>;
|
|
1276
1970
|
update(contactBookId: string, contactId: string, payload: UpdateContactPayload): Promise<UpdateContactResponse>;
|
|
@@ -1325,6 +2019,30 @@ type BatchEmailResponse = {
|
|
|
1325
2019
|
data: BatchEmailResponseSuccess["data"] | null;
|
|
1326
2020
|
error: ErrorResponse | null;
|
|
1327
2021
|
};
|
|
2022
|
+
type ListEmailsResponseSuccess = paths["/v1/emails"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
2023
|
+
type ListEmailsResponse = {
|
|
2024
|
+
data: ListEmailsResponseSuccess["data"] | null;
|
|
2025
|
+
count: number | null;
|
|
2026
|
+
error: ErrorResponse | null;
|
|
2027
|
+
};
|
|
2028
|
+
type GetComplaintsResponseSuccess = paths["/v1/emails/complaints"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
2029
|
+
type GetComplaintsResponse = {
|
|
2030
|
+
data: GetComplaintsResponseSuccess["data"] | null;
|
|
2031
|
+
count: number | null;
|
|
2032
|
+
error: ErrorResponse | null;
|
|
2033
|
+
};
|
|
2034
|
+
type GetBouncesResponseSuccess = paths["/v1/emails/bounces"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
2035
|
+
type GetBouncesResponse = {
|
|
2036
|
+
data: GetBouncesResponseSuccess["data"] | null;
|
|
2037
|
+
count: number | null;
|
|
2038
|
+
error: ErrorResponse | null;
|
|
2039
|
+
};
|
|
2040
|
+
type GetUnsubscribesResponseSuccess = paths["/v1/emails/unsubscribes"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
2041
|
+
type GetUnsubscribesResponse = {
|
|
2042
|
+
data: GetUnsubscribesResponseSuccess["data"] | null;
|
|
2043
|
+
count: number | null;
|
|
2044
|
+
error: ErrorResponse | null;
|
|
2045
|
+
};
|
|
1328
2046
|
declare class Emails {
|
|
1329
2047
|
private readonly unsent;
|
|
1330
2048
|
constructor(unsent: unsent);
|
|
@@ -1337,6 +2055,25 @@ declare class Emails {
|
|
|
1337
2055
|
* @returns A promise that resolves to the list of created email IDs or an error.
|
|
1338
2056
|
*/
|
|
1339
2057
|
batch(payload: BatchEmailPayload, options?: EmailRequestOptions): Promise<BatchEmailResponse>;
|
|
2058
|
+
list(query?: {
|
|
2059
|
+
page?: number;
|
|
2060
|
+
limit?: number;
|
|
2061
|
+
startDate?: string;
|
|
2062
|
+
endDate?: string;
|
|
2063
|
+
domainId?: string | string[];
|
|
2064
|
+
}): Promise<ListEmailsResponse>;
|
|
2065
|
+
getComplaints(query?: {
|
|
2066
|
+
page?: number;
|
|
2067
|
+
limit?: number;
|
|
2068
|
+
}): Promise<GetComplaintsResponse>;
|
|
2069
|
+
getBounces(query?: {
|
|
2070
|
+
page?: number;
|
|
2071
|
+
limit?: number;
|
|
2072
|
+
}): Promise<GetBouncesResponse>;
|
|
2073
|
+
getUnsubscribes(query?: {
|
|
2074
|
+
page?: number;
|
|
2075
|
+
limit?: number;
|
|
2076
|
+
}): Promise<GetUnsubscribesResponse>;
|
|
1340
2077
|
get(id: string): Promise<GetEmailResponse>;
|
|
1341
2078
|
update(id: string, payload: UpdateEmailPayload): Promise<UpdateEmailResponse>;
|
|
1342
2079
|
cancel(id: string): Promise<CancelEmailResponse>;
|
|
@@ -1378,6 +2115,161 @@ declare class Domains {
|
|
|
1378
2115
|
delete(id: number): Promise<DeleteDomainResponse>;
|
|
1379
2116
|
}
|
|
1380
2117
|
|
|
2118
|
+
type ListContactBooksResponse = {
|
|
2119
|
+
data: any[] | null;
|
|
2120
|
+
error: ErrorResponse | null;
|
|
2121
|
+
};
|
|
2122
|
+
type CreateContactBookResponse = {
|
|
2123
|
+
data: {
|
|
2124
|
+
id: string;
|
|
2125
|
+
} | null;
|
|
2126
|
+
error: ErrorResponse | null;
|
|
2127
|
+
};
|
|
2128
|
+
type GetContactBookResponse = {
|
|
2129
|
+
data: any | null;
|
|
2130
|
+
error: ErrorResponse | null;
|
|
2131
|
+
};
|
|
2132
|
+
type UpdateContactBookResponse = {
|
|
2133
|
+
data: {
|
|
2134
|
+
id: string;
|
|
2135
|
+
name: string;
|
|
2136
|
+
} | null;
|
|
2137
|
+
error: ErrorResponse | null;
|
|
2138
|
+
};
|
|
2139
|
+
type DeleteContactBookResponse = {
|
|
2140
|
+
data: {
|
|
2141
|
+
success: boolean;
|
|
2142
|
+
} | null;
|
|
2143
|
+
error: ErrorResponse | null;
|
|
2144
|
+
};
|
|
2145
|
+
declare class ContactBooks {
|
|
2146
|
+
private readonly unsent;
|
|
2147
|
+
constructor(unsent: unsent);
|
|
2148
|
+
list(): Promise<ListContactBooksResponse>;
|
|
2149
|
+
create(payload: {
|
|
2150
|
+
name: string;
|
|
2151
|
+
emoji?: string;
|
|
2152
|
+
properties?: any;
|
|
2153
|
+
}): Promise<CreateContactBookResponse>;
|
|
2154
|
+
get(id: string): Promise<GetContactBookResponse>;
|
|
2155
|
+
update(id: string, payload: {
|
|
2156
|
+
name?: string;
|
|
2157
|
+
emoji?: string;
|
|
2158
|
+
properties?: any;
|
|
2159
|
+
}): Promise<UpdateContactBookResponse>;
|
|
2160
|
+
delete(id: string): Promise<DeleteContactBookResponse>;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
type ListTemplatesResponse = {
|
|
2164
|
+
data: any[] | null;
|
|
2165
|
+
error: ErrorResponse | null;
|
|
2166
|
+
};
|
|
2167
|
+
type CreateTemplateResponse = {
|
|
2168
|
+
data: {
|
|
2169
|
+
id: string;
|
|
2170
|
+
} | null;
|
|
2171
|
+
error: ErrorResponse | null;
|
|
2172
|
+
};
|
|
2173
|
+
type GetTemplateResponse = {
|
|
2174
|
+
data: any | null;
|
|
2175
|
+
error: ErrorResponse | null;
|
|
2176
|
+
};
|
|
2177
|
+
type UpdateTemplateResponse = {
|
|
2178
|
+
data: {
|
|
2179
|
+
success: boolean;
|
|
2180
|
+
} | null;
|
|
2181
|
+
error: ErrorResponse | null;
|
|
2182
|
+
};
|
|
2183
|
+
type DeleteTemplateResponse = {
|
|
2184
|
+
data: {
|
|
2185
|
+
success: boolean;
|
|
2186
|
+
} | null;
|
|
2187
|
+
error: ErrorResponse | null;
|
|
2188
|
+
};
|
|
2189
|
+
declare class Templates {
|
|
2190
|
+
private readonly unsent;
|
|
2191
|
+
constructor(unsent: unsent);
|
|
2192
|
+
list(): Promise<ListTemplatesResponse>;
|
|
2193
|
+
create(payload: {
|
|
2194
|
+
name: string;
|
|
2195
|
+
subject: string;
|
|
2196
|
+
html?: string;
|
|
2197
|
+
content?: string;
|
|
2198
|
+
}): Promise<CreateTemplateResponse>;
|
|
2199
|
+
get(id: string): Promise<GetTemplateResponse>;
|
|
2200
|
+
update(id: string, payload: {
|
|
2201
|
+
name?: string;
|
|
2202
|
+
subject?: string;
|
|
2203
|
+
html?: string;
|
|
2204
|
+
content?: string;
|
|
2205
|
+
}): Promise<UpdateTemplateResponse>;
|
|
2206
|
+
delete(id: string): Promise<DeleteTemplateResponse>;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
type ListWebhooksResponse = {
|
|
2210
|
+
data: any[] | null;
|
|
2211
|
+
error: ErrorResponse | null;
|
|
2212
|
+
};
|
|
2213
|
+
type CreateWebhookResponse = {
|
|
2214
|
+
data: {
|
|
2215
|
+
id: string;
|
|
2216
|
+
} | null;
|
|
2217
|
+
error: ErrorResponse | null;
|
|
2218
|
+
};
|
|
2219
|
+
type UpdateWebhookResponse = {
|
|
2220
|
+
data: {
|
|
2221
|
+
success: boolean;
|
|
2222
|
+
} | null;
|
|
2223
|
+
error: ErrorResponse | null;
|
|
2224
|
+
};
|
|
2225
|
+
type DeleteWebhookResponse = {
|
|
2226
|
+
data: {
|
|
2227
|
+
success: boolean;
|
|
2228
|
+
} | null;
|
|
2229
|
+
error: ErrorResponse | null;
|
|
2230
|
+
};
|
|
2231
|
+
declare class Webhooks {
|
|
2232
|
+
private readonly unsent;
|
|
2233
|
+
constructor(unsent: unsent);
|
|
2234
|
+
list(): Promise<ListWebhooksResponse>;
|
|
2235
|
+
create(payload: {
|
|
2236
|
+
url: string;
|
|
2237
|
+
events: string[];
|
|
2238
|
+
}): Promise<CreateWebhookResponse>;
|
|
2239
|
+
update(id: string, payload: {
|
|
2240
|
+
url?: string;
|
|
2241
|
+
events?: string[];
|
|
2242
|
+
}): Promise<UpdateWebhookResponse>;
|
|
2243
|
+
delete(id: string): Promise<DeleteWebhookResponse>;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
type GetAnalyticsResponse = {
|
|
2247
|
+
data: any | null;
|
|
2248
|
+
error: ErrorResponse | null;
|
|
2249
|
+
};
|
|
2250
|
+
type GetTimeSeriesResponseSuccess = paths["/v1/analytics/time-series"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
2251
|
+
type GetTimeSeriesResponse = {
|
|
2252
|
+
data: GetTimeSeriesResponseSuccess | null;
|
|
2253
|
+
error: ErrorResponse | null;
|
|
2254
|
+
};
|
|
2255
|
+
type GetReputationResponseSuccess = paths["/v1/analytics/reputation"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
2256
|
+
type GetReputationResponse = {
|
|
2257
|
+
data: GetReputationResponseSuccess | null;
|
|
2258
|
+
error: ErrorResponse | null;
|
|
2259
|
+
};
|
|
2260
|
+
declare class Analytics {
|
|
2261
|
+
private readonly unsent;
|
|
2262
|
+
constructor(unsent: unsent);
|
|
2263
|
+
get(query?: Record<string, string>): Promise<GetAnalyticsResponse>;
|
|
2264
|
+
getTimeSeries(query?: {
|
|
2265
|
+
days?: number;
|
|
2266
|
+
domain?: string;
|
|
2267
|
+
}): Promise<GetTimeSeriesResponse>;
|
|
2268
|
+
getReputation(query?: {
|
|
2269
|
+
domain?: string;
|
|
2270
|
+
}): Promise<GetReputationResponse>;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
1381
2273
|
type CreateCampaignPayload = paths["/v1/campaigns"]["post"]["requestBody"]["content"]["application/json"];
|
|
1382
2274
|
type CreateCampaignResponseSuccess = paths["/v1/campaigns"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
1383
2275
|
type CreateCampaignResponse = {
|
|
@@ -1405,6 +2297,10 @@ type CampaignActionResponse = {
|
|
|
1405
2297
|
declare class Campaigns {
|
|
1406
2298
|
private readonly unsent;
|
|
1407
2299
|
constructor(unsent: unsent);
|
|
2300
|
+
list(): Promise<{
|
|
2301
|
+
data: any[] | null;
|
|
2302
|
+
error: ErrorResponse | null;
|
|
2303
|
+
}>;
|
|
1408
2304
|
create(payload: CreateCampaignPayload): Promise<CreateCampaignResponse>;
|
|
1409
2305
|
get(campaignId: string): Promise<GetCampaignResponse>;
|
|
1410
2306
|
schedule(campaignId: string, payload: ScheduleCampaignPayload): Promise<ScheduleCampaignResponse>;
|
|
@@ -1412,13 +2308,87 @@ declare class Campaigns {
|
|
|
1412
2308
|
resume(campaignId: string): Promise<CampaignActionResponse>;
|
|
1413
2309
|
}
|
|
1414
2310
|
|
|
2311
|
+
type ListSuppressionsResponse = {
|
|
2312
|
+
data: any[] | null;
|
|
2313
|
+
error: ErrorResponse | null;
|
|
2314
|
+
};
|
|
2315
|
+
type AddSuppressionResponse = {
|
|
2316
|
+
data: {
|
|
2317
|
+
id: string;
|
|
2318
|
+
} | null;
|
|
2319
|
+
error: ErrorResponse | null;
|
|
2320
|
+
};
|
|
2321
|
+
type DeleteSuppressionResponse = {
|
|
2322
|
+
data: {
|
|
2323
|
+
success: boolean;
|
|
2324
|
+
} | null;
|
|
2325
|
+
error: ErrorResponse | null;
|
|
2326
|
+
};
|
|
2327
|
+
declare class Suppressions {
|
|
2328
|
+
private readonly unsent;
|
|
2329
|
+
constructor(unsent: unsent);
|
|
2330
|
+
list(query?: {
|
|
2331
|
+
page?: number;
|
|
2332
|
+
limit?: number;
|
|
2333
|
+
}): Promise<ListSuppressionsResponse>;
|
|
2334
|
+
add(payload: {
|
|
2335
|
+
email: string;
|
|
2336
|
+
reason?: string;
|
|
2337
|
+
}): Promise<AddSuppressionResponse>;
|
|
2338
|
+
delete(email: string): Promise<DeleteSuppressionResponse>;
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
type ListApiKeysResponse = {
|
|
2342
|
+
data: any[] | null;
|
|
2343
|
+
error: ErrorResponse | null;
|
|
2344
|
+
};
|
|
2345
|
+
type CreateApiKeyResponse = {
|
|
2346
|
+
data: {
|
|
2347
|
+
token: string;
|
|
2348
|
+
} | null;
|
|
2349
|
+
error: ErrorResponse | null;
|
|
2350
|
+
};
|
|
2351
|
+
type DeleteApiKeyResponse = {
|
|
2352
|
+
data: {
|
|
2353
|
+
success: boolean;
|
|
2354
|
+
} | null;
|
|
2355
|
+
error: ErrorResponse | null;
|
|
2356
|
+
};
|
|
2357
|
+
declare class ApiKeys {
|
|
2358
|
+
private readonly unsent;
|
|
2359
|
+
constructor(unsent: unsent);
|
|
2360
|
+
list(): Promise<ListApiKeysResponse>;
|
|
2361
|
+
create(payload: {
|
|
2362
|
+
name: string;
|
|
2363
|
+
permission?: "FULL" | "SENDING";
|
|
2364
|
+
}): Promise<CreateApiKeyResponse>;
|
|
2365
|
+
delete(id: string): Promise<DeleteApiKeyResponse>;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
type GetSettingsResponse = {
|
|
2369
|
+
data: any | null;
|
|
2370
|
+
error: ErrorResponse | null;
|
|
2371
|
+
};
|
|
2372
|
+
declare class Settings {
|
|
2373
|
+
private readonly unsent;
|
|
2374
|
+
constructor(unsent: unsent);
|
|
2375
|
+
get(): Promise<GetSettingsResponse>;
|
|
2376
|
+
}
|
|
2377
|
+
|
|
1415
2378
|
declare class unsent {
|
|
1416
2379
|
readonly key?: string | undefined;
|
|
1417
2380
|
private readonly headers;
|
|
1418
2381
|
readonly domains: Domains;
|
|
1419
2382
|
readonly emails: Emails;
|
|
1420
2383
|
readonly contacts: Contacts;
|
|
2384
|
+
readonly contactBooks: ContactBooks;
|
|
2385
|
+
readonly templates: Templates;
|
|
2386
|
+
readonly webhooks: Webhooks;
|
|
2387
|
+
readonly analytics: Analytics;
|
|
1421
2388
|
readonly campaigns: Campaigns;
|
|
2389
|
+
readonly suppressions: Suppressions;
|
|
2390
|
+
readonly apiKeys: ApiKeys;
|
|
2391
|
+
readonly settings: Settings;
|
|
1422
2392
|
url: string;
|
|
1423
2393
|
constructor(key?: string | undefined, url?: string);
|
|
1424
2394
|
fetchRequest<T>(path: string, options?: {}): Promise<{
|
|
@@ -1449,4 +2419,4 @@ declare class unsent {
|
|
|
1449
2419
|
}>;
|
|
1450
2420
|
}
|
|
1451
2421
|
|
|
1452
|
-
export { Campaigns as campaigns, unsent };
|
|
2422
|
+
export { Analytics as analytics, Campaigns as campaigns, ContactBooks as contactBooks, Templates as templates, unsent, Webhooks as webhooks };
|