Skip to content

Commit 30d6058

Browse files
author
github-actions
committed
Update REST API documentation Thu Apr 24 16:14:16 UTC 2025
1 parent cc05556 commit 30d6058

File tree

1 file changed

+141
-9
lines changed

1 file changed

+141
-9
lines changed

restapi.json

+141-9
Original file line numberDiff line numberDiff line change
@@ -88,24 +88,31 @@
8888
"content": {
8989
"application/json": {
9090
"schema": {
91+
"required": [
92+
"content",
93+
"format",
94+
"metadata",
95+
"schedule",
96+
"options"
97+
],
9198
"properties": {
9299
"template_id": {
93100
"type": "integer",
94101
"example": 1
95102
},
96-
"message_content": {
103+
"content": {
97104
"$ref": "#/components/schemas/MessageContentRequest"
98105
},
99-
"message_format": {
106+
"format": {
100107
"$ref": "#/components/schemas/MessageFormatRequest"
101108
},
102-
"message_metadata": {
109+
"metadata": {
103110
"$ref": "#/components/schemas/MessageMetadataRequest"
104111
},
105-
"message_schedule": {
112+
"schedule": {
106113
"$ref": "#/components/schemas/MessageScheduleRequest"
107114
},
108-
"message_options": {
115+
"options": {
109116
"$ref": "#/components/schemas/MessageOptionsRequest"
110117
}
111118
},
@@ -232,21 +239,27 @@
232239
"content": {
233240
"application/json": {
234241
"schema": {
242+
"required": [
243+
"content",
244+
"format",
245+
"schedule",
246+
"options"
247+
],
235248
"properties": {
236249
"template_id": {
237250
"type": "integer",
238251
"example": 1
239252
},
240-
"message_content": {
253+
"content": {
241254
"$ref": "#/components/schemas/MessageContentRequest"
242255
},
243-
"message_format": {
256+
"format": {
244257
"$ref": "#/components/schemas/MessageFormatRequest"
245258
},
246-
"message_schedule": {
259+
"schedule": {
247260
"$ref": "#/components/schemas/MessageScheduleRequest"
248261
},
249-
"message_options": {
262+
"options": {
250263
"$ref": "#/components/schemas/MessageOptionsRequest"
251264
}
252265
},
@@ -1361,6 +1374,108 @@
13611374
}
13621375
}
13631376
}
1377+
},
1378+
"post": {
1379+
"tags": [
1380+
"templates"
1381+
],
1382+
"summary": "Create a new template.",
1383+
"description": "Returns a JSON response of created template.",
1384+
"operationId": "9d9ecb46961f9f456b093c7222c1dd5b",
1385+
"parameters": [
1386+
{
1387+
"name": "session",
1388+
"in": "header",
1389+
"description": "Session ID obtained from authentication",
1390+
"required": true,
1391+
"schema": {
1392+
"type": "string"
1393+
}
1394+
}
1395+
],
1396+
"requestBody": {
1397+
"description": "Pass session credentials",
1398+
"required": true,
1399+
"content": {
1400+
"multipart/form-data": {
1401+
"schema": {
1402+
"required": [
1403+
"title"
1404+
],
1405+
"properties": {
1406+
"title": {
1407+
"type": "string",
1408+
"example": "Newsletter Template"
1409+
},
1410+
"content": {
1411+
"type": "string",
1412+
"example": "<html><body>[CONTENT]</body></html>"
1413+
},
1414+
"text": {
1415+
"type": "string",
1416+
"example": "[CONTENT]"
1417+
},
1418+
"file": {
1419+
"description": "Optional file upload for HTML content",
1420+
"type": "string",
1421+
"format": "binary"
1422+
},
1423+
"check_links": {
1424+
"description": "Check that all links have full URLs",
1425+
"type": "boolean",
1426+
"example": true
1427+
},
1428+
"check_images": {
1429+
"description": "Check that all images have full URLs",
1430+
"type": "boolean",
1431+
"example": false
1432+
},
1433+
"check_external_images": {
1434+
"description": "Check that all external images exist",
1435+
"type": "boolean",
1436+
"example": true
1437+
}
1438+
},
1439+
"type": "object"
1440+
}
1441+
}
1442+
}
1443+
},
1444+
"responses": {
1445+
"201": {
1446+
"description": "Success",
1447+
"content": {
1448+
"application/json": {
1449+
"schema": {
1450+
"type": "array",
1451+
"items": {
1452+
"$ref": "#/components/schemas/Template"
1453+
}
1454+
}
1455+
}
1456+
}
1457+
},
1458+
"403": {
1459+
"description": "Failure",
1460+
"content": {
1461+
"application/json": {
1462+
"schema": {
1463+
"$ref": "#/components/schemas/UnauthorizedResponse"
1464+
}
1465+
}
1466+
}
1467+
},
1468+
"422": {
1469+
"description": "Failure",
1470+
"content": {
1471+
"application/json": {
1472+
"schema": {
1473+
"$ref": "#/components/schemas/ValidationErrorResponse"
1474+
}
1475+
}
1476+
}
1477+
}
1478+
}
13641479
}
13651480
},
13661481
"/templates/{templateId}": {
@@ -1419,6 +1534,12 @@
14191534
"components": {
14201535
"schemas": {
14211536
"MessageContentRequest": {
1537+
"required": [
1538+
"subject",
1539+
"text",
1540+
"text_message",
1541+
"footer"
1542+
],
14221543
"properties": {
14231544
"subject": {
14241545
"type": "string",
@@ -1440,6 +1561,11 @@
14401561
"type": "object"
14411562
},
14421563
"MessageFormatRequest": {
1564+
"required": [
1565+
"html_formated",
1566+
"send_format",
1567+
"format_options"
1568+
],
14431569
"properties": {
14441570
"html_formated": {
14451571
"type": "boolean",
@@ -1481,6 +1607,9 @@
14811607
"type": "object"
14821608
},
14831609
"MessageScheduleRequest": {
1610+
"required": [
1611+
"embargo"
1612+
],
14841613
"properties": {
14851614
"embargo": {
14861615
"type": "string",
@@ -1509,6 +1638,9 @@
15091638
"type": "object"
15101639
},
15111640
"MessageOptionsRequest": {
1641+
"required": [
1642+
"from_field"
1643+
],
15121644
"properties": {
15131645
"from_field": {
15141646
"type": "string",

0 commit comments

Comments
 (0)