Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klapperkopp/2ddc8b8946668207e879db27f00c197c to your computer and use it in GitHub Desktop.
Save klapperkopp/2ddc8b8946668207e879db27f00c197c to your computer and use it in GitHub Desktop.
Cooper Whatsapp Templates via AI Studio
curl --location --request POST 'https://studio-api-eu.ai.vonage.com/messaging/conversation' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Vgai-Key: YOUR_AI_STUDIO_API_KEY_FROM_STUDIO_PROFILE_ICON' \
--data-raw '{
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://cooper-advertising.com/wp-content/uploads/image-social-facebook.jpg"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "property evaluation"
},
{
"type": "text",
"text": "House"
},
{
"type": "text",
"text": "300sqm"
},
{
"type": "text",
"text": "Max Mustermann"
},
{
"type": "text",
"text": "max.mustermann@example.com"
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": 0,
"parameters": [
{
"type": "payload",
"payload": "verify_no_12345"
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": 1,
"parameters": [
{
"type": "payload",
"payload": "verify_yes_12345"
}
]
}
],
"namespace": "YOUR_WHATSAPP_NAMESPACE",
"template": "WHATSAPP_TEMPLATE_NAME",
"locale": "en",
"to": "RECEIVER_PHONE_NUMBER",
"agent_id": "AI_STUDIO_AGENT_ID_FROM_TOP_LEFT",
"channel": "whatsapp"
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment