curl -X POST "${INSTAGRAM_GRAPH_API_URL}/${INSTAGRAM_USER_ID}/messages" \
-H "Authorization: Bearer ${INSTAGRAM_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"recipient": {
"id": "17841400000000001"
},
"message": {
"attachment": {
"type": "template",
"payload": {
"template_type": "generic",
"elements": [
{
"title": "Blue Tee",
"image_url": "https://example.com/tee.jpg",
"subtitle": "$24.00",
"buttons": [
{
"type": "web_url",
"url": "https://example.com/tee",
"title": "View"
},
{
"type": "postback",
"title": "Buy",
"payload": "BUY_TEE"
}
]
}
]
}
}
}
}'