Skip to content

Commit e332622

Browse files
authored
Added remaining endpoints to the Swagger Collection (#1283)
* added swagger collection for APIs * added remaining endpoints to the swagger collection
1 parent 39a627d commit e332622

File tree

1 file changed

+256
-1
lines changed

1 file changed

+256
-1
lines changed

docs/swagger/collections.yaml

Lines changed: 256 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,46 @@ paths:
123123
schema:
124124
$ref: "#/components/schemas/Settings"
125125

126+
put:
127+
tags:
128+
- Settings
129+
description: update settings
130+
requestBody:
131+
content:
132+
application/json:
133+
schema:
134+
$ref: "#/components/schemas/Settings"
135+
responses:
136+
"200":
137+
description: response
138+
content:
139+
application/json:
140+
schema:
141+
type: object
142+
properties:
143+
data:
144+
type: boolean
145+
146+
/settings/smtp/test:
147+
post:
148+
tags:
149+
- Settings
150+
requestBody:
151+
content:
152+
application/json:
153+
schema:
154+
$ref: "#/components/schemas/SMTPTest"
155+
responses:
156+
"200":
157+
description: response
158+
content:
159+
application/json:
160+
schema:
161+
type: object
162+
properties:
163+
data:
164+
type: boolean
165+
126166
/admin/reload:
127167
post:
128168
tags:
@@ -531,7 +571,7 @@ paths:
531571
content:
532572
application/json:
533573
schema:
534-
$ref: "#/components/schemas/SubscriberData"
574+
$ref: "#/components/schemas/Bounce"
535575

536576
delete:
537577
description: handles bounce deletion, either a single one (ID in the URI), or a list.
@@ -838,6 +878,25 @@ paths:
838878
application/json:
839879
schema:
840880
$ref: "#/components/schemas/Campaign"
881+
882+
put:
883+
tags:
884+
- Campaigns
885+
parameters:
886+
- in: path
887+
name: campaign_id
888+
required: true
889+
description: the id value of campaign you want to update
890+
schema:
891+
type: number
892+
responses:
893+
"200":
894+
description: response
895+
content:
896+
application/json:
897+
schema:
898+
$ref: "#/components/schemas/CampaignUpdate"
899+
841900
delete:
842901
description: deletes specified campaign
843902
tags:
@@ -896,6 +955,33 @@ paths:
896955
description: The id value of the campaign you want to get the preview of
897956
schema:
898957
type: number
958+
responses:
959+
"200":
960+
description: response
961+
content:
962+
text/html:
963+
schema:
964+
type: string
965+
example: <h3>Hi John!</h3>This is a e-mail campaign. Your second name is Doe and you are from Bengaluru
966+
967+
"/campaigns/{campaign_id}/text":
968+
get:
969+
description: renders the HTML preview of a campaign body
970+
tags:
971+
- Campaigns
972+
parameters:
973+
- in: path
974+
name: id
975+
required: True
976+
description: The id value of the campaign you want to get the preview of
977+
schema:
978+
type: number
979+
- in: path
980+
name: template_id
981+
required: True
982+
description: The id of the template you want to get the preview of
983+
schema:
984+
type: number
899985
responses:
900986
"200":
901987
description: response
@@ -934,6 +1020,62 @@ paths:
9341020
schema:
9351021
$ref: "#/components/schemas/Campaign"
9361022

1023+
1024+
"/campaigns/{campaign_id}/content":
1025+
post:
1026+
description: handles campaign content (body) format conversions.
1027+
tags:
1028+
- Campaigns
1029+
parameters:
1030+
- in: path
1031+
name: campaign_id
1032+
required: true
1033+
schema:
1034+
type: number
1035+
1036+
responses:
1037+
"200":
1038+
description: response
1039+
content:
1040+
application/json:
1041+
schema:
1042+
type: object
1043+
properties:
1044+
data:
1045+
type: string
1046+
1047+
"/campaigns/{campaign_id}/test":
1048+
post:
1049+
description: handles sending of campaign message to arbitrary subscribers for testing
1050+
tags:
1051+
- Campaigns
1052+
parameters:
1053+
- in: path
1054+
name: campaign_id
1055+
required: true
1056+
schema:
1057+
type: number
1058+
- in: path
1059+
name: template_id
1060+
required: true
1061+
schema:
1062+
type: number
1063+
requestBody:
1064+
content:
1065+
application/json:
1066+
schema:
1067+
$ref: "#/components/schemas/CampaignRegistrationInfo"
1068+
responses:
1069+
"200":
1070+
description: response
1071+
content:
1072+
application/json:
1073+
schema:
1074+
type: object
1075+
properties:
1076+
data:
1077+
type: boolean
1078+
9371079
"/media":
9381080
get:
9391081
description: handles retrieval of uploaded media.
@@ -1173,6 +1315,13 @@ paths:
11731315
responses:
11741316
"200":
11751317
description: response
1318+
content:
1319+
application/json:
1320+
schema:
1321+
type: object
1322+
properties:
1323+
data:
1324+
type: boolean
11761325

11771326
"/maintenance/subscriptions/unconfirmed":
11781327
delete:
@@ -1209,6 +1358,28 @@ paths:
12091358
name:
12101359
type: string
12111360

1361+
"/public/subscription":
1362+
post:
1363+
description: handles subscription requests coming from public API calls.
1364+
tags:
1365+
- Public
1366+
responses:
1367+
"200":
1368+
description: response
1369+
content:
1370+
application/json:
1371+
schema:
1372+
type: object
1373+
properties:
1374+
name:
1375+
type: string
1376+
email:
1377+
type: string
1378+
list_uuids:
1379+
type: array
1380+
items:
1381+
type: string
1382+
12121383
components:
12131384
schemas:
12141385
LanguagePack:
@@ -2420,6 +2591,46 @@ components:
24202591
tls_skip_verify:
24212592
type: boolean
24222593

2594+
SMTPTest:
2595+
type: object
2596+
properties:
2597+
uuid:
2598+
type: string
2599+
enabled:
2600+
type: boolean
2601+
host:
2602+
type: string
2603+
hello_hostname:
2604+
type: string
2605+
port:
2606+
type: number
2607+
auth_protocol:
2608+
type: string
2609+
username:
2610+
type: string
2611+
email_headers:
2612+
type: array
2613+
items:
2614+
type: object
2615+
max_conns:
2616+
type: number
2617+
max_msg_retries:
2618+
type: number
2619+
idle_timeout:
2620+
type: string
2621+
wait_timeout:
2622+
type: string
2623+
tls_type:
2624+
type: string
2625+
tls_skip_verify:
2626+
type: boolean
2627+
strEmailHeaders:
2628+
type: string
2629+
password:
2630+
type: string
2631+
email:
2632+
type: string
2633+
24232634
MailBoxBounces:
24242635
type: object
24252636
properties:
@@ -2963,6 +3174,50 @@ components:
29633174
items:
29643175
type: string
29653176

3177+
CampaignUpdate:
3178+
type: object
3179+
properties:
3180+
name:
3181+
type: string
3182+
subject:
3183+
type: string
3184+
lists:
3185+
type: array
3186+
items:
3187+
type: number
3188+
from_email:
3189+
type: string
3190+
messenger:
3191+
type: string
3192+
type:
3193+
type: string
3194+
tags:
3195+
type: array
3196+
items:
3197+
type: string
3198+
send_later:
3199+
type: boolean
3200+
send_at:
3201+
type: object
3202+
headers:
3203+
type: array
3204+
items:
3205+
type: object
3206+
template_id:
3207+
type: number
3208+
content_type:
3209+
type: string
3210+
body:
3211+
type: string
3212+
altbody:
3213+
type: string
3214+
archive:
3215+
type: boolean
3216+
archive_template_id:
3217+
type: number
3218+
archive_meta:
3219+
type: object
3220+
29663221
MediaFileObject:
29673222
type: object
29683223
properties:

0 commit comments

Comments
 (0)