Skip to content

Commit

Permalink
add create template by flow_json
Browse files Browse the repository at this point in the history
Differential Revision: D63898308

fbshipit-source-id: b6aaeab8136adbd3758a8b918586f6e0ef918a8e
  • Loading branch information
Gaafar authored and facebook-github-bot committed Oct 7, 2024
1 parent cc5c5cc commit 2768c5d
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions postman/v1/whatsapp-flows-api.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,66 @@
}
]
},
{
"name": "Create Flow Template Message by Flow JSON",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"<TEMPLATE_NAME>\",\n \"language\": \"en_US\",\n \"category\": \"MARKETING\",\n \"components\": [\n {\n \"type\": \"body\",\n \"text\": \"Check out this new offer\"\n },\n {\n \"type\": \"BUTTONS\",\n \"buttons\": [\n {\n \"type\": \"FLOW\",\n \"text\": \"Check out this offer!\",\n \"flow_json\": \"{\\\"version\\\":\\\"5.0\\\",\\\"screens\\\":[{\\\"id\\\":\\\"WELCOME_SCREEN\\\",\\\"layout\\\":{\\\"type\\\":\\\"SingleColumnLayout\\\",\\\"children\\\":[{\\\"type\\\":\\\"TextHeading\\\",\\\"text\\\":\\\"Hello World\\\"},{\\\"type\\\":\\\"Footer\\\",\\\"label\\\":\\\"Complete\\\",\\\"on-click-action\\\":{\\\"name\\\":\\\"complete\\\",\\\"payload\\\":{}}}]},\\\"title\\\":\\\"Welcome\\\",\\\"terminal\\\":true,\\\"success\\\":true,\\\"data\\\":{}}]}\",\n \"navigate_screen\": \"WELCOME_SCREEN\",\n \"flow_action\": \"navigate\"\n }\n ]\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{base-url}}/{{waba-id}}/message_templates",
"host": [
"{{base-url}}"
],
"path": [
"{{waba-id}}",
"message_templates"
]
}
},
"response": [
{
"name": "Create Flow Template Message by Flow JSON",
"originalRequest": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"<TEMPLATE_NAME>\",\n \"language\": \"en_US\",\n \"category\": \"MARKETING\",\n \"components\": [\n {\n \"type\": \"body\",\n \"text\": \"Check out this new offer\"\n },\n {\n \"type\": \"BUTTONS\",\n \"buttons\": [\n {\n \"type\": \"FLOW\",\n \"text\": \"Check out this offer!\",\n \"flow_json\": \"{\\\"version\\\":\\\"5.0\\\",\\\"screens\\\":[{\\\"id\\\":\\\"WELCOME_SCREEN\\\",\\\"layout\\\":{\\\"type\\\":\\\"SingleColumnLayout\\\",\\\"children\\\":[{\\\"type\\\":\\\"TextHeading\\\",\\\"text\\\":\\\"Hello World\\\"},{\\\"type\\\":\\\"Footer\\\",\\\"label\\\":\\\"Complete\\\",\\\"on-click-action\\\":{\\\"name\\\":\\\"complete\\\",\\\"payload\\\":{}}}]},\\\"title\\\":\\\"Welcome\\\",\\\"terminal\\\":true,\\\"success\\\":true,\\\"data\\\":{}}]}\",\n \"navigate_screen\": \"WELCOME_SCREEN\",\n \"flow_action\": \"navigate\"\n }\n ]\n }\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{base-url}}/{{waba-id}}/message_templates",
"host": [
"{{base-url}}"
],
"path": [
"{{waba-id}}",
"message_templates"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [],
"cookie": [],
"body": "{\n \"id\": \"template-1\",\n \"status\": \"PENDING\",\n \"category\": \"MARKETING\"\n}"
}
]
},
{
"name": "Create Flow Template Message by ID",
"request": {
Expand Down

0 comments on commit 2768c5d

Please sign in to comment.