Created
July 4, 2022 11:17
-
-
Save klapperkopp/2ddc8b8946668207e879db27f00c197c to your computer and use it in GitHub Desktop.
Cooper Whatsapp Templates via AI Studio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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