Skip to content

Commit f385a3b

Browse files
author
github-actions
committed
Update REST API documentation Sat Apr 19 11:33:23 UTC 2025
1 parent 6b38ab6 commit f385a3b

File tree

1 file changed

+227
-0
lines changed

1 file changed

+227
-0
lines changed

Diff for: restapi.json

+227
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,223 @@
6363
}
6464
}
6565
}
66+
},
67+
"post": {
68+
"tags": [
69+
"campaigns"
70+
],
71+
"summary": "Create a message for campaign.",
72+
"description": "Returns created message.",
73+
"operationId": "0319d1013c704f8035533cd671a8f018",
74+
"parameters": [
75+
{
76+
"name": "session",
77+
"in": "header",
78+
"description": "Session ID obtained from authentication",
79+
"required": true,
80+
"schema": {
81+
"type": "string"
82+
}
83+
}
84+
],
85+
"requestBody": {
86+
"description": "Create a new message.",
87+
"required": true,
88+
"content": {
89+
"application/json": {
90+
"schema": {
91+
"properties": {
92+
"message_content": {
93+
"properties": {
94+
"subject": {
95+
"type": "string",
96+
"example": "Campaign Subject"
97+
},
98+
"text": {
99+
"type": "string",
100+
"example": "Full text content"
101+
},
102+
"text_message": {
103+
"type": "string",
104+
"example": "Short text message"
105+
},
106+
"footer": {
107+
"type": "string",
108+
"example": "Unsubscribe link here"
109+
}
110+
},
111+
"type": "object"
112+
},
113+
"message_format": {
114+
"properties": {
115+
"html_formated": {
116+
"type": "boolean",
117+
"example": true
118+
},
119+
"send_format": {
120+
"type": "string",
121+
"enum": [
122+
"html",
123+
"text",
124+
"invite"
125+
],
126+
"example": "html"
127+
},
128+
"format_options": {
129+
"type": "array",
130+
"items": {
131+
"type": "string",
132+
"enum": [
133+
"text",
134+
"html",
135+
"pdf"
136+
]
137+
},
138+
"example": [
139+
"html"
140+
]
141+
}
142+
},
143+
"type": "object"
144+
},
145+
"message_metadata": {
146+
"properties": {
147+
"status": {
148+
"type": "string",
149+
"example": "draft"
150+
}
151+
},
152+
"type": "object"
153+
},
154+
"message_schedule": {
155+
"properties": {
156+
"repeat_interval": {
157+
"type": "string",
158+
"example": "24 hours"
159+
},
160+
"repeat_until": {
161+
"type": "string",
162+
"format": "date-time",
163+
"example": "2025-04-30T00:00:00+04:00"
164+
},
165+
"requeue_interval": {
166+
"type": "string",
167+
"example": "12 hours"
168+
},
169+
"requeue_until": {
170+
"type": "string",
171+
"format": "date-time",
172+
"example": "2025-04-20T00:00:00+04:00"
173+
}
174+
},
175+
"type": "object"
176+
},
177+
"message_options": {
178+
"properties": {
179+
"from_field": {
180+
"type": "string",
181+
"example": "info@example.com"
182+
},
183+
"to_field": {
184+
"type": "string",
185+
"example": "subscriber@example.com"
186+
},
187+
"reply_to": {
188+
"type": "string",
189+
"example": "reply@example.com"
190+
},
191+
"embargo": {
192+
"type": "string",
193+
"example": "2025-04-17 09:00:00"
194+
},
195+
"user_selection": {
196+
"type": "string",
197+
"example": "all-active-users"
198+
}
199+
},
200+
"type": "object"
201+
}
202+
},
203+
"type": "object"
204+
}
205+
}
206+
}
207+
},
208+
"responses": {
209+
"201": {
210+
"description": "Success",
211+
"content": {
212+
"application/json": {
213+
"schema": {
214+
"$ref": "#/components/schemas/Message"
215+
}
216+
}
217+
}
218+
},
219+
"403": {
220+
"description": "Failure",
221+
"content": {
222+
"application/json": {
223+
"schema": {
224+
"$ref": "#/components/schemas/UnauthorizedResponse"
225+
}
226+
}
227+
}
228+
},
229+
"422": {
230+
"description": "Failure",
231+
"content": {
232+
"application/json": {
233+
"schema": {
234+
"$ref": "#/components/schemas/ValidationErrorResponse"
235+
}
236+
}
237+
}
238+
}
239+
}
240+
}
241+
},
242+
"/campaigns/{messageId}": {
243+
"get": {
244+
"tags": [
245+
"campaigns"
246+
],
247+
"summary": "Gets a campaign by id.",
248+
"description": "Returns campaign/message by id.",
249+
"operationId": "a505b5fd32721479dfb0d72198a467f8",
250+
"parameters": [
251+
{
252+
"name": "session",
253+
"in": "header",
254+
"description": "Session ID obtained from authentication",
255+
"required": true,
256+
"schema": {
257+
"type": "string"
258+
}
259+
}
260+
],
261+
"responses": {
262+
"200": {
263+
"description": "Success",
264+
"content": {
265+
"application/json": {
266+
"schema": {
267+
"$ref": "#/components/schemas/Message"
268+
}
269+
}
270+
}
271+
},
272+
"403": {
273+
"description": "Failure",
274+
"content": {
275+
"application/json": {
276+
"schema": {
277+
"$ref": "#/components/schemas/UnauthorizedResponse"
278+
}
279+
}
280+
}
281+
}
282+
}
66283
}
67284
},
68285
"/lists": {
@@ -230,6 +447,16 @@
230447
}
231448
}
232449
}
450+
},
451+
"422": {
452+
"description": "Failure",
453+
"content": {
454+
"application/json": {
455+
"schema": {
456+
"$ref": "#/components/schemas/ValidationErrorResponse"
457+
}
458+
}
459+
}
233460
}
234461
}
235462
}

0 commit comments

Comments
 (0)