|
19 | 19 | }
|
20 | 20 | ],
|
21 | 21 | "paths": {
|
| 22 | + "/campaigns": { |
| 23 | + "get": { |
| 24 | + "tags": [ |
| 25 | + "campaigns" |
| 26 | + ], |
| 27 | + "summary": "Gets a list of all campaigns.", |
| 28 | + "description": "Returns a JSON list of all campaigns/messages.", |
| 29 | + "operationId": "6a3f46e69e2963faa4a81a5dcb65a439", |
| 30 | + "parameters": [ |
| 31 | + { |
| 32 | + "name": "session", |
| 33 | + "in": "header", |
| 34 | + "description": "Session ID obtained from authentication", |
| 35 | + "required": true, |
| 36 | + "schema": { |
| 37 | + "type": "string" |
| 38 | + } |
| 39 | + } |
| 40 | + ], |
| 41 | + "responses": { |
| 42 | + "200": { |
| 43 | + "description": "Success", |
| 44 | + "content": { |
| 45 | + "application/json": { |
| 46 | + "schema": { |
| 47 | + "type": "array", |
| 48 | + "items": { |
| 49 | + "$ref": "#/components/schemas/Message" |
| 50 | + } |
| 51 | + } |
| 52 | + } |
| 53 | + } |
| 54 | + }, |
| 55 | + "403": { |
| 56 | + "description": "Failure", |
| 57 | + "content": { |
| 58 | + "application/json": { |
| 59 | + "schema": { |
| 60 | + "$ref": "#/components/schemas/UnauthorizedResponse" |
| 61 | + } |
| 62 | + } |
| 63 | + } |
| 64 | + } |
| 65 | + } |
| 66 | + } |
| 67 | + }, |
22 | 68 | "/lists": {
|
23 | 69 | "get": {
|
24 | 70 | "tags": [
|
|
933 | 979 | ],
|
934 | 980 | "summary": "Delete subscription",
|
935 | 981 | "description": "Delete subscription.",
|
936 |
| - "operationId": "50e71f7c52f8e499b4d8bf3b8cc4e9f8", |
| 982 | + "operationId": "c6a8ef93867e2c66bb70b86aba8b1ea8", |
937 | 983 | "parameters": [
|
938 | 984 | {
|
939 | 985 | "name": "session",
|
|
1063 | 1109 | "format": "date-time",
|
1064 | 1110 | "example": "2022-12-01T10:00:00Z"
|
1065 | 1111 | },
|
1066 |
| - "subscription_date": { |
1067 |
| - "type": "string", |
1068 |
| - "format": "date-time", |
1069 |
| - "example": "2022-12-01T10:00:00Z" |
1070 |
| - }, |
1071 | 1112 | "public": {
|
1072 | 1113 | "type": "boolean",
|
1073 | 1114 | "example": true
|
|
1139 | 1180 | },
|
1140 | 1181 | "type": "object"
|
1141 | 1182 | },
|
| 1183 | + "Template": { |
| 1184 | + "properties": { |
| 1185 | + "id": { |
| 1186 | + "type": "integer", |
| 1187 | + "example": 1 |
| 1188 | + }, |
| 1189 | + "title": { |
| 1190 | + "type": "string", |
| 1191 | + "example": "Newsletter" |
| 1192 | + }, |
| 1193 | + "template": { |
| 1194 | + "type": "string", |
| 1195 | + "example": "Hello World!", |
| 1196 | + "nullable": true |
| 1197 | + }, |
| 1198 | + "template_text": { |
| 1199 | + "type": "string", |
| 1200 | + "nullable": true |
| 1201 | + }, |
| 1202 | + "order": { |
| 1203 | + "type": "integer", |
| 1204 | + "nullable": true |
| 1205 | + } |
| 1206 | + }, |
| 1207 | + "type": "object", |
| 1208 | + "nullable": true |
| 1209 | + }, |
| 1210 | + "Message": { |
| 1211 | + "properties": { |
| 1212 | + "id": { |
| 1213 | + "type": "integer" |
| 1214 | + }, |
| 1215 | + "unique_id": { |
| 1216 | + "type": "string", |
| 1217 | + "example": "2df6b147-8470-45ed-8e4e-86aa01af400d" |
| 1218 | + }, |
| 1219 | + "template": { |
| 1220 | + "oneOf": [ |
| 1221 | + { |
| 1222 | + "$ref": "#/components/schemas/Template" |
| 1223 | + } |
| 1224 | + ], |
| 1225 | + "nullable": true |
| 1226 | + }, |
| 1227 | + "message_content": { |
| 1228 | + "properties": { |
| 1229 | + "subject": { |
| 1230 | + "type": "string", |
| 1231 | + "example": "Newsletter" |
| 1232 | + }, |
| 1233 | + "text": { |
| 1234 | + "type": "string", |
| 1235 | + "example": "Hello World!" |
| 1236 | + }, |
| 1237 | + "text_message": { |
| 1238 | + "type": "string" |
| 1239 | + }, |
| 1240 | + "footer": { |
| 1241 | + "type": "string", |
| 1242 | + "example": "This is a footer" |
| 1243 | + } |
| 1244 | + }, |
| 1245 | + "type": "object" |
| 1246 | + }, |
| 1247 | + "message_format": { |
| 1248 | + "properties": { |
| 1249 | + "html_formated": { |
| 1250 | + "type": "boolean" |
| 1251 | + }, |
| 1252 | + "send_format": { |
| 1253 | + "type": "string", |
| 1254 | + "example": "text", |
| 1255 | + "nullable": true |
| 1256 | + }, |
| 1257 | + "as_text": { |
| 1258 | + "type": "boolean", |
| 1259 | + "example": true |
| 1260 | + }, |
| 1261 | + "as_html": { |
| 1262 | + "type": "boolean" |
| 1263 | + }, |
| 1264 | + "as_pdf": { |
| 1265 | + "type": "boolean" |
| 1266 | + }, |
| 1267 | + "as_text_and_html": { |
| 1268 | + "type": "boolean" |
| 1269 | + }, |
| 1270 | + "as_text_and_pdf": { |
| 1271 | + "type": "boolean" |
| 1272 | + } |
| 1273 | + }, |
| 1274 | + "type": "object" |
| 1275 | + }, |
| 1276 | + "message_metadata": { |
| 1277 | + "properties": { |
| 1278 | + "status": { |
| 1279 | + "type": "string", |
| 1280 | + "example": "sent" |
| 1281 | + }, |
| 1282 | + "processed": { |
| 1283 | + "type": "boolean", |
| 1284 | + "example": true |
| 1285 | + }, |
| 1286 | + "views": { |
| 1287 | + "type": "integer", |
| 1288 | + "example": 12 |
| 1289 | + }, |
| 1290 | + "bounce_count": { |
| 1291 | + "type": "integer" |
| 1292 | + }, |
| 1293 | + "entered": { |
| 1294 | + "type": "string", |
| 1295 | + "format": "date-time", |
| 1296 | + "nullable": true |
| 1297 | + }, |
| 1298 | + "sent": { |
| 1299 | + "type": "string", |
| 1300 | + "format": "date-time", |
| 1301 | + "nullable": true |
| 1302 | + } |
| 1303 | + }, |
| 1304 | + "type": "object" |
| 1305 | + }, |
| 1306 | + "message_schedule": { |
| 1307 | + "properties": { |
| 1308 | + "repeat_interval": { |
| 1309 | + "type": "string", |
| 1310 | + "nullable": true |
| 1311 | + }, |
| 1312 | + "repeat_until": { |
| 1313 | + "type": "string", |
| 1314 | + "format": "date-time", |
| 1315 | + "nullable": true |
| 1316 | + }, |
| 1317 | + "requeue_interval": { |
| 1318 | + "type": "string", |
| 1319 | + "nullable": true |
| 1320 | + }, |
| 1321 | + "requeue_until": { |
| 1322 | + "type": "string", |
| 1323 | + "format": "date-time", |
| 1324 | + "nullable": true |
| 1325 | + } |
| 1326 | + }, |
| 1327 | + "type": "object" |
| 1328 | + }, |
| 1329 | + "message_options": { |
| 1330 | + "properties": { |
| 1331 | + "from_field": { |
| 1332 | + "type": "string", |
| 1333 | + "example": " My Name <[email protected]>", |
| 1334 | + "nullable": true |
| 1335 | + }, |
| 1336 | + "to_field": { |
| 1337 | + "type": "string", |
| 1338 | + "example": "", |
| 1339 | + "nullable": true |
| 1340 | + }, |
| 1341 | + "reply_to": { |
| 1342 | + "type": "string", |
| 1343 | + "nullable": true |
| 1344 | + }, |
| 1345 | + "embargo": { |
| 1346 | + "type": "string", |
| 1347 | + "example": "2023-01-01T12:00:00Z", |
| 1348 | + "nullable": true |
| 1349 | + }, |
| 1350 | + "user_selection": { |
| 1351 | + "type": "string", |
| 1352 | + "nullable": true |
| 1353 | + } |
| 1354 | + }, |
| 1355 | + "type": "object" |
| 1356 | + } |
| 1357 | + }, |
| 1358 | + "type": "object" |
| 1359 | + }, |
1142 | 1360 | "UnauthorizedResponse": {
|
1143 | 1361 | "properties": {
|
1144 | 1362 | "message": {
|
|
1178 | 1396 | }
|
1179 | 1397 | },
|
1180 | 1398 | "tags": [
|
| 1399 | + { |
| 1400 | + "name": "campaigns", |
| 1401 | + "description": "campaigns" |
| 1402 | + }, |
1181 | 1403 | {
|
1182 | 1404 | "name": "lists",
|
1183 | 1405 | "description": "lists"
|
|
0 commit comments