From 5f2d3d434093fdb0e1346ccb8b367b5fe6251b5a Mon Sep 17 00:00:00 2001 From: vlim-twilio <106992286+vlim-twilio@users.noreply.github.com> Date: Mon, 29 Apr 2024 11:56:39 -0700 Subject: [PATCH 01/86] Update link-shortening-domain-cert.10.x.java Fixing typo ('Sring' to 'String') on line 12 --- .../link-shortening-domain-cert.10.x.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/link-shortening/link-shortening-domain-cert/link-shortening-domain-cert.10.x.java b/messaging/link-shortening/link-shortening-domain-cert/link-shortening-domain-cert.10.x.java index 5846bf9f8..3f8d8860a 100644 --- a/messaging/link-shortening/link-shortening-domain-cert/link-shortening-domain-cert.10.x.java +++ b/messaging/link-shortening/link-shortening-domain-cert/link-shortening-domain-cert.10.x.java @@ -9,7 +9,7 @@ public class Example { public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID"); public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN"); - Sring certAndPrivateKey = """-----BEGIN CERTIFICATE----- + String certAndPrivateKey = """-----BEGIN CERTIFICATE----- MIIDqDCCApACCQCBT5e22Q01fjANBgkqhkiG9w0BAQsFADCBlTELMAkGA1UEBhMC VVMxCzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMRYwFAYDVQQK DA1FeGFtcGxlLCBJbmMuMRIwEAYDVQQLDAlUZXN0IERlcHQxFDASBgNVBAMMC2V4 From b1b6e0ee8ada94447b3e620ebe297df415866b63 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 14:34:47 -0400 Subject: [PATCH 02/86] Add WA OTP template example (#1068) * Add WA OTP template example * Sort output * Update messaging/content-templates/create-wa-otp-button-template/output/create-wa-otp-button-template.json --- .../create-wa-otp-button-template.curl | 17 ++++++++++++ .../create-wa-otp-button-template/meta.json | 6 +++++ .../output/create-wa-otp-button-template.json | 27 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.curl create mode 100644 messaging/content-templates/create-wa-otp-button-template/meta.json create mode 100644 messaging/content-templates/create-wa-otp-button-template/output/create-wa-otp-button-template.json diff --git a/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.curl b/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.curl new file mode 100644 index 000000000..ebd1a9a61 --- /dev/null +++ b/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.curl @@ -0,0 +1,17 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "WhatsApp OTP button template", + "language": "en", + "types": { + "whatsapp/authentication":{ + "add_security_recommendation": true, + "code_expiration_minutes": "30", + "actions": [{ + "type": "COPY_CODE", + "copy_code_text": "Copy verification code" + }] + } + } + }' diff --git a/messaging/content-templates/create-wa-otp-button-template/meta.json b/messaging/content-templates/create-wa-otp-button-template/meta.json new file mode 100644 index 000000000..5a6f3f8eb --- /dev/null +++ b/messaging/content-templates/create-wa-otp-button-template/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create a WhatsApp One-time Passcode (OTP) Button Template", + "highlight": "{}", + "title_override": "Create WhatsApp OTP Button Template", + "description_override": "" +} diff --git a/messaging/content-templates/create-wa-otp-button-template/output/create-wa-otp-button-template.json b/messaging/content-templates/create-wa-otp-button-template/output/create-wa-otp-button-template.json new file mode 100644 index 000000000..a604ba3c8 --- /dev/null +++ b/messaging/content-templates/create-wa-otp-button-template/output/create-wa-otp-button-template.json @@ -0,0 +1,27 @@ +{ + "account_sid": "$TWILIO_ACCOUNT_SID", + "date_created": "2023-06-02T14:34:25Z", + "date_updated": "2023-06-02T14:34:25Z", + "friendly_name": "WhatsApp OTP button template", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "whatsapp/authentication": { + "actions": [ + { + "copy_code_text": "Copy verification code", + "type": "COPY_CODE" + } + ], + "add_security_recommendation": true, + "body": "{{1}}", + "code_expiration_minutes": 30 + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": {} +} From 6e85b1ef4e9216e13ad34dc33875860b194e1113 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 14:36:03 -0400 Subject: [PATCH 03/86] Quick reply template sample (#1067) * Quick reply template sample * Update response to match order of actual response --- .../create-a-quick-reply-template.curl | 30 +++++++++++++++ .../create-a-quick-reply-template/meta.json | 6 +++ .../output/create-a-quick-reply-template.json | 38 +++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.curl create mode 100644 messaging/content-templates/create-a-quick-reply-template/meta.json create mode 100644 messaging/content-templates/create-a-quick-reply-template/output/create-a-quick-reply-template.json diff --git a/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.curl b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.curl new file mode 100644 index 000000000..279b0d68c --- /dev/null +++ b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.curl @@ -0,0 +1,30 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "Owl Air Support quick reply template", + "language": "en", + "variables": {"1":"Owl Air Customer"}, + "types": { + "twilio/quick-reply": { + "body": "Hi, {{1}} 👋 \nThanks for contacting Owl Air Support. How can I help?", + "actions": [ + { + "title": "Check flight status", + "id": "flightid1" + }, + { + "title": "Check gate number", + "id": "gateid1" + }, + { + "title": "Speak with an agent", + "id": "agentid1" + } + ] + }, + "twilio/text": { + "body": "Hi, {{1}}. \n Thanks for contacting Owl Air Support. How can I help?." + } + } +}' diff --git a/messaging/content-templates/create-a-quick-reply-template/meta.json b/messaging/content-templates/create-a-quick-reply-template/meta.json new file mode 100644 index 000000000..ceee6f3d7 --- /dev/null +++ b/messaging/content-templates/create-a-quick-reply-template/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create Quick-Reply Template", + "highlight": "{}", + "title_override": "Create a Quick Reply Template", + "description_override": "" +} diff --git a/messaging/content-templates/create-a-quick-reply-template/output/create-a-quick-reply-template.json b/messaging/content-templates/create-a-quick-reply-template/output/create-a-quick-reply-template.json new file mode 100644 index 000000000..e948945f9 --- /dev/null +++ b/messaging/content-templates/create-a-quick-reply-template/output/create-a-quick-reply-template.json @@ -0,0 +1,38 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2022-08-29T10:43:20Z", + "date_updated": "2022-08-29T10:43:20Z", + "friendly_name": "Owl Air Support quick reply template", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/text": { + "body": "Hi, {{ 1 }}. \n Thanks for contacting Owl Air Support. How can I help?." + }, + "twilio/quick-reply": { + "body": "Hi, {{ 1 }}. \n Thanks for contacting Owl Air Support. How can I help?", + "actions": [ + { + "id": "flightid1", + "title": "Check flight status" + }, + { + "id": "gateid1", + "title": "Check gate number" + }, + { + "id": "agentid1", + "title": "Speak with an agent" + } + ] + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "Owl Air Customer" + } +} From c0ed7491d73309f9055bde16e7357845f80b1a79 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 14:36:16 -0400 Subject: [PATCH 04/86] Add cta templates (#1066) * Add cta templates * Update response to match actual --- .../create-call-to-action-template.curl | 27 ++++++++++++++ .../create-call-to-action-template/meta.json | 6 +++ .../create-call-to-action-template.json | 37 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl create mode 100644 messaging/content-templates/create-call-to-action-template/meta.json create mode 100644 messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json diff --git a/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl new file mode 100644 index 000000000..f9c9ae55e --- /dev/null +++ b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl @@ -0,0 +1,27 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "Owl Air flight departure call to action template", + "language": "en", + "variables": {"1": "flight_number", + "2": "arrival_city", + "3": "departure_time", + "4": "gate_number", + "5": "url_suffix"}, + "types": { + "twilio/call-to-action": { + "body": "Owl Air: We will see you soon! Flight {{1}} to {{2}} departs at {{3}} from Gate {{4}}.", + "actions": [{ + "type": "URL", + "title": "Check Flight Status", + "url": "https://owlair.example.com/%7B%7B5%7D%7D" + }, + { + "type": "PHONE_NUMBER", + "title": "Call Support", + "phone": "+15555551234" + }] + } + } +}' diff --git a/messaging/content-templates/create-call-to-action-template/meta.json b/messaging/content-templates/create-call-to-action-template/meta.json new file mode 100644 index 000000000..c0dd81efc --- /dev/null +++ b/messaging/content-templates/create-call-to-action-template/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create a Call-to-action Template", + "highlight": "{}", + "title_override": "Create Call-To-Action Template", + "description_override": "" +} diff --git a/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json b/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json new file mode 100644 index 000000000..ec1dd6664 --- /dev/null +++ b/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json @@ -0,0 +1,37 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2022-01-15T17:09:58Z", + "date_updated": "2022-01-15T17:09:58Z", + "friendly_name": "Owl Air flight departure call to action template", + "language": "en", + "links": { + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests", + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/call-to-action": { + "actions": [ + { + "url": "https://owlair.example.com/%7B%7B5%7D%7D", + "type": "URL", + "title": "Check Flight Status" + }, + { + "phone_number": "+15555551234", + "type": "PHONE_NUMBER", + "title": "Call Support" + } + ], + "body": "Owl Air: We will see you soon! Flight {{1}} to {{2}} departs at {{3}} from Gate {{4}}." + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "flight_number", + "3": "departure_time", + "2": "arrival_city", + "5": "url_suffix", + "4": "gate_number" + } +} From 62e5b7c3bb1ad03532003e813abc3db65e1ed68d Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 14:36:27 -0400 Subject: [PATCH 05/86] Add card template examples (#1065) * Add card template examples * Sort output --- .../create-card-template.curl | 31 +++++++++++++++ .../create-card-template/meta.json | 6 +++ .../output/create-card-template.json | 39 +++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 messaging/content-templates/create-card-template/create-card-template.curl create mode 100644 messaging/content-templates/create-card-template/meta.json create mode 100644 messaging/content-templates/create-card-template/output/create-card-template.json diff --git a/messaging/content-templates/create-card-template/create-card-template.curl b/messaging/content-templates/create-card-template/create-card-template.curl new file mode 100644 index 000000000..bf3ee32e1 --- /dev/null +++ b/messaging/content-templates/create-card-template/create-card-template.curl @@ -0,0 +1,31 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "Owl Air coupon card template", + "language": "en", + "variables": { + "1": "coupon_code" + }, + "types": { + "twilio/card": { + "title": "Congratulations, you'\''ve reached Elite status! Add code {{1}} for 10% off.", + "subtitle": "To unsubscribe, reply Stop", + "actions": [ + { + "url": "https://owlair.example.com/", + "title": "Order Online", + "type": "URL" + }, + { + "phone": "+15551234567", + "title": "Call Us", + "type": "PHONE_NUMBER" + } + ] + }, + "twilio/text": { + "body": "Congratulations, your account reached Elite status, you are now eligible for 10% off any flight! Just add coupon code {{1}} to check out." + } + } +}' diff --git a/messaging/content-templates/create-card-template/meta.json b/messaging/content-templates/create-card-template/meta.json new file mode 100644 index 000000000..03addfe99 --- /dev/null +++ b/messaging/content-templates/create-card-template/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create a Card Template", + "highlight": "{}", + "title_override": "Create Card Template", + "description_override": "" +} diff --git a/messaging/content-templates/create-card-template/output/create-card-template.json b/messaging/content-templates/create-card-template/output/create-card-template.json new file mode 100644 index 000000000..ec2cbbca1 --- /dev/null +++ b/messaging/content-templates/create-card-template/output/create-card-template.json @@ -0,0 +1,39 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2022-08-30T09:19:17Z", + "date_updated": "2022-08-30T09:19:17Z", + "friendly_name": "Owl Air coupon card template", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/card": { + "actions": [ + { + "title": "Order Online", + "type": "URL", + "url": "https://owlair.example.com/" + }, + { + "phone_number": "+15551234567", + "title": "Call Us", + "type": "PHONE_NUMBER" + } + ], + "body": null, + "media": null, + "subtitle": "To unsubscribe, reply Stop", + "title": "Congratulations, you have reached Elite status! Add code {{1}} for 10% off." + }, + "twilio/text": { + "body": "Congratulations, your account reached Elite status, you are now eligible for 10% off any flight! Just add coupon code {{1}} to check out." + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "coupon_code" + } +} From df751313f2b4936409d8dcca9c040294b16e9c88 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 14:36:38 -0400 Subject: [PATCH 06/86] Add list picker content templates sample (#1064) * Add list picker content templates sample * Sort output --- .../create-list-picker-template.curl | 36 ++++++++++++++++ .../create-list-picker-template/meta.json | 6 +++ .../output/create-list-picker-template.json | 42 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 messaging/content-templates/create-list-picker-template/create-list-picker-template.curl create mode 100644 messaging/content-templates/create-list-picker-template/meta.json create mode 100644 messaging/content-templates/create-list-picker-template/output/create-list-picker-template.json diff --git a/messaging/content-templates/create-list-picker-template/create-list-picker-template.curl b/messaging/content-templates/create-list-picker-template/create-list-picker-template.curl new file mode 100644 index 000000000..218fa70f3 --- /dev/null +++ b/messaging/content-templates/create-list-picker-template/create-list-picker-template.curl @@ -0,0 +1,36 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "Owl Air list picker template", + "language": "en", + "variables": { + "1": "end_date" + }, + "types": { + "twilio/list-picker": { + "body": "Owl Air Flash Sale! Hurry! Sale ends on {{1}}!", + "button": "Select a destination", + "items": [ + { + "item": "SFO to NYC for $299", + "description": "Owl Air Flight 1337 to LGA", + "id": "SFO1337" + }, + { + "item": "OAK to Denver for $149", + "description": "Owl Air Flight 5280 to DEN", + "id": "OAK5280" + }, + { + "item": "LAX to Chicago for $199", + "description": "Owl Air Flight 96 to ORD", + "id": "LAX96" + } + ] + }, + "twilio/text": { + "body": "We have flights to the following destinations: (1) New York City, (2) Denver, (3) Chicago. Hurry! Sale ends on {{1}}!" + } + } +}' diff --git a/messaging/content-templates/create-list-picker-template/meta.json b/messaging/content-templates/create-list-picker-template/meta.json new file mode 100644 index 000000000..74838a678 --- /dev/null +++ b/messaging/content-templates/create-list-picker-template/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create a List Picker Template", + "highlight": "{}", + "title_override": "Create List Picker Template", + "description_override": "" +} diff --git a/messaging/content-templates/create-list-picker-template/output/create-list-picker-template.json b/messaging/content-templates/create-list-picker-template/output/create-list-picker-template.json new file mode 100644 index 000000000..ccef263f2 --- /dev/null +++ b/messaging/content-templates/create-list-picker-template/output/create-list-picker-template.json @@ -0,0 +1,42 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2022-08-29T15:46:11Z", + "date_updated": "2022-08-29T15:46:11Z", + "friendly_name": "Owl Air list picker template", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/list-picker": { + "body": "Owl Air Flash Sale! Hurry! Sale ends on {{1}}!", + "button": "Select a destination", + "items": [ + { + "description": "Owl Air Flight 1337 to LGA", + "id": "SFO1337", + "item": "SFO to NYC for $299" + }, + { + "description": "Owl Air Flight 5280 to DEN", + "id": "OAK5280", + "item": "OAK to Denver for $149" + }, + { + "description": "Owl Air Flight 96 to ORD", + "id": "LAX96", + "item": "LAX to Chicago for $199" + } + ] + }, + "twilio/text": { + "body": "We have flights to the following destinations: (1) SFO, (2) OAK, (3) LAX. Hurry! Sale ends on {{1}}!" + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "end_date" + } +} From 330181d528e8b3e435016687f0b2bd745e0e159b Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 14:37:09 -0400 Subject: [PATCH 07/86] Add content templates location samples (#1063) * Add content templates location samples * Update output to match real output --- .../create-location-template.curl | 17 +++++++++++++ .../create-location-template/meta.json | 6 +++++ .../output/create-location-template.json | 24 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 messaging/content-templates/create-location-template/create-location-template.curl create mode 100644 messaging/content-templates/create-location-template/meta.json create mode 100644 messaging/content-templates/create-location-template/output/create-location-template.json diff --git a/messaging/content-templates/create-location-template/create-location-template.curl b/messaging/content-templates/create-location-template/create-location-template.curl new file mode 100644 index 000000000..c60c31172 --- /dev/null +++ b/messaging/content-templates/create-location-template/create-location-template.curl @@ -0,0 +1,17 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "Owl Air location template", + "language": "en", + "types": { + "twilio/text": { + "body": "Owl Air: Time to board, SFO is located at San Francisco International Airport, P.O. Box 8097, San Francisco, CA 94128 " + }, + "twilio/location": { + "latitude": 37.62159755922449, + "longitude": -122.37888566473057, + "label": "Time to Board @ SFO" + } + } +}' diff --git a/messaging/content-templates/create-location-template/meta.json b/messaging/content-templates/create-location-template/meta.json new file mode 100644 index 000000000..4d3055ae1 --- /dev/null +++ b/messaging/content-templates/create-location-template/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create a Location Template", + "highlight": "{}", + "title_override": "Create Location Template", + "description_override": "" +} diff --git a/messaging/content-templates/create-location-template/output/create-location-template.json b/messaging/content-templates/create-location-template/output/create-location-template.json new file mode 100644 index 000000000..e5ef336a5 --- /dev/null +++ b/messaging/content-templates/create-location-template/output/create-location-template.json @@ -0,0 +1,24 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2022-08-29T15:23:12Z", + "date_updated": "2022-08-29T15:23:12Z", + "friendly_name": "Owl Air location template", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/location": { + "label": "Time to Board @ SFO", + "latitude": 37.62159755922449, + "longitude": -122.37888566473057 + }, + "twilio/text": { + "body": "Owl Air: Time to board, SFO is located at San Francisco International Airport, P.O. Box 8097, San Francisco, CA 94128 " + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": {} +} From 544672bac026d8a2d936bffeb4591d64e2f66b23 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 14:37:22 -0400 Subject: [PATCH 08/86] Add media templates sample (#1062) * Add media templates sample * Sort output --- .../create-media-template.curl | 14 +++++++++++ .../create-media-template/meta.json | 6 +++++ .../output/create-media-template.json | 24 +++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 messaging/content-templates/create-media-template/create-media-template.curl create mode 100644 messaging/content-templates/create-media-template/meta.json create mode 100644 messaging/content-templates/create-media-template/output/create-media-template.json diff --git a/messaging/content-templates/create-media-template/create-media-template.curl b/messaging/content-templates/create-media-template/create-media-template.curl new file mode 100644 index 000000000..4932aadce --- /dev/null +++ b/messaging/content-templates/create-media-template/create-media-template.curl @@ -0,0 +1,14 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "Thank you for your order media template", + "language": "en", + "variables": {"1":"OrderNumber"}, + "types": { + "twilio/media": { + "body": "Thank you for your order {{1}}", + "media": ["https://twilio-cms-prod.s3.amazonaws.com/images/library-logo-resource2x.width-1000.png"] + } + } +}' diff --git a/messaging/content-templates/create-media-template/meta.json b/messaging/content-templates/create-media-template/meta.json new file mode 100644 index 000000000..239b71603 --- /dev/null +++ b/messaging/content-templates/create-media-template/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create a Media Template", + "highlight": "{}", + "title_override": "Create Media Template", + "description_override": "" +} diff --git a/messaging/content-templates/create-media-template/output/create-media-template.json b/messaging/content-templates/create-media-template/output/create-media-template.json new file mode 100644 index 000000000..193c226be --- /dev/null +++ b/messaging/content-templates/create-media-template/output/create-media-template.json @@ -0,0 +1,24 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2022-08-29T15:12:22Z", + "date_updated": "2022-08-29T15:12:22Z", + "friendly_name": "Thank you for your order media template", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/media": { + "body": "Thank you for your order {{1}}", + "media": [ + "https://twilio-cms-prod.s3.amazonaws.com/images/library-logo-resource2x.width-1000.png" + ] + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "OrderNumber" + } +} From 952633639df237447024956b6012b28216860dc6 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 14:37:38 -0400 Subject: [PATCH 09/86] Add text template examples (#1061) * Add text template examples * Sort output --- .../create-text-template.curl | 13 +++++++ .../create-text-template.java | 36 +++++++++++++++++++ .../create-text-template/meta.json | 6 ++++ .../output/create-text-template.json | 21 +++++++++++ 4 files changed, 76 insertions(+) create mode 100644 messaging/content-templates/create-text-template/create-text-template.curl create mode 100644 messaging/content-templates/create-text-template/create-text-template.java create mode 100644 messaging/content-templates/create-text-template/meta.json create mode 100644 messaging/content-templates/create-text-template/output/create-text-template.json diff --git a/messaging/content-templates/create-text-template/create-text-template.curl b/messaging/content-templates/create-text-template/create-text-template.curl new file mode 100644 index 000000000..f23b2a12f --- /dev/null +++ b/messaging/content-templates/create-text-template/create-text-template.curl @@ -0,0 +1,13 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "Owl Air Support text template", + "language": "en", + "variables": {"1":"name"}, + "types": { + "twilio/text": { + "body": "Hi, {{1}}. \n Thanks for contacting Owl Air Support. How can I help?." + } + } +}' diff --git a/messaging/content-templates/create-text-template/create-text-template.java b/messaging/content-templates/create-text-template/create-text-template.java new file mode 100644 index 000000000..e6f52ca0c --- /dev/null +++ b/messaging/content-templates/create-text-template/create-text-template.java @@ -0,0 +1,36 @@ +// Install the Java helper library from twilio.com/docs/java/install +import com.twilio.Twilio; +import com.twilio.exception.ApiException; +import com.twilio.rest.content.v1.Content; + +import java.util.Map; + +public class Example { + // Find your Account SID and Auth Token at twilio.com/console + // and set the environment variables. See http://twil.io/secure + public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID"); + public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN"); + + public static void main(String[] args) { + // Initialize the SDK + Twilio.init(ACCOUNT_SID, AUTH_TOKEN); + + // Setup Content + Content.TwilioText type = new Content.TwilioText(); + type.setBody("Hi, {{1}}. \n Thanks for contacting Owl Air Support. How can I help?."); + + Content.Types types = new Content.Types(); + types.setTwilioText(type); + + // Create Content + Content.ContentCreateRequest createRequest = new Content.ContentCreateRequest("en", types); + createRequest.setVariables(Map.of("1", "name")); + createRequest.setFriendlyName("Owl Air Support text template"); + try { + Content content = Content.creator(createRequest).create(); + System.out.println(content.getSid()); + } catch (ApiException e) { + e.printStackTrace(); + } + } +} diff --git a/messaging/content-templates/create-text-template/meta.json b/messaging/content-templates/create-text-template/meta.json new file mode 100644 index 000000000..e583f28a4 --- /dev/null +++ b/messaging/content-templates/create-text-template/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create a Text Template", + "highlight": "{}", + "title_override": "Create Text Template", + "description_override": "" +} diff --git a/messaging/content-templates/create-text-template/output/create-text-template.json b/messaging/content-templates/create-text-template/output/create-text-template.json new file mode 100644 index 000000000..b4f86ea33 --- /dev/null +++ b/messaging/content-templates/create-text-template/output/create-text-template.json @@ -0,0 +1,21 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2022-09-01T12:39:19Z", + "date_updated": "2022-09-01T12:39:19Z", + "friendly_name": "Owl Air Support text template", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/text": { + "body": "Hi, {{1}}. \n Thanks for contacting Owl Air Support. How can I help?." + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "name" + } +} From a650a5591db6e7fce9319ff43c19db1d9493432d Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 14:38:42 -0400 Subject: [PATCH 10/86] Add variables examples (#1060) * Add variables examples * Sort output --- .../use-content-variables/meta.json | 6 +++ .../output/use-content-variables.json | 38 +++++++++++++++++++ .../use-content-variables.curl | 29 ++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 messaging/content-templates/use-content-variables/meta.json create mode 100644 messaging/content-templates/use-content-variables/output/use-content-variables.json create mode 100644 messaging/content-templates/use-content-variables/use-content-variables.curl diff --git a/messaging/content-templates/use-content-variables/meta.json b/messaging/content-templates/use-content-variables/meta.json new file mode 100644 index 000000000..4178f0adf --- /dev/null +++ b/messaging/content-templates/use-content-variables/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Use Variables with Templates", + "highlight": "{}", + "title_override": "Use Variables with Content Templates", + "description_override": "" +} diff --git a/messaging/content-templates/use-content-variables/output/use-content-variables.json b/messaging/content-templates/use-content-variables/output/use-content-variables.json new file mode 100644 index 000000000..792f0b89a --- /dev/null +++ b/messaging/content-templates/use-content-variables/output/use-content-variables.json @@ -0,0 +1,38 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2022-11-17T08:52:12Z", + "date_updated": "2022-11-17T08:52:12Z", + "friendly_name": "Owl Air elite status card template", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/card": { + "actions": [ + { + "title": "Order Online", + "type": "URL", + "url": "https://owlair.example.com/%7B%7B2%7D%7D" + } + ], + "body": null, + "media": [ + "https://twilio-cms-prod.s3.amazonaws.com/%7B%7B3%7D%7D" + ], + "subtitle": "To unsubscribe, reply Stop", + "title": "Congratulations, you've reached Elite status! Add code {{1}} for 10% off." + }, + "twilio/text": { + "body": "Congratulations, you've reached Elite status! Add code {{1}} for 10% off." + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "coupon_code", + "2": "docs", + "3": "images/library-logo-resource2x.width-1000.png" + } +} diff --git a/messaging/content-templates/use-content-variables/use-content-variables.curl b/messaging/content-templates/use-content-variables/use-content-variables.curl new file mode 100644 index 000000000..82640e52e --- /dev/null +++ b/messaging/content-templates/use-content-variables/use-content-variables.curl @@ -0,0 +1,29 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "Owl Air elite status card template", + "language": "en", + "variables": { + "1": "coupon_code", + "2": "docs", + "3": "images/library-logo-resource2x.width-1000.png" + }, + "types": { + "twilio/card": { + "title": "Congratulations, you've reached Elite status! Add code {{1}} for 10% off.", + "subtitle": "To unsubscribe, reply Stop", + "actions": [ + { + "url": "https://twilio.com/%7B%7B2%7D%7D", + "title": "Order Online", + "type": "URL" + } + ], + "media": ["https://twilio-cms-prod.s3.amazonaws.com/%7B%7B3%7D%7D"] + }, + "twilio/text": { + "body": "Congratulations, you've reached Elite status! Add code {{1}} for 10% off." + } + } +}' From 5351843c556159ec9f59dd1732f96d8e1249fa61 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 16:09:16 -0400 Subject: [PATCH 11/86] Fix meta files (#1070) --- .../content-templates/create-a-quick-reply-template/meta.json | 4 +--- .../create-call-to-action-template/meta.json | 4 +--- messaging/content-templates/create-card-template/meta.json | 4 +--- .../content-templates/create-list-picker-template/meta.json | 4 +--- .../content-templates/create-location-template/meta.json | 4 +--- messaging/content-templates/create-media-template/meta.json | 4 +--- messaging/content-templates/create-text-template/meta.json | 4 +--- .../content-templates/create-wa-otp-button-template/meta.json | 4 +--- messaging/content-templates/use-content-variables/meta.json | 4 +--- 9 files changed, 9 insertions(+), 27 deletions(-) diff --git a/messaging/content-templates/create-a-quick-reply-template/meta.json b/messaging/content-templates/create-a-quick-reply-template/meta.json index ceee6f3d7..9fa69172a 100644 --- a/messaging/content-templates/create-a-quick-reply-template/meta.json +++ b/messaging/content-templates/create-a-quick-reply-template/meta.json @@ -1,6 +1,4 @@ { "title": "Content Templates API - Create Quick-Reply Template", - "highlight": "{}", - "title_override": "Create a Quick Reply Template", - "description_override": "" + "type": "server" } diff --git a/messaging/content-templates/create-call-to-action-template/meta.json b/messaging/content-templates/create-call-to-action-template/meta.json index c0dd81efc..079fe3569 100644 --- a/messaging/content-templates/create-call-to-action-template/meta.json +++ b/messaging/content-templates/create-call-to-action-template/meta.json @@ -1,6 +1,4 @@ { "title": "Content Templates API - Create a Call-to-action Template", - "highlight": "{}", - "title_override": "Create Call-To-Action Template", - "description_override": "" + "type": "server" } diff --git a/messaging/content-templates/create-card-template/meta.json b/messaging/content-templates/create-card-template/meta.json index 03addfe99..ace121433 100644 --- a/messaging/content-templates/create-card-template/meta.json +++ b/messaging/content-templates/create-card-template/meta.json @@ -1,6 +1,4 @@ { "title": "Content Templates API - Create a Card Template", - "highlight": "{}", - "title_override": "Create Card Template", - "description_override": "" + "type": "server" } diff --git a/messaging/content-templates/create-list-picker-template/meta.json b/messaging/content-templates/create-list-picker-template/meta.json index 74838a678..ac3e3c912 100644 --- a/messaging/content-templates/create-list-picker-template/meta.json +++ b/messaging/content-templates/create-list-picker-template/meta.json @@ -1,6 +1,4 @@ { "title": "Content Templates API - Create a List Picker Template", - "highlight": "{}", - "title_override": "Create List Picker Template", - "description_override": "" + "type": "server" } diff --git a/messaging/content-templates/create-location-template/meta.json b/messaging/content-templates/create-location-template/meta.json index 4d3055ae1..9fbd2ff24 100644 --- a/messaging/content-templates/create-location-template/meta.json +++ b/messaging/content-templates/create-location-template/meta.json @@ -1,6 +1,4 @@ { "title": "Content Templates API - Create a Location Template", - "highlight": "{}", - "title_override": "Create Location Template", - "description_override": "" + "type": "server" } diff --git a/messaging/content-templates/create-media-template/meta.json b/messaging/content-templates/create-media-template/meta.json index 239b71603..f0d57d7f4 100644 --- a/messaging/content-templates/create-media-template/meta.json +++ b/messaging/content-templates/create-media-template/meta.json @@ -1,6 +1,4 @@ { "title": "Content Templates API - Create a Media Template", - "highlight": "{}", - "title_override": "Create Media Template", - "description_override": "" + "type": "server" } diff --git a/messaging/content-templates/create-text-template/meta.json b/messaging/content-templates/create-text-template/meta.json index e583f28a4..bb7181e1f 100644 --- a/messaging/content-templates/create-text-template/meta.json +++ b/messaging/content-templates/create-text-template/meta.json @@ -1,6 +1,4 @@ { "title": "Content Templates API - Create a Text Template", - "highlight": "{}", - "title_override": "Create Text Template", - "description_override": "" + "type": "server" } diff --git a/messaging/content-templates/create-wa-otp-button-template/meta.json b/messaging/content-templates/create-wa-otp-button-template/meta.json index 5a6f3f8eb..7d1952fbb 100644 --- a/messaging/content-templates/create-wa-otp-button-template/meta.json +++ b/messaging/content-templates/create-wa-otp-button-template/meta.json @@ -1,6 +1,4 @@ { "title": "Content Templates API - Create a WhatsApp One-time Passcode (OTP) Button Template", - "highlight": "{}", - "title_override": "Create WhatsApp OTP Button Template", - "description_override": "" + "type": "server" } diff --git a/messaging/content-templates/use-content-variables/meta.json b/messaging/content-templates/use-content-variables/meta.json index 4178f0adf..0c7aeda2a 100644 --- a/messaging/content-templates/use-content-variables/meta.json +++ b/messaging/content-templates/use-content-variables/meta.json @@ -1,6 +1,4 @@ { "title": "Content Templates API - Use Variables with Templates", - "highlight": "{}", - "title_override": "Use Variables with Content Templates", - "description_override": "" + "type": "server" } From f5d40892489ce1453ff8b41baf91d9068bf1a67a Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 10 Jun 2024 16:09:28 -0400 Subject: [PATCH 12/86] Add WA Card template examples (#1069) * Add WA Card template examples * Sort output * Update messaging/content-templates/create-whatsapp-card/meta.json --- .../create-whatsapp-card.curl | 29 +++++++++++++++ .../create-whatsapp-card/meta.json | 6 ++++ .../output/create-whatsapp-card.json | 36 +++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 messaging/content-templates/create-whatsapp-card/create-whatsapp-card.curl create mode 100644 messaging/content-templates/create-whatsapp-card/meta.json create mode 100644 messaging/content-templates/create-whatsapp-card/output/create-whatsapp-card.json diff --git a/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.curl b/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.curl new file mode 100644 index 000000000..bb7875fe5 --- /dev/null +++ b/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.curl @@ -0,0 +1,29 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "Owl Air coupon card template", + "language": "en", + "variables": { + "1": "coupon_code" + }, + "types": { + "whatsapp/card": { + "body": "Congratulations, you have reached Elite status! Add code {{1}} for 10% off.", + "header_text": "This is a {{1}} card", + "footer": "To unsubscribe, reply Stop", + "actions": [ + { + "url": "https://owlair.example.com/", + "title": "Order Online", + "type": "URL" + }, + { + "phone": "+15555554567", + "title": "Call Us", + "type": "PHONE_NUMBER" + } + ] + } + } +}' diff --git a/messaging/content-templates/create-whatsapp-card/meta.json b/messaging/content-templates/create-whatsapp-card/meta.json new file mode 100644 index 000000000..6c34b97b3 --- /dev/null +++ b/messaging/content-templates/create-whatsapp-card/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create a WhatsApp Card Template", + "highlight": "{}", + "title_override": "Create a WhatsApp Card Template", + "description_override": "" +} diff --git a/messaging/content-templates/create-whatsapp-card/output/create-whatsapp-card.json b/messaging/content-templates/create-whatsapp-card/output/create-whatsapp-card.json new file mode 100644 index 000000000..dbe99b5ee --- /dev/null +++ b/messaging/content-templates/create-whatsapp-card/output/create-whatsapp-card.json @@ -0,0 +1,36 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2023-08-03T14:54:47Z", + "date_updated": "2023-08-03T14:54:47Z", + "friendly_name": "Owl Air coupon card template", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "whatsapp/card": { + "actions": [ + { + "title": "Order Online", + "type": "URL", + "url": "https://owlair.example.com/" + }, + { + "phone": "+1555554567", + "title": "Call Us", + "type": "PHONE_NUMBER" + } + ], + "body": "Congratulations, you have reached Elite status! Add code {{1}} for 10% off.", + "footer": "To unsubscribe, reply Stop", + "header_text": "This is a {{1}} card", + "media": null + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "coupon_code" + } +} From e6b540ab0c511f08970e42301f5538b593c1ce9c Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Tue, 11 Jun 2024 09:54:14 -0400 Subject: [PATCH 13/86] Add whatsapp approvalrequest sample (#1071) --- .../submit-a-template-for-whatsapp-approval/meta.json | 5 +++++ .../output/submit-a-template-for-whatsapp-approval.json | 7 +++++++ .../submit-a-template-for-whatsapp-approval.curl | 7 +++++++ 3 files changed, 19 insertions(+) create mode 100644 messaging/content-templates/submit-a-template-for-whatsapp-approval/meta.json create mode 100644 messaging/content-templates/submit-a-template-for-whatsapp-approval/output/submit-a-template-for-whatsapp-approval.json create mode 100644 messaging/content-templates/submit-a-template-for-whatsapp-approval/submit-a-template-for-whatsapp-approval.curl diff --git a/messaging/content-templates/submit-a-template-for-whatsapp-approval/meta.json b/messaging/content-templates/submit-a-template-for-whatsapp-approval/meta.json new file mode 100644 index 000000000..00957afb6 --- /dev/null +++ b/messaging/content-templates/submit-a-template-for-whatsapp-approval/meta.json @@ -0,0 +1,5 @@ +{ + "title": "Content API - Create WhatsApp ApprovalRequest", + "description": "Submit a Content Template for WhatsApp Approval", + "type": "server" +} \ No newline at end of file diff --git a/messaging/content-templates/submit-a-template-for-whatsapp-approval/output/submit-a-template-for-whatsapp-approval.json b/messaging/content-templates/submit-a-template-for-whatsapp-approval/output/submit-a-template-for-whatsapp-approval.json new file mode 100644 index 000000000..4cf5f3a9f --- /dev/null +++ b/messaging/content-templates/submit-a-template-for-whatsapp-approval/output/submit-a-template-for-whatsapp-approval.json @@ -0,0 +1,7 @@ +{ + "category": "TRANSPORTATION_UPDATE", + "status": "received", + "rejection_reason": "", + "name": "flight_replies", + "content_type": "twilio/quick-reply" +} \ No newline at end of file diff --git a/messaging/content-templates/submit-a-template-for-whatsapp-approval/submit-a-template-for-whatsapp-approval.curl b/messaging/content-templates/submit-a-template-for-whatsapp-approval/submit-a-template-for-whatsapp-approval.curl new file mode 100644 index 000000000..3dd66ac3c --- /dev/null +++ b/messaging/content-templates/submit-a-template-for-whatsapp-approval/submit-a-template-for-whatsapp-approval.curl @@ -0,0 +1,7 @@ +curl -X POST 'https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "name": "flight_replies", + "category": "UTILITY" +}' \ No newline at end of file From c7292cc98c87d54914917e95a2c49931cf03627e Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Tue, 11 Jun 2024 09:54:22 -0400 Subject: [PATCH 14/86] Add fetch all content resources samples (#1072) --- ...ch-all-content-resources-example.json.curl | 2 + .../fetch-all-content-resources/meta.json | 5 ++ .../output/fetch-all-content-resources.json | 84 +++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 messaging/content-templates/fetch-all-content-resources/fetch-all-content-resources-example.json.curl create mode 100644 messaging/content-templates/fetch-all-content-resources/meta.json create mode 100644 messaging/content-templates/fetch-all-content-resources/output/fetch-all-content-resources.json diff --git a/messaging/content-templates/fetch-all-content-resources/fetch-all-content-resources-example.json.curl b/messaging/content-templates/fetch-all-content-resources/fetch-all-content-resources-example.json.curl new file mode 100644 index 000000000..93196e95c --- /dev/null +++ b/messaging/content-templates/fetch-all-content-resources/fetch-all-content-resources-example.json.curl @@ -0,0 +1,2 @@ +curl -X GET "https://content.twilio.com/v1/Content+-u%20$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN/%20No%20newline%20at%20end%20of%20filediff%20--git%20a/messaging/content-templates/fetch-all-content-resources/meta.json%20b/messaging/content-templates/fetch-all-content-resources/meta.jsonnew%20file%20mode%20100644index%20000000000..66b8c1504---%20/dev/null+++%20b/messaging/content-templates/fetch-all-content-resources/meta.json@@%20-0,0%20+1,5%20@@+%7B+"title": "Content Templates API - Fetch all Content Resources", + "title_override": "Fetch all Content Resources", + "type": "server" +} diff --git a/messaging/content-templates/fetch-all-content-resources/output/fetch-all-content-resources.json b/messaging/content-templates/fetch-all-content-resources/output/fetch-all-content-resources.json new file mode 100644 index 000000000..d7ec03de4 --- /dev/null +++ b/messaging/content-templates/fetch-all-content-resources/output/fetch-all-content-resources.json @@ -0,0 +1,84 @@ +{ + "meta": { + "page": 0, + "page_size": 50, + "first_page_url": "https://content.twilio.com/v1/Content?PageSize=50&Page=0", + "previous_page_url": null, + "url": "https://content.twilio.com/v1/Content?PageSize=50&Page=0", + "next_page_url": "https://content.twilio.com/v1/Content?PageSize=50&Page=1&PageToken=DNHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-1678723520", + "key": "contents" + }, + "contents": [ + { + "language": "en", + "date_updated": "2023-03-31T16:06:50Z", + "variables": { + "1": "07:00", + "3": "owl.jpg", + "2": "03/01/2023" + }, + "friendly_name": "whatsappcard2", + "account_sid": "ACXXXXXXXXXXXXXXX", + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2023-03-31T16:06:50Z", + "types": { + "twilio/card": { + "body": null, + "media": [ + "https://twilio.example.com/%7B%7B3%7D%7D" + ], + "subtitle": null, + "actions": [ + { + "index": 0, + "type": "QUICK_REPLY", + "id": "Stop", + "title": "Stop Updates" + } + ], + "title": "See you at {{1}} on {{2}}. Thank you." + } + }, + "links": { + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests", + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp" + } + }, + { + "language": "en", + "date_updated": "2023-03-31T15:50:24Z", + "variables": { + "1": "07:00", + "2": "03/01/2023" + }, + "friendly_name": "whatswppward_01234", + "account_sid": "ACXXXXXXXXXXXXXXX", + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2023-03-31T15:50:24Z", + "types": { + "twilio/card": { + "body": null, + "media": [ + "https://twilio.example.com/owl.jpg" + ], + "subtitle": null, + "actions": [ + { + "index": 0, + "type": "QUICK_REPLY", + "id": "Stop", + "title": "Stop Updates" + } + ], + "title": "See you at {{1}} on {{2}}. Thank you." + } + }, + "links": { + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests", + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp" + } + } + ] +} From 0ce6f0ce5aca0acb976aa32086190cebcd12382d Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Tue, 11 Jun 2024 09:54:36 -0400 Subject: [PATCH 15/86] Add catalog all template samples (#1073) --- .../create-catalog-all-items.curl | 18 ++++++++++++ .../create-catalog-all-items/meta.json | 6 ++++ .../output/create-catalog-all-items.json | 28 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 messaging/content-templates/create-catalog-all-items/create-catalog-all-items.curl create mode 100644 messaging/content-templates/create-catalog-all-items/meta.json create mode 100644 messaging/content-templates/create-catalog-all-items/output/create-catalog-all-items.json diff --git a/messaging/content-templates/create-catalog-all-items/create-catalog-all-items.curl b/messaging/content-templates/create-catalog-all-items/create-catalog-all-items.curl new file mode 100644 index 000000000..3d723917e --- /dev/null +++ b/messaging/content-templates/create-catalog-all-items/create-catalog-all-items.curl @@ -0,0 +1,18 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "Catalog - all products", + "language": "en", + "variables": {"1": "menu_title", "2": "menu_name"}, + "types": { + "twilio/catalog": { + "id": "1017234312776586", + "title": "The Menu: {{1}}", + "body": "Hi, check out this menu {{2}}", + "subtitle": "Great deals", + "thumbnail_item_id": "48rme2i4po" + } + } + }' + diff --git a/messaging/content-templates/create-catalog-all-items/meta.json b/messaging/content-templates/create-catalog-all-items/meta.json new file mode 100644 index 000000000..76de9f286 --- /dev/null +++ b/messaging/content-templates/create-catalog-all-items/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create a Full Catalog Template", + "title_override": "Create Full Catalog Content Template", + "description_override": "", + "type": "server" +} diff --git a/messaging/content-templates/create-catalog-all-items/output/create-catalog-all-items.json b/messaging/content-templates/create-catalog-all-items/output/create-catalog-all-items.json new file mode 100644 index 000000000..bad56c50f --- /dev/null +++ b/messaging/content-templates/create-catalog-all-items/output/create-catalog-all-items.json @@ -0,0 +1,28 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2024-06-10T22:02:53Z", + "date_updated": "2024-06-10T22:02:53Z", + "friendly_name": "Catalog - all products", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/catalog": { + "body": "Hi, check out this menu {{2}}", + "dynamic_items": null, + "id": "1017234312776586", + "items": null, + "subtitle": "Great deals", + "thumbnail_item_id": "48rme2i4po", + "title": "The Menu: {{1}}" + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "menu_title", + "2": "menu_name" + } +} \ No newline at end of file From 9793ec3c3bfe3b99e3ba48cf070576621861f640 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Tue, 11 Jun 2024 09:54:47 -0400 Subject: [PATCH 16/86] Add catalog static samples (#1074) --- .../create-catalog-static-items.curl | 18 +++++++++ .../create-catalog-static-items/meta.json | 7 ++++ .../output/create-catalog-static-items.json | 37 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 messaging/content-templates/create-catalog-static-items/create-catalog-static-items.curl create mode 100644 messaging/content-templates/create-catalog-static-items/meta.json create mode 100644 messaging/content-templates/create-catalog-static-items/output/create-catalog-static-items.json diff --git a/messaging/content-templates/create-catalog-static-items/create-catalog-static-items.curl b/messaging/content-templates/create-catalog-static-items/create-catalog-static-items.curl new file mode 100644 index 000000000..087278f21 --- /dev/null +++ b/messaging/content-templates/create-catalog-static-items/create-catalog-static-items.curl @@ -0,0 +1,18 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "fixedproducts", + "language": "en", + "variables": {"1": "menu_ad", "2": "menu_name"}, + "types": { + "twilio/catalog": { + "id": "1017234312776586", + "body": "Hi, check out this menu {{1}}", + "subtitle": "Great deals", + "title": "The Menu: {{2}}", + "thumbnail_item_id": "48rme2i4po", + "items": [ {"id": "48rme2i4po", "section_title": "veggies"}] + } +} +}' diff --git a/messaging/content-templates/create-catalog-static-items/meta.json b/messaging/content-templates/create-catalog-static-items/meta.json new file mode 100644 index 000000000..30bee9c31 --- /dev/null +++ b/messaging/content-templates/create-catalog-static-items/meta.json @@ -0,0 +1,7 @@ +{ + "title": "Content Templates API - Create Static Catalog Template", + "highlight": "{}", + "title_override": "Create Static Catalog Content Template", + "description_override": "", + "type": "server" +} diff --git a/messaging/content-templates/create-catalog-static-items/output/create-catalog-static-items.json b/messaging/content-templates/create-catalog-static-items/output/create-catalog-static-items.json new file mode 100644 index 000000000..72dc63ce5 --- /dev/null +++ b/messaging/content-templates/create-catalog-static-items/output/create-catalog-static-items.json @@ -0,0 +1,37 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2024-06-10T22:16:39Z", + "date_updated": "2024-06-10T22:16:39Z", + "friendly_name": "fixedproducts", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/catalog": { + "body": "Hi, check out this menu {{1}}", + "dynamic_items": null, + "id": "1017234312776586", + "items": [ + { + "description": null, + "id": "48rme2i4po", + "media_url": null, + "name": null, + "price": null, + "section_title": "veggies" + } + ], + "subtitle": "Great deals", + "thumbnail_item_id": "48rme2i4po", + "title": "The Menu: {{2}}" + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "menu_ad", + "2": "menu_name" + } +} From 1be1249ddcaae270f4b36f5591c6ace708b09a79 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Tue, 11 Jun 2024 09:54:58 -0400 Subject: [PATCH 17/86] Add dynamic products catalog template (#1075) --- ...create-catalog-template-dynamic-items.curl | 18 ++++++++++++ .../meta.json | 5 ++++ ...create-catalog-template-dynamic-items.json | 28 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 messaging/content-templates/create-catalog-template-dynamic-items/create-catalog-template-dynamic-items.curl create mode 100644 messaging/content-templates/create-catalog-template-dynamic-items/meta.json create mode 100644 messaging/content-templates/create-catalog-template-dynamic-items/output/create-catalog-template-dynamic-items.json diff --git a/messaging/content-templates/create-catalog-template-dynamic-items/create-catalog-template-dynamic-items.curl b/messaging/content-templates/create-catalog-template-dynamic-items/create-catalog-template-dynamic-items.curl new file mode 100644 index 000000000..07714e0e1 --- /dev/null +++ b/messaging/content-templates/create-catalog-template-dynamic-items/create-catalog-template-dynamic-items.curl @@ -0,0 +1,18 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "dynamicproducts", + "language": "en", + "variables": {"1": "Hi, check out this menu menu_name", "2": "footer text"}, + "types": { + "twilio/catalog": { + "id": "1017234312776586", + "title": "The Menu: {{1}}", + "body": "{{2}}", + "subtitle": "{{3}}", + "dynamic_items": "{{products}}" + } +} +}' + diff --git a/messaging/content-templates/create-catalog-template-dynamic-items/meta.json b/messaging/content-templates/create-catalog-template-dynamic-items/meta.json new file mode 100644 index 000000000..62e41acd3 --- /dev/null +++ b/messaging/content-templates/create-catalog-template-dynamic-items/meta.json @@ -0,0 +1,5 @@ +{ + "title": "Content Templates API - Create Catalog Template with Dynamic Items", + "title_override": "Create Dynamic Catalog Content Template", + "type": "server" +} diff --git a/messaging/content-templates/create-catalog-template-dynamic-items/output/create-catalog-template-dynamic-items.json b/messaging/content-templates/create-catalog-template-dynamic-items/output/create-catalog-template-dynamic-items.json new file mode 100644 index 000000000..2936bf608 --- /dev/null +++ b/messaging/content-templates/create-catalog-template-dynamic-items/output/create-catalog-template-dynamic-items.json @@ -0,0 +1,28 @@ +{ + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "date_created": "2024-06-10T22:25:37Z", + "date_updated": "2024-06-10T22:25:37Z", + "friendly_name": "dynamicproducts", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests" + }, + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "types": { + "twilio/catalog": { + "body": "{{2}}", + "dynamic_items": "{{products}}", + "id": "1017234312776586", + "items": null, + "subtitle": "{{3}}", + "thumbnail_item_id": null, + "title": "The Menu: {{1}}" + } + }, + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "variables": { + "1": "Hi, check out this menu menu_name", + "2": "footer text" + } +} \ No newline at end of file From 978b16feedbf7696201f45e767d54cb396691ca5 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Wed, 12 Jun 2024 09:24:10 -0400 Subject: [PATCH 18/86] Add approval status sample (#1076) * Add approval status sample * Add newlines --- .../get-template-approval-status-from-whatsapp.curl | 3 +++ .../meta.json | 5 +++++ .../get-template-approval-status-from-whatsapp.json | 13 +++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 messaging/content-templates/get-template-approval-status-from-whatsapp/get-template-approval-status-from-whatsapp.curl create mode 100644 messaging/content-templates/get-template-approval-status-from-whatsapp/meta.json create mode 100644 messaging/content-templates/get-template-approval-status-from-whatsapp/output/get-template-approval-status-from-whatsapp.json diff --git a/messaging/content-templates/get-template-approval-status-from-whatsapp/get-template-approval-status-from-whatsapp.curl b/messaging/content-templates/get-template-approval-status-from-whatsapp/get-template-approval-status-from-whatsapp.curl new file mode 100644 index 000000000..a92aaf1b0 --- /dev/null +++ b/messaging/content-templates/get-template-approval-status-from-whatsapp/get-template-approval-status-from-whatsapp.curl @@ -0,0 +1,3 @@ +curl -X GET 'https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN diff --git a/messaging/content-templates/get-template-approval-status-from-whatsapp/meta.json b/messaging/content-templates/get-template-approval-status-from-whatsapp/meta.json new file mode 100644 index 000000000..52fc61317 --- /dev/null +++ b/messaging/content-templates/get-template-approval-status-from-whatsapp/meta.json @@ -0,0 +1,5 @@ +{ + "title": "Content API - Fetch an ApprovalRequest", + "description": "Check a Template's WhatsApp Approval Status", + "type": "server" +} diff --git a/messaging/content-templates/get-template-approval-status-from-whatsapp/output/get-template-approval-status-from-whatsapp.json b/messaging/content-templates/get-template-approval-status-from-whatsapp/output/get-template-approval-status-from-whatsapp.json new file mode 100644 index 000000000..1e22cfca7 --- /dev/null +++ b/messaging/content-templates/get-template-approval-status-from-whatsapp/output/get-template-approval-status-from-whatsapp.json @@ -0,0 +1,13 @@ +{ + "url": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests", + "whatsapp": { + "category": "TRANSPORTATION_UPDATE", + "status": "pending", + "name": "flight_replies", + "type": "whatsapp", + "content_type": "twilio/quick-reply", + "rejection_reason": "" + }, + "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "sid": "HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +} From 0148043fd952e18f9de082c528db60235ab52d43 Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Wed, 12 Jun 2024 13:22:26 -0400 Subject: [PATCH 19/86] Fix actions array formatting (#1077) --- .../output/create-call-to-action-template.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json b/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json index ec1dd6664..57543c8eb 100644 --- a/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json +++ b/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json @@ -16,12 +16,12 @@ "url": "https://owlair.example.com/%7B%7B5%7D%7D", "type": "URL", "title": "Check Flight Status" - }, - { - "phone_number": "+15555551234", - "type": "PHONE_NUMBER", - "title": "Call Support" - } + }, + { + "phone_number": "+15555551234", + "type": "PHONE_NUMBER", + "title": "Call Support" + } ], "body": "Owl Air: We will see you soon! Flight {{1}} to {{2}} departs at {{3}} from Gate {{4}}." } From ebe2ec577579d0a0025ab48decb0027afa3e2167 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:22:17 -0700 Subject: [PATCH 20/86] Delete messaging/content-templates/create-text-template/create-text-template.java removing previous old sample --- .../create-text-template.java | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 messaging/content-templates/create-text-template/create-text-template.java diff --git a/messaging/content-templates/create-text-template/create-text-template.java b/messaging/content-templates/create-text-template/create-text-template.java deleted file mode 100644 index e6f52ca0c..000000000 --- a/messaging/content-templates/create-text-template/create-text-template.java +++ /dev/null @@ -1,36 +0,0 @@ -// Install the Java helper library from twilio.com/docs/java/install -import com.twilio.Twilio; -import com.twilio.exception.ApiException; -import com.twilio.rest.content.v1.Content; - -import java.util.Map; - -public class Example { - // Find your Account SID and Auth Token at twilio.com/console - // and set the environment variables. See http://twil.io/secure - public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID"); - public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN"); - - public static void main(String[] args) { - // Initialize the SDK - Twilio.init(ACCOUNT_SID, AUTH_TOKEN); - - // Setup Content - Content.TwilioText type = new Content.TwilioText(); - type.setBody("Hi, {{1}}. \n Thanks for contacting Owl Air Support. How can I help?."); - - Content.Types types = new Content.Types(); - types.setTwilioText(type); - - // Create Content - Content.ContentCreateRequest createRequest = new Content.ContentCreateRequest("en", types); - createRequest.setVariables(Map.of("1", "name")); - createRequest.setFriendlyName("Owl Air Support text template"); - try { - Content content = Content.creator(createRequest).create(); - System.out.println(content.getSid()); - } catch (ApiException e) { - e.printStackTrace(); - } - } -} From 798fa8c8b709a3f6897a5371cb1bbf23f68ab271 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:22:36 -0700 Subject: [PATCH 21/86] Add files via upload --- .../create-text-template/TwilioText.java | 26 ++++++++++++++++++ .../create-text-template-example.cs | 27 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 messaging/content-templates/create-text-template/TwilioText.java create mode 100644 messaging/content-templates/create-text-template/create-text-template-example.cs diff --git a/messaging/content-templates/create-text-template/TwilioText.java b/messaging/content-templates/create-text-template/TwilioText.java new file mode 100644 index 000000000..1da2156c4 --- /dev/null +++ b/messaging/content-templates/create-text-template/TwilioText.java @@ -0,0 +1,26 @@ +package Examples; + +import com.twilio.rest.content.v1.Content; + +import java.util.Arrays; +import java.util.Map; + +public class TwilioText { + public static String CreateTemplate() { + var twilioText = new Content.TwilioText(); + twilioText.setBody("Hi {{1}}, thanks for contacting Owl Air Support. How can we help?"); + + var types = new Content.Types(); + types.setTwilioText(twilioText); + + var createRequest = new Content.ContentCreateRequest("en", types); + createRequest.setFriendlyName("java_sdk_example_twilio_text"); + createRequest.setVariables(Map.of( + "1", "first_name" + )); + + var content = Content.creator(createRequest).create(); + + return content.getSid(); + } +} \ No newline at end of file diff --git a/messaging/content-templates/create-text-template/create-text-template-example.cs b/messaging/content-templates/create-text-template/create-text-template-example.cs new file mode 100644 index 000000000..3285ed76c --- /dev/null +++ b/messaging/content-templates/create-text-template/create-text-template-example.cs @@ -0,0 +1,27 @@ +// Install the C# / .NET helper library from twilio.com/docs/csharp/install + +using System; +using Twilio; +using Twilio.Rest.Content.V1; + + TwilioClient.Init(accountSid, authToken); + + // define the twilio/text + var twilioText = new TwilioText.Builder(); + twilioText.WithBody("Hi {{1}}. Thanks for contacting Owl Air Support. How can we help?"); + + // define all the content types to be part of the template + var types = new Types.Builder(); + types.WithTwilioText(twilioText.Build()); + + // build the create request object + var contentCreateRequest = new ContentCreateRequest.Builder(); + contentCreateRequest.WithTypes(types.Build()); + contentCreateRequest.WithLanguage("en"); + contentCreateRequest.WithFriendlyName("text_template"); + contentCreateRequest.WithVariables(new Dictionary() { {"1", "John"} }); + + // create the twilio template + var contentTemplate = await CreateAsync(contentCreateRequest.Build()); + + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file From 4f5e628f907b7072a6ef60706dc228bc54928ac2 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:23:05 -0700 Subject: [PATCH 22/86] Add files via upload --- .../TwilioQuickReply.java | 47 +++++++++++++++++++ .../create-qr-template-example.cs | 45 ++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 messaging/content-templates/create-a-quick-reply-template/TwilioQuickReply.java create mode 100644 messaging/content-templates/create-a-quick-reply-template/create-qr-template-example.cs diff --git a/messaging/content-templates/create-a-quick-reply-template/TwilioQuickReply.java b/messaging/content-templates/create-a-quick-reply-template/TwilioQuickReply.java new file mode 100644 index 000000000..17798d68d --- /dev/null +++ b/messaging/content-templates/create-a-quick-reply-template/TwilioQuickReply.java @@ -0,0 +1,47 @@ +package Examples; + +import com.twilio.rest.content.v1.Content; + +import java.util.Arrays; +import java.util.Map; + +public class TwilioQuickReply { + public static String CreateTemplate() { + var twilioText = new Content.TwilioText(); + twilioText.setBody("Hi {{1}}. Thanks for contacting Owl Air Support. How can we help?"); + + var twilioQuickReply = new Content.TwilioQuickReply(); + twilioQuickReply.setBody("Owl Air Support"); + + var action1 = new Content.QuickReplyAction(); + action1.setType(Content.QuickReplyActionType.QUICK_REPLY); + action1.setTitle("Contact Us"); + action1.setId("contact_us"); + + var action2 = new Content.QuickReplyAction(); + action1.setType(Content.QuickReplyActionType.QUICK_REPLY); + action1.setTitle("Check gate number"); + action1.setId("gate_id_1"); + + var action3 = new Content.QuickReplyAction(); + action1.setType(Content.QuickReplyActionType.QUICK_REPLY); + action1.setTitle("Speak with an agent"); + action1.setId("agent_id_1"); + + twilioQuickReply.setActions(Arrays.asList(action1, action2, action3)); + + var types = new Content.Types(); + types.setTwilioText(twilioText); + types.setTwilioQuickReply(twilioQuickReply); + + var createRequest = new Content.ContentCreateRequest("en", types); + createRequest.setFriendlyName("java_sdk_example_twilio_quickreply"); + createRequest.setVariables(Map.of( + "1", "first_name" + )); + + var content = Content.creator(createRequest).create(); + + return content.getSid(); + } +} \ No newline at end of file diff --git a/messaging/content-templates/create-a-quick-reply-template/create-qr-template-example.cs b/messaging/content-templates/create-a-quick-reply-template/create-qr-template-example.cs new file mode 100644 index 000000000..f2b7141b6 --- /dev/null +++ b/messaging/content-templates/create-a-quick-reply-template/create-qr-template-example.cs @@ -0,0 +1,45 @@ +// Install the C# / .NET helper library from twilio.com/docs/csharp/install + +using System; +using Twilio; +using Twilio.Rest.Content.V1; + + TwilioClient.Init(accountSid, authToken); + + // define the twilio/text type for less rich channels (e.g. SMS) + var twilioText = new TwilioText.Builder(); + twilioText.WithBody("Hi {{1}}. Thanks for contacting Owl Air Support. How can we help?"); + + // define the twilio/quick-reply type for more rich channels + var twilioQuickReply = new TwilioQuickReply.Builder(); + twilioQuickReply.WithBody("Owl Air Support"); + var quickreply1 = new QuickReplyAction.Builder() + .WithTitle("Contact Us") + .WithId("flightid1") + .Build(); + var quickreply2 = new QuickReplyAction.Builder() + .WithTitle("Check gate number") + .WithId("gateid1") + .Build(); + var quickreply3 = new QuickReplyAction.Builder() + .WithTitle("Speak with an agent") + .WithId("agentid1") + .Build(); + twilioQuickReply.WithActions(new List() { quickreply1, quickreply2, quickreply3 }); + + // define all the content types to be part of the template + var types = new Types.Builder(); + types.WithTwilioText(twilioText.Build()); + types.WithTwilioQuickReply(twilioQuickReply.Build()); + + // build the create request object + var contentCreateRequest = new ContentCreateRequest.Builder(); + contentCreateRequest.WithTypes(types.Build()); + contentCreateRequest.WithLanguage("en"); + contentCreateRequest.WithFriendlyName("owl_coupon_card"); + contentCreateRequest.WithVariables(new Dictionary() { {"1", "John"} }); + + // create the twilio template + var contentTemplate = await CreateAsync(contentCreateRequest.Build()); + + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file From a4bba481dac1ba7d4d91256e5ba2cab425b136e7 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:23:36 -0700 Subject: [PATCH 23/86] Add files via upload --- .../TwilioCallToAction.java | 41 +++++++++++++++++++ .../create-cta-template-example.cs | 38 +++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 messaging/content-templates/create-call-to-action-template/TwilioCallToAction.java create mode 100644 messaging/content-templates/create-call-to-action-template/create-cta-template-example.cs diff --git a/messaging/content-templates/create-call-to-action-template/TwilioCallToAction.java b/messaging/content-templates/create-call-to-action-template/TwilioCallToAction.java new file mode 100644 index 000000000..c2b297757 --- /dev/null +++ b/messaging/content-templates/create-call-to-action-template/TwilioCallToAction.java @@ -0,0 +1,41 @@ +package Examples; + +import com.twilio.rest.content.v1.Content; +import java.util.Arrays; +import java.util.Map; + +public class TwilioCallToAction { + public static String CreateTemplate() { + var twilioCallToAction = new Content.TwilioCallToAction(); + twilioCallToAction.setBody("Owl Air: We will see you soon! Flight {{1}} to {{2}} departs at {{3}} from Gate {{4}}."); + + var action1 = new Content.CallToActionAction(); + action1.setType(Content.CallToActionActionType.URL); + action1.setUrl("https://owlair.com/%7B%7B5%7D%7D"); + action1.setTitle("Check Flight Status"); + + var action2 = new Content.CallToActionAction(); + action2.setType(Content.CallToActionActionType.PHONE_NUMBER); + action2.setPhone("+18005551234"); + action2.setTitle("Call Support"); + + twilioCallToAction.setActions(Arrays.asList(action1, action2)); + + var types = new Content.Types(); + types.setTwilioCallToAction(twilioCallToAction); + + var createRequest = new Content.ContentCreateRequest("en", types); + createRequest.setFriendlyName("java_sdk_example_twilio_calltoaction"); + createRequest.setVariables(Map.of( + "1", "flight_number", + "2", "arrival_city", + "3", "departure_time", + "4", "gate_number", + "5", "url_suffix" + )); + + var content = Content.creator(createRequest).create(); + + return content.getSid(); + } +} \ No newline at end of file diff --git a/messaging/content-templates/create-call-to-action-template/create-cta-template-example.cs b/messaging/content-templates/create-call-to-action-template/create-cta-template-example.cs new file mode 100644 index 000000000..03d5664c5 --- /dev/null +++ b/messaging/content-templates/create-call-to-action-template/create-cta-template-example.cs @@ -0,0 +1,38 @@ +// Install the C# / .NET helper library from twilio.com/docs/csharp/install + +using System; +using Twilio; +using Twilio.Rest.Content.V1; + + TwilioClient.Init(accountSid, authToken); + + // define the twilio/call-to-action type + var twilioCallToAction = new TwilioCallToAction.Builder(); + twilioCallToAction.WithBody("Owl Air: We will see you soon! Flight {{1}} to {{2}} departs at {{3}} from Gate {{4}}."); + var cta1 = new CallToAction.Builder() + .WithType(CallToActionActionType.Url) + .WithUrl("https://owlair.com/%7B%7B5%7D%7D") + .WithTitle("Check Flight Status") + .Build(); + var cta2 = new CallToAction.Builder() + .WithType(CallToActionActionType.PhoneNumber) + .WithPhone("+18005551234") + .WithTitle("Call Support") + .Build(); + twilioCallToAction.WithActions(new List() { cta1, cta2 }); + + // define all the content types to be part of the template + var types = new Types.Builder(); + types.WithTwilioCallToAction(twilioCallToAction.Build()); + + // build the create request object + var contentCreateRequest = new ContentCreateRequest.Builder(); + contentCreateRequest.WithTypes(types.Build()); + contentCreateRequest.WithLanguage("en"); + contentCreateRequest.WithFriendlyName("owl_coupon_code"); + contentCreateRequest.WithVariables(new Dictionary() { {"1", "flight_number"}, {"2", "arrival_city"}, {"3", "departure_time"}, {"4", "gate_number"}, {"5", "url_suffix"} }); + + // create the twilio template + var contentTemplate = await CreateAsync(contentCreateRequest.Build()); + + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file From a3a234609efebc8de733b5d4af1b06daec4523fd Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:24:11 -0700 Subject: [PATCH 24/86] Add files via upload --- .../create-card-template/TwilioCard.java | 35 +++++++++++++++++ .../create-card-template-example.cs | 38 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 messaging/content-templates/create-card-template/TwilioCard.java create mode 100644 messaging/content-templates/create-card-template/create-card-template-example.cs diff --git a/messaging/content-templates/create-card-template/TwilioCard.java b/messaging/content-templates/create-card-template/TwilioCard.java new file mode 100644 index 000000000..c0b2aca22 --- /dev/null +++ b/messaging/content-templates/create-card-template/TwilioCard.java @@ -0,0 +1,35 @@ +package Examples; + +import com.twilio.rest.content.v1.Content; +import java.util.Arrays; +import java.util.Map; + +public class TwilioCard { + public static String CreateTemplate() { + var twilioText = new Content.TwilioText(); + twilioText.setBody("Hi {{1}}, thanks for contacting Owl Air Support"); + + var twilioCard = new Content.TwilioCard(); + twilioCard.setTitle("Owl Air Support"); + + var action1 = new Content.CardAction(); + action1.setType(Content.CardActionType.URL); + action1.setUrl("https://www.twilio.com/"); + action1.setTitle("Contact Us"); + + twilioCard.setActions(Arrays.asList(action1)); + + var types = new Content.Types(); + types.setTwilioCard(twilioCard); + + var createRequest = new Content.ContentCreateRequest("en", types); + createRequest.setFriendlyName("java_sdk_example_twilio_card"); + createRequest.setVariables(Map.of( + "1", "John" + )); + + var content = Content.creator(createRequest).create(); + + return content.getSid(); + } +} \ No newline at end of file diff --git a/messaging/content-templates/create-card-template/create-card-template-example.cs b/messaging/content-templates/create-card-template/create-card-template-example.cs new file mode 100644 index 000000000..8f4460dec --- /dev/null +++ b/messaging/content-templates/create-card-template/create-card-template-example.cs @@ -0,0 +1,38 @@ +// Install the C# / .NET helper library from twilio.com/docs/csharp/install + +using System; +using Twilio; +using Twilio.Rest.Content.V1; + + TwilioClient.Init(accountSid, authToken); + + // define the twilio/text type for less rich channels (e.g. SMS) + var twilioText = new TwilioText.Builder(); + twilioText.WithBody("Hi {{1}}. Thanks for contacting Owl Air Support. How can we help?"); + + // define the twilio/card type for more rich channels + var twilioCard = new TwilioCard.Builder(); + twilioCard.WithTitle("Owl Air Support"); + var cardAction1 = new CardAction.Builder() + .WithType(CardActionType.Url) + .WithUrl("https://www.twilio.com/") + .WithTitle("Contact Us") + .Build(); + twilioCard.WithActions(new List() { cardAction1 }); + + // define all the content types to be part of the template + var types = new Types.Builder(); + types.WithTwilioText(twilioText.Build()); + types.WithTwilioCard(twilioCard.Build()); + + // build the create request object + var contentCreateRequest = new ContentCreateRequest.Builder(); + contentCreateRequest.WithTypes(types.Build()); + contentCreateRequest.WithLanguage("en"); + contentCreateRequest.WithFriendlyName("owl_coupon_card"); + contentCreateRequest.WithVariables(new Dictionary() { {"1", "John"} }); + + // create the twilio template + var contentTemplate = await CreateAsync(contentCreateRequest.Build()); + + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file From c3a60b1ffcb564b25c9a0d87bb30aa39843e163b Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:24:57 -0700 Subject: [PATCH 25/86] Add files via upload --- .../TwilioListPicker.java | 44 +++++++++++++++++++ .../create-list-picker-template-example.cs | 43 ++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 messaging/content-templates/create-list-picker-template/TwilioListPicker.java create mode 100644 messaging/content-templates/create-list-picker-template/create-list-picker-template-example.cs diff --git a/messaging/content-templates/create-list-picker-template/TwilioListPicker.java b/messaging/content-templates/create-list-picker-template/TwilioListPicker.java new file mode 100644 index 000000000..fd7623511 --- /dev/null +++ b/messaging/content-templates/create-list-picker-template/TwilioListPicker.java @@ -0,0 +1,44 @@ +package Examples; + +import com.twilio.rest.content.v1.Content; + +import java.util.Arrays; +import java.util.Map; + +public class TwilioListPicker { + public static String CreateTemplate() { + var twilioListPicker = new Content.TwilioListPicker(); + twilioListPicker.setBody("Owl Air Flash Sale! Hurry! Sale ends on {{1}}!"); + + var item1 = new Content.ListItem(); + item1.setItem("SFO to NYC for $299"); + item1.setDescription("Owl Air Flight 1337 to LGA"); + item1.setId("SFO1337"); + + var item2 = new Content.ListItem(); + item1.setItem("OAK to Denver for $149"); + item1.setDescription("Owl Air Flight 5280 to DEN"); + item1.setId("OAK5280"); + + var item3 = new Content.ListItem(); + item1.setItem("LAX to Chicago for $199"); + item1.setDescription("Owl Air Flight 96 to ORD"); + item1.setId("LAX96"); + + twilioListPicker.setItems(Arrays.asList(item1)); + twilioListPicker.setButton("Select Flight"); + + var types = new Content.Types(); + types.setTwilioListPicker(twilioListPicker); + + var createRequest = new Content.ContentCreateRequest("en", types); + createRequest.setFriendlyName("java_sdk_example_twilio_listpicker"); + createRequest.setVariables(Map.of( + "1", "end_date" + )); + + var content = Content.creator(createRequest).create(); + + return content.getSid(); + } +} \ No newline at end of file diff --git a/messaging/content-templates/create-list-picker-template/create-list-picker-template-example.cs b/messaging/content-templates/create-list-picker-template/create-list-picker-template-example.cs new file mode 100644 index 000000000..663995397 --- /dev/null +++ b/messaging/content-templates/create-list-picker-template/create-list-picker-template-example.cs @@ -0,0 +1,43 @@ +// Install the C# / .NET helper library from twilio.com/docs/csharp/install + +using System; +using Twilio; +using Twilio.Rest.Content.V1; + + TwilioClient.Init(accountSid, authToken); + + // define the twilio/list-picker + var twilioListPicker = new TwilioListPicker.Builder(); + twilioListPicker.WithBody("Owl Air Flash Sale! Hurry! Sale ends on {{1}}!"); + var item1 = new ListPickerItems.Builder() + .WithItem("SFO to NYC for $299") + .WithDescription("Owl Air Flight 1337 to LGA") + .WithId("SFO1337") + .Build(); + var item2 = new ListPickerItems.Builder() + .WithItem("OAK to Denver for $149") + .WithDescription("Owl Air Flight 5280 to DEN") + .WithId("OAK5280") + .Build(); + var item3 = new ListPickerItems.Builder() + .WithItem("LAX to Chicago for $199") + .WithDescription("Owl Air Flight 96 to ORD") + .WithId("LAX96") + .Build(); + twilioListPicker.WithItems(new List() { item1, item2, item3 }); + + // define all the content types to be part of the template + var types = new Types.Builder(); + types.WithTwilioListPicker(twilioListPicker.Build()); + + // build the create request object + var contentCreateRequest = new ContentCreateRequest.Builder(); + contentCreateRequest.WithTypes(types.Build()); + contentCreateRequest.WithLanguage("en"); + contentCreateRequest.WithFriendlyName("owl_sale_list"); + contentCreateRequest.WithVariables(new Dictionary() { {"1", "end_date"} }); + + // create the twilio template + var contentTemplate = await CreateAsync(contentCreateRequest.Build()); + + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file From 8852c8e19fd10395edef209003f3a284d30b3313 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:25:21 -0700 Subject: [PATCH 26/86] Add files via upload --- .../TwilioLocation.java | 32 ++++++++++++++++++ .../create-location-template-example.cs | 33 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 messaging/content-templates/create-location-template/TwilioLocation.java create mode 100644 messaging/content-templates/create-location-template/create-location-template-example.cs diff --git a/messaging/content-templates/create-location-template/TwilioLocation.java b/messaging/content-templates/create-location-template/TwilioLocation.java new file mode 100644 index 000000000..d1f7002de --- /dev/null +++ b/messaging/content-templates/create-location-template/TwilioLocation.java @@ -0,0 +1,32 @@ +package Examples; + +import com.twilio.rest.content.v1.Content; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Map; + +public class TwilioLocation { + public static String CreateTemplate() { + var twilioText = new Content.TwilioText(); + twilioText.setBody("Owl Air: Time to board, SFO is located at San Francisco International Airport, P.O. Box 8097, San Francisco, CA 94128"); + + var twilioLocation = new Content.TwilioLocation(); + twilioLocation.setLabel("Time to Board @ SFO"); + twilioLocation.setLatitude(new BigDecimal(37.62159755922449)); + twilioLocation.setLongitude(new BigDecimal(-122.37888566473057)); + + var types = new Content.Types(); + types.setTwilioText(twilioText); + types.setTwilioLocation(twilioLocation); + + var createRequest = new Content.ContentCreateRequest("en", types); + createRequest.setFriendlyName("java_sdk_example_twilio_location"); + createRequest.setVariables(Map.of( + "1", "John" + )); + + var content = Content.creator(createRequest).create(); + + return content.getSid(); + } +} \ No newline at end of file diff --git a/messaging/content-templates/create-location-template/create-location-template-example.cs b/messaging/content-templates/create-location-template/create-location-template-example.cs new file mode 100644 index 000000000..096c53e61 --- /dev/null +++ b/messaging/content-templates/create-location-template/create-location-template-example.cs @@ -0,0 +1,33 @@ +// Install the C# / .NET helper library from twilio.com/docs/csharp/install + +using System; +using Twilio; +using Twilio.Rest.Content.V1; + + TwilioClient.Init(accountSid, authToken); + + // define the twilio/text + var twilioText = new TwilioText.Builder(); + twilioText.WithBody("Owl Air: Time to board, SFO is located at San Francisco International Airport, P.O. Box 8097, San Francisco, CA 94128 "); + + // define the twilio/location + var twilioLocation = new TwilioLocation.Builder(); + twilioLocation.WithLabel("Time to Board @ SFO"); + twilioLocaiton.WithLatitude(37.62159755922449) + twilioLocaiton.WithLongitude(-122.37888566473057) + + // define all the content types to be part of the template + var types = new Types.Builder(); + types.WithTwilioText(twilioText.Build()); + types.WithTwilioLocation(twilioLocation.Build()); + + // build the create request object + var contentCreateRequest = new ContentCreateRequest.Builder(); + contentCreateRequest.WithTypes(types.Build()); + contentCreateRequest.WithLanguage("en"); + contentCreateRequest.WithFriendlyName("location"); + + // create the twilio template + var contentTemplate = await CreateAsync(contentCreateRequest.Build()); + + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file From 225fb16519615043603ce363a10f22032796541d Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:26:12 -0700 Subject: [PATCH 27/86] Add files via upload --- .../create-media-template/TwilioMedia.java | 27 ++++++++++++++++ .../create-media-template-example.cs | 31 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 messaging/content-templates/create-media-template/TwilioMedia.java create mode 100644 messaging/content-templates/create-media-template/create-media-template-example.cs diff --git a/messaging/content-templates/create-media-template/TwilioMedia.java b/messaging/content-templates/create-media-template/TwilioMedia.java new file mode 100644 index 000000000..7cede9584 --- /dev/null +++ b/messaging/content-templates/create-media-template/TwilioMedia.java @@ -0,0 +1,27 @@ +package Examples; + +import com.twilio.rest.content.v1.Content; + +import java.util.Arrays; +import java.util.Map; + +public class TwilioMedia { + public static String CreateTemplate() { + var twilioMedia = new Content.TwilioMedia(); + twilioMedia.setBody("Thank you for your order {{1}}"); + twilioMedia.setMedia(Arrays.asList("https://twilio-cms-prod.s3.amazonaws.com/images/library-logo-resource2x.width-1000.png")); + + var types = new Content.Types(); + types.setTwilioMedia(twilioMedia); + + var createRequest = new Content.ContentCreateRequest("en", types); + createRequest.setFriendlyName("java_sdk_example_twilio_media"); + createRequest.setVariables(Map.of( + "1", "order_number" + )); + + var content = Content.creator(createRequest).create(); + + return content.getSid(); + } +} \ No newline at end of file diff --git a/messaging/content-templates/create-media-template/create-media-template-example.cs b/messaging/content-templates/create-media-template/create-media-template-example.cs new file mode 100644 index 000000000..1a7bd85e0 --- /dev/null +++ b/messaging/content-templates/create-media-template/create-media-template-example.cs @@ -0,0 +1,31 @@ +// Install the C# / .NET helper library from twilio.com/docs/csharp/install + +using System; +using Twilio; +using Twilio.Rest.Content.V1; + + TwilioClient.Init(accountSid, authToken); + + // define the twilio/media type + var twilioMedia = new TwilioMedia.Builder(); + twilioMedia.WithBody("Thank you for your order {{1}}"); + var media1 = new Media.Builder() + .WithMedia("https://twilio-cms-prod.s3.amazonaws.com/images/library-logo-resource2x.width-1000.png") + .Build(); + twilioMedia.WithMedia(new List() { media1 }); + + // define all the content types to be part of the template + var types = new Types.Builder(); + types.WithTwilioMedia(twilioMedia.Build()); + + // build the create request object + var contentCreateRequest = new ContentCreateRequest.Builder(); + contentCreateRequest.WithTypes(types.Build()); + contentCreateRequest.WithLanguage("en"); + contentCreateRequest.WithFriendlyName("media_template"); + contentCreateRequest.WithVariables(new Dictionary() { {"1", "OrderNumber"} }); + + // create the twilio template + var contentTemplate = await CreateAsync(contentCreateRequest.Build()); + + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file From a81f66f4e7b8ba90824284350a88e0b73be0cb76 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:26:42 -0700 Subject: [PATCH 28/86] Add files via upload --- .../WhatsAppAuthentication.java | 30 +++++++++++++++++++ .../create-wa-auth-template-example.cs | 30 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 messaging/content-templates/create-wa-otp-button-template/WhatsAppAuthentication.java create mode 100644 messaging/content-templates/create-wa-otp-button-template/create-wa-auth-template-example.cs diff --git a/messaging/content-templates/create-wa-otp-button-template/WhatsAppAuthentication.java b/messaging/content-templates/create-wa-otp-button-template/WhatsAppAuthentication.java new file mode 100644 index 000000000..5e9652062 --- /dev/null +++ b/messaging/content-templates/create-wa-otp-button-template/WhatsAppAuthentication.java @@ -0,0 +1,30 @@ +package Examples; + +import com.twilio.rest.content.v1.Content; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Map; + +public class WhatsAppAuthentication { + public static String CreateTemplate() { + var waAuth = new Content.WhatsappAuthentication(); + + var action1 = new Content.AuthenticationAction(); + action1.setType(Content.AuthenticationActionType.COPY_CODE); + action1.setCopyCodeText("Copy Code"); + + waAuth.setActions(Arrays.asList(action1)); + waAuth.setAddSecurityRecommendation(true); + waAuth.setCodeExpirationMinutes(new BigDecimal(10)); + + var types = new Content.Types(); + types.setWhatsappAuthentication(waAuth); + + var createRequest = new Content.ContentCreateRequest("en", types); + createRequest.setFriendlyName("java_sdk_example_wa_auth"); + + var content = Content.creator(createRequest).create(); + + return content.getSid(); + } +} \ No newline at end of file diff --git a/messaging/content-templates/create-wa-otp-button-template/create-wa-auth-template-example.cs b/messaging/content-templates/create-wa-otp-button-template/create-wa-auth-template-example.cs new file mode 100644 index 000000000..e5de8c192 --- /dev/null +++ b/messaging/content-templates/create-wa-otp-button-template/create-wa-auth-template-example.cs @@ -0,0 +1,30 @@ +// Install the C# / .NET helper library from twilio.com/docs/csharp/install + +using System; +using Twilio; +using Twilio.Rest.Content.V1; + + TwilioClient.Init(accountSid, authToken); + + // define the whatsapp/authentication type + var whatsappAuthentication = new WhatsappAuthentication.Builder(); + var auth1 = new WhatsappAuthAction.Builder() + .WithType(WhatsappAuthActionType.CopyCode) + .WithCopyCodeText("Check Flight Status") + .Build(); + whatsappAuthentication.WithActions(new List() { auth1 }); + + // define all the content types to be part of the template + var types = new Types.Builder(); + types.WithWhatsappAuthentication(whatsappAuthentication.Build()); + + // build the create request object + var contentCreateRequest = new ContentCreateRequest.Builder(); + contentCreateRequest.WithTypes(types.Build()); + contentCreateRequest.WithLanguage("en"); + contentCreateRequest.WithFriendlyName("whatsapp_otp"); + + // create the twilio template + var contentTemplate = await CreateAsync(contentCreateRequest.Build()); + + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file From 6cf63587d47bd8173ab51d51fe09da55f1523016 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:27:07 -0700 Subject: [PATCH 29/86] Add files via upload --- .../create-whatsapp-card/WhatsAppCard.java | 40 +++++++++++++++++++ .../create-wa-card-template-example.cs | 40 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 messaging/content-templates/create-whatsapp-card/WhatsAppCard.java create mode 100644 messaging/content-templates/create-whatsapp-card/create-wa-card-template-example.cs diff --git a/messaging/content-templates/create-whatsapp-card/WhatsAppCard.java b/messaging/content-templates/create-whatsapp-card/WhatsAppCard.java new file mode 100644 index 000000000..967f92b60 --- /dev/null +++ b/messaging/content-templates/create-whatsapp-card/WhatsAppCard.java @@ -0,0 +1,40 @@ +package Examples; + +import com.twilio.rest.content.v1.Content; + +import java.util.Arrays; +import java.util.Map; + +public class WhatsAppCard { + public static String CreateTemplate() { + var waCard = new Content.WhatsappCard(); + waCard.setBody("Congratulations, you have reached Elite status! Add code {{1}} for 10% off."); + waCard.setHeaderText("This is a {{1}} card"); + waCard.setFooter("To unsubscribe, reply Stop"); + + var action1 = new Content.CardAction(); + action1.setType(Content.CardActionType.URL); + action1.setUrl("https://www.twilio.com/"); + action1.setTitle("Order Online"); + + var action2 = new Content.CardAction(); + action1.setType(Content.CardActionType.PHONE_NUMBER); + action1.setPhone("+15551234567"); + action1.setTitle("Call Us"); + + waCard.setActions(Arrays.asList(action1)); + + var types = new Content.Types(); + types.setWhatsappCard(waCard); + + var createRequest = new Content.ContentCreateRequest("en", types); + createRequest.setFriendlyName("java_sdk_example_wa_card"); + createRequest.setVariables(Map.of( + "1", "coupon_code" + )); + + var content = Content.creator(createRequest).create(); + + return content.getSid(); + } +} \ No newline at end of file diff --git a/messaging/content-templates/create-whatsapp-card/create-wa-card-template-example.cs b/messaging/content-templates/create-whatsapp-card/create-wa-card-template-example.cs new file mode 100644 index 000000000..9fc068a5b --- /dev/null +++ b/messaging/content-templates/create-whatsapp-card/create-wa-card-template-example.cs @@ -0,0 +1,40 @@ +// Install the C# / .NET helper library from twilio.com/docs/csharp/install + +using System; +using Twilio; +using Twilio.Rest.Content.V1; + + TwilioClient.Init(accountSid, authToken); + + // define the whatsapp/card + var whatsappCard = new WhatsappCard.Builder(); + whatsappCard.WithBody("Congratulations, you have reached Elite status! Add code {{1}} for 10% off."); + whatsappCard.WithHeaderText("This is a {{1}} card"); + whatsappCard.WithFooter("To unsubscribe, reply Stop"); + var cardAction1 = new CardAction.Builder() + .WithType(CardActionType.Url) + .WithUrl("https://www.twilio.com/") + .WithTitle("Order Online") + .Build(); + var cardAction2 = new CardAction.Builder() + .WithType(CardActionType.PhoneNumber) + .WithPhone("+15551234567") + .WithTitle("Call Us") + .Build(); + whatsappCard.WithActions(new List() { cardAction1, cardAction2 }); + + // define all the content types to be part of the template + var types = new Types.Builder(); + types.WithWhatsappCard(whatsappCard.Build()); + + // build the create request object + var contentCreateRequest = new ContentCreateRequest.Builder(); + contentCreateRequest.WithTypes(types.Build()); + contentCreateRequest.WithLanguage("en"); + contentCreateRequest.WithFriendlyName("owl_coupon_code"); + contentCreateRequest.WithVariables(new Dictionary() { {"1", "coupon_code"} }); + + // create the twilio template + var contentTemplate = await CreateAsync(contentCreateRequest.Build()); + + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file From d440cc78c2afdbfbbbc460da6c3d78bb559810a5 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:32:47 -0700 Subject: [PATCH 30/86] Rename TwilioQuickReply.java to create-a-quick-reply-template.java file name change --- ...TwilioQuickReply.java => create-a-quick-reply-template.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-a-quick-reply-template/{TwilioQuickReply.java => create-a-quick-reply-template.java} (99%) diff --git a/messaging/content-templates/create-a-quick-reply-template/TwilioQuickReply.java b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.java similarity index 99% rename from messaging/content-templates/create-a-quick-reply-template/TwilioQuickReply.java rename to messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.java index 17798d68d..8e27e3458 100644 --- a/messaging/content-templates/create-a-quick-reply-template/TwilioQuickReply.java +++ b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.java @@ -44,4 +44,4 @@ public static String CreateTemplate() { return content.getSid(); } -} \ No newline at end of file +} From b5654393e6ae6fe230abb58db1e17bc745764005 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:33:16 -0700 Subject: [PATCH 31/86] Rename create-qr-template-example.cs to create-a-quick-reply-template.cs file name change --- ...-qr-template-example.cs => create-a-quick-reply-template.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-a-quick-reply-template/{create-qr-template-example.cs => create-a-quick-reply-template.cs} (98%) diff --git a/messaging/content-templates/create-a-quick-reply-template/create-qr-template-example.cs b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.cs similarity index 98% rename from messaging/content-templates/create-a-quick-reply-template/create-qr-template-example.cs rename to messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.cs index f2b7141b6..275e4ec47 100644 --- a/messaging/content-templates/create-a-quick-reply-template/create-qr-template-example.cs +++ b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.cs @@ -42,4 +42,4 @@ // create the twilio template var contentTemplate = await CreateAsync(contentCreateRequest.Build()); - Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); From 19749bc0458c6a63ab422bad3fa64fb8aa99166e Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:33:44 -0700 Subject: [PATCH 32/86] Rename create-cta-template-example.cs to create-call-to-action-template.cs file name change --- ...ta-template-example.cs => create-call-to-action-template.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-call-to-action-template/{create-cta-template-example.cs => create-call-to-action-template.cs} (98%) diff --git a/messaging/content-templates/create-call-to-action-template/create-cta-template-example.cs b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.cs similarity index 98% rename from messaging/content-templates/create-call-to-action-template/create-cta-template-example.cs rename to messaging/content-templates/create-call-to-action-template/create-call-to-action-template.cs index 03d5664c5..7b854661f 100644 --- a/messaging/content-templates/create-call-to-action-template/create-cta-template-example.cs +++ b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.cs @@ -35,4 +35,4 @@ // create the twilio template var contentTemplate = await CreateAsync(contentCreateRequest.Build()); - Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); From 279d5c5473cbf336a13b4648b1870d54aa12b423 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:33:59 -0700 Subject: [PATCH 33/86] Rename TwilioCallToAction.java to create-call-to-action-template.java file name change --- ...lioCallToAction.java => create-call-to-action-template.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-call-to-action-template/{TwilioCallToAction.java => create-call-to-action-template.java} (99%) diff --git a/messaging/content-templates/create-call-to-action-template/TwilioCallToAction.java b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.java similarity index 99% rename from messaging/content-templates/create-call-to-action-template/TwilioCallToAction.java rename to messaging/content-templates/create-call-to-action-template/create-call-to-action-template.java index c2b297757..88a3b0062 100644 --- a/messaging/content-templates/create-call-to-action-template/TwilioCallToAction.java +++ b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.java @@ -38,4 +38,4 @@ public static String CreateTemplate() { return content.getSid(); } -} \ No newline at end of file +} From d2dde3bc6ecfebd9263d43ac611b4e9f37f809cd Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:34:30 -0700 Subject: [PATCH 34/86] Rename create-card-template-example.cs to create-card-template.cs file name chnage --- ...{create-card-template-example.cs => create-card-template.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-card-template/{create-card-template-example.cs => create-card-template.cs} (98%) diff --git a/messaging/content-templates/create-card-template/create-card-template-example.cs b/messaging/content-templates/create-card-template/create-card-template.cs similarity index 98% rename from messaging/content-templates/create-card-template/create-card-template-example.cs rename to messaging/content-templates/create-card-template/create-card-template.cs index 8f4460dec..0ee4c51a1 100644 --- a/messaging/content-templates/create-card-template/create-card-template-example.cs +++ b/messaging/content-templates/create-card-template/create-card-template.cs @@ -35,4 +35,4 @@ // create the twilio template var contentTemplate = await CreateAsync(contentCreateRequest.Build()); - Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); From e5052ac2baf13e40f4750fd076253e80b3b91580 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:34:41 -0700 Subject: [PATCH 35/86] Rename TwilioCard.java to create-card-template.java --- .../{TwilioCard.java => create-card-template.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-card-template/{TwilioCard.java => create-card-template.java} (99%) diff --git a/messaging/content-templates/create-card-template/TwilioCard.java b/messaging/content-templates/create-card-template/create-card-template.java similarity index 99% rename from messaging/content-templates/create-card-template/TwilioCard.java rename to messaging/content-templates/create-card-template/create-card-template.java index c0b2aca22..b833ec18a 100644 --- a/messaging/content-templates/create-card-template/TwilioCard.java +++ b/messaging/content-templates/create-card-template/create-card-template.java @@ -32,4 +32,4 @@ public static String CreateTemplate() { return content.getSid(); } -} \ No newline at end of file +} From 759cbca1c15fa6b4c8400f22c9ceaa7dd606a00f Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:35:18 -0700 Subject: [PATCH 36/86] Rename create-list-picker-template-example.cs to create-list-picker-template.cs name change --- ...icker-template-example.cs => create-list-picker-template.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-list-picker-template/{create-list-picker-template-example.cs => create-list-picker-template.cs} (98%) diff --git a/messaging/content-templates/create-list-picker-template/create-list-picker-template-example.cs b/messaging/content-templates/create-list-picker-template/create-list-picker-template.cs similarity index 98% rename from messaging/content-templates/create-list-picker-template/create-list-picker-template-example.cs rename to messaging/content-templates/create-list-picker-template/create-list-picker-template.cs index 663995397..c775fb40d 100644 --- a/messaging/content-templates/create-list-picker-template/create-list-picker-template-example.cs +++ b/messaging/content-templates/create-list-picker-template/create-list-picker-template.cs @@ -40,4 +40,4 @@ // create the twilio template var contentTemplate = await CreateAsync(contentCreateRequest.Build()); - Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); From d959eb10a9f6d7390720bc6619f63395c4ef9c8b Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:35:33 -0700 Subject: [PATCH 37/86] Rename TwilioListPicker.java to create-list-picker-template.java --- .../{TwilioListPicker.java => create-list-picker-template.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-list-picker-template/{TwilioListPicker.java => create-list-picker-template.java} (99%) diff --git a/messaging/content-templates/create-list-picker-template/TwilioListPicker.java b/messaging/content-templates/create-list-picker-template/create-list-picker-template.java similarity index 99% rename from messaging/content-templates/create-list-picker-template/TwilioListPicker.java rename to messaging/content-templates/create-list-picker-template/create-list-picker-template.java index fd7623511..8387a13c6 100644 --- a/messaging/content-templates/create-list-picker-template/TwilioListPicker.java +++ b/messaging/content-templates/create-list-picker-template/create-list-picker-template.java @@ -41,4 +41,4 @@ public static String CreateTemplate() { return content.getSid(); } -} \ No newline at end of file +} From f8a522226e4f8d54b093cb3df6fac8d56b4d7b3d Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:36:00 -0700 Subject: [PATCH 38/86] Rename create-location-template-example.cs to create-location-template.cs --- ...location-template-example.cs => create-location-template.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-location-template/{create-location-template-example.cs => create-location-template.cs} (98%) diff --git a/messaging/content-templates/create-location-template/create-location-template-example.cs b/messaging/content-templates/create-location-template/create-location-template.cs similarity index 98% rename from messaging/content-templates/create-location-template/create-location-template-example.cs rename to messaging/content-templates/create-location-template/create-location-template.cs index 096c53e61..0e7ae8a16 100644 --- a/messaging/content-templates/create-location-template/create-location-template-example.cs +++ b/messaging/content-templates/create-location-template/create-location-template.cs @@ -30,4 +30,4 @@ // create the twilio template var contentTemplate = await CreateAsync(contentCreateRequest.Build()); - Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); From 41fb2cc6baeb1f6c1b59a68f090555a54de6aa5d Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:36:13 -0700 Subject: [PATCH 39/86] Rename TwilioLocation.java to create-location-template.java --- .../{TwilioLocation.java => create-location-template.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-location-template/{TwilioLocation.java => create-location-template.java} (99%) diff --git a/messaging/content-templates/create-location-template/TwilioLocation.java b/messaging/content-templates/create-location-template/create-location-template.java similarity index 99% rename from messaging/content-templates/create-location-template/TwilioLocation.java rename to messaging/content-templates/create-location-template/create-location-template.java index d1f7002de..f76493791 100644 --- a/messaging/content-templates/create-location-template/TwilioLocation.java +++ b/messaging/content-templates/create-location-template/create-location-template.java @@ -29,4 +29,4 @@ public static String CreateTemplate() { return content.getSid(); } -} \ No newline at end of file +} From ab57b7d6ee950624efc1cdde73d89c6ef1171e9d Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:37:03 -0700 Subject: [PATCH 40/86] Rename create-media-template-example.cs to create-media-template.cs --- ...reate-media-template-example.cs => create-media-template.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-media-template/{create-media-template-example.cs => create-media-template.cs} (98%) diff --git a/messaging/content-templates/create-media-template/create-media-template-example.cs b/messaging/content-templates/create-media-template/create-media-template.cs similarity index 98% rename from messaging/content-templates/create-media-template/create-media-template-example.cs rename to messaging/content-templates/create-media-template/create-media-template.cs index 1a7bd85e0..6eb28b426 100644 --- a/messaging/content-templates/create-media-template/create-media-template-example.cs +++ b/messaging/content-templates/create-media-template/create-media-template.cs @@ -28,4 +28,4 @@ // create the twilio template var contentTemplate = await CreateAsync(contentCreateRequest.Build()); - Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); From ff6c2f8829edacbfdc5e5447dc913d7d9a34be54 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:37:14 -0700 Subject: [PATCH 41/86] Rename TwilioMedia.java to create-media-template.java --- .../{TwilioMedia.java => create-media-template.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-media-template/{TwilioMedia.java => create-media-template.java} (99%) diff --git a/messaging/content-templates/create-media-template/TwilioMedia.java b/messaging/content-templates/create-media-template/create-media-template.java similarity index 99% rename from messaging/content-templates/create-media-template/TwilioMedia.java rename to messaging/content-templates/create-media-template/create-media-template.java index 7cede9584..1cf5d89af 100644 --- a/messaging/content-templates/create-media-template/TwilioMedia.java +++ b/messaging/content-templates/create-media-template/create-media-template.java @@ -24,4 +24,4 @@ public static String CreateTemplate() { return content.getSid(); } -} \ No newline at end of file +} From 5866187e8dd57ff7c5c89b32d7df1569e138de97 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:37:37 -0700 Subject: [PATCH 42/86] Rename create-text-template-example.cs to create-text-template.cs --- ...{create-text-template-example.cs => create-text-template.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-text-template/{create-text-template-example.cs => create-text-template.cs} (97%) diff --git a/messaging/content-templates/create-text-template/create-text-template-example.cs b/messaging/content-templates/create-text-template/create-text-template.cs similarity index 97% rename from messaging/content-templates/create-text-template/create-text-template-example.cs rename to messaging/content-templates/create-text-template/create-text-template.cs index 3285ed76c..4bc3b28d2 100644 --- a/messaging/content-templates/create-text-template/create-text-template-example.cs +++ b/messaging/content-templates/create-text-template/create-text-template.cs @@ -24,4 +24,4 @@ // create the twilio template var contentTemplate = await CreateAsync(contentCreateRequest.Build()); - Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); From 9414724dbfaa1c22885858ac2aa352732e728d01 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:37:49 -0700 Subject: [PATCH 43/86] Rename TwilioText.java to create-text-template.java --- .../{TwilioText.java => create-text-template.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-text-template/{TwilioText.java => create-text-template.java} (99%) diff --git a/messaging/content-templates/create-text-template/TwilioText.java b/messaging/content-templates/create-text-template/create-text-template.java similarity index 99% rename from messaging/content-templates/create-text-template/TwilioText.java rename to messaging/content-templates/create-text-template/create-text-template.java index 1da2156c4..72fb1666b 100644 --- a/messaging/content-templates/create-text-template/TwilioText.java +++ b/messaging/content-templates/create-text-template/create-text-template.java @@ -23,4 +23,4 @@ public static String CreateTemplate() { return content.getSid(); } -} \ No newline at end of file +} From 6a2b654a2832d2ae184f36b492c807dc98d0d38b Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:38:13 -0700 Subject: [PATCH 44/86] Rename create-wa-auth-template-example.cs to create-wa-otp-button-template.cs --- ...uth-template-example.cs => create-wa-otp-button-template.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-wa-otp-button-template/{create-wa-auth-template-example.cs => create-wa-otp-button-template.cs} (98%) diff --git a/messaging/content-templates/create-wa-otp-button-template/create-wa-auth-template-example.cs b/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.cs similarity index 98% rename from messaging/content-templates/create-wa-otp-button-template/create-wa-auth-template-example.cs rename to messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.cs index e5de8c192..efec7c679 100644 --- a/messaging/content-templates/create-wa-otp-button-template/create-wa-auth-template-example.cs +++ b/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.cs @@ -27,4 +27,4 @@ // create the twilio template var contentTemplate = await CreateAsync(contentCreateRequest.Build()); - Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); From 8a57f6c5f3c711832f937d3d388259c7f108feb8 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:38:24 -0700 Subject: [PATCH 45/86] Rename WhatsAppAuthentication.java to create-wa-otp-button-template.java --- ...ppAuthentication.java => create-wa-otp-button-template.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-wa-otp-button-template/{WhatsAppAuthentication.java => create-wa-otp-button-template.java} (99%) diff --git a/messaging/content-templates/create-wa-otp-button-template/WhatsAppAuthentication.java b/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.java similarity index 99% rename from messaging/content-templates/create-wa-otp-button-template/WhatsAppAuthentication.java rename to messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.java index 5e9652062..bde8a652b 100644 --- a/messaging/content-templates/create-wa-otp-button-template/WhatsAppAuthentication.java +++ b/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.java @@ -27,4 +27,4 @@ public static String CreateTemplate() { return content.getSid(); } -} \ No newline at end of file +} From df940b50b7cb6ab9427c062eadab779c4d95b2df Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:38:50 -0700 Subject: [PATCH 46/86] Rename create-wa-card-template-example.cs to create-whatsapp-card.cs --- ...eate-wa-card-template-example.cs => create-whatsapp-card.cs} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-whatsapp-card/{create-wa-card-template-example.cs => create-whatsapp-card.cs} (98%) diff --git a/messaging/content-templates/create-whatsapp-card/create-wa-card-template-example.cs b/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.cs similarity index 98% rename from messaging/content-templates/create-whatsapp-card/create-wa-card-template-example.cs rename to messaging/content-templates/create-whatsapp-card/create-whatsapp-card.cs index 9fc068a5b..eadc6e1a7 100644 --- a/messaging/content-templates/create-whatsapp-card/create-wa-card-template-example.cs +++ b/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.cs @@ -37,4 +37,4 @@ // create the twilio template var contentTemplate = await CreateAsync(contentCreateRequest.Build()); - Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); \ No newline at end of file + Console.WriteLine($"Created Twilio Content Template SID: {contentTemplate.Sid}"); From 5728c541e03bbe9809d0244fb22ab4aa6844db00 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:39:02 -0700 Subject: [PATCH 47/86] Rename WhatsAppCard.java to create-whatsapp-card.java --- .../{WhatsAppCard.java => create-whatsapp-card.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename messaging/content-templates/create-whatsapp-card/{WhatsAppCard.java => create-whatsapp-card.java} (99%) diff --git a/messaging/content-templates/create-whatsapp-card/WhatsAppCard.java b/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.java similarity index 99% rename from messaging/content-templates/create-whatsapp-card/WhatsAppCard.java rename to messaging/content-templates/create-whatsapp-card/create-whatsapp-card.java index 967f92b60..6375224e3 100644 --- a/messaging/content-templates/create-whatsapp-card/WhatsAppCard.java +++ b/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.java @@ -37,4 +37,4 @@ public static String CreateTemplate() { return content.getSid(); } -} \ No newline at end of file +} From ec039d0d1b9680a2bfdbf2cea82d14dbf7d252f1 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:46:40 -0700 Subject: [PATCH 48/86] Update create-a-quick-reply-template.json --- .../output/create-a-quick-reply-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-a-quick-reply-template/output/create-a-quick-reply-template.json b/messaging/content-templates/create-a-quick-reply-template/output/create-a-quick-reply-template.json index e948945f9..f8d40ecd5 100644 --- a/messaging/content-templates/create-a-quick-reply-template/output/create-a-quick-reply-template.json +++ b/messaging/content-templates/create-a-quick-reply-template/output/create-a-quick-reply-template.json @@ -2,7 +2,7 @@ "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "date_created": "2022-08-29T10:43:20Z", "date_updated": "2022-08-29T10:43:20Z", - "friendly_name": "Owl Air Support quick reply template", + "friendly_name": "owl_air_qr", "language": "en", "links": { "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", From 520ea969ec5d1ec252ca658edf622d3c5f0e1ffe Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:47:01 -0700 Subject: [PATCH 49/86] Update create-a-quick-reply-template.cs --- .../create-a-quick-reply-template.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.cs b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.cs index 275e4ec47..022d8effd 100644 --- a/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.cs +++ b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.cs @@ -36,7 +36,7 @@ var contentCreateRequest = new ContentCreateRequest.Builder(); contentCreateRequest.WithTypes(types.Build()); contentCreateRequest.WithLanguage("en"); - contentCreateRequest.WithFriendlyName("owl_coupon_card"); + contentCreateRequest.WithFriendlyName("owl_air_qr"); contentCreateRequest.WithVariables(new Dictionary() { {"1", "John"} }); // create the twilio template From 2a45513405e49bd30ff5584d55a66311af8f51a7 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:47:21 -0700 Subject: [PATCH 50/86] Update create-a-quick-reply-template.curl --- .../create-a-quick-reply-template.curl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.curl b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.curl index 279b0d68c..501f1c2bb 100644 --- a/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.curl +++ b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.curl @@ -2,7 +2,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ -H 'Content-Type: application/json' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ -d '{ - "friendly_name": "Owl Air Support quick reply template", + "friendly_name": "owl_air_qr", "language": "en", "variables": {"1":"Owl Air Customer"}, "types": { From b4b880e5bfda715ff1984a66a405fb88297f1eeb Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:47:46 -0700 Subject: [PATCH 51/86] Update create-a-quick-reply-template.java --- .../create-a-quick-reply-template.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.java b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.java index 8e27e3458..35e2c82f1 100644 --- a/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.java +++ b/messaging/content-templates/create-a-quick-reply-template/create-a-quick-reply-template.java @@ -35,7 +35,7 @@ public static String CreateTemplate() { types.setTwilioQuickReply(twilioQuickReply); var createRequest = new Content.ContentCreateRequest("en", types); - createRequest.setFriendlyName("java_sdk_example_twilio_quickreply"); + createRequest.setFriendlyName("owl_air_qr"); createRequest.setVariables(Map.of( "1", "first_name" )); From 9d227d470fc098efafbff2bf32597bd7552e882e Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:48:24 -0700 Subject: [PATCH 52/86] Update create-call-to-action-template.json --- .../output/create-call-to-action-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json b/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json index 57543c8eb..fe5fb15ea 100644 --- a/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json +++ b/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json @@ -13,7 +13,7 @@ "twilio/call-to-action": { "actions": [ { - "url": "https://owlair.example.com/%7B%7B5%7D%7D", + "url": "https://owlair.com/%7B%7B5%7D%7D", "type": "URL", "title": "Check Flight Status" }, From 2e722ad293f289a0b60c8e74f985871150c99efb Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:48:32 -0700 Subject: [PATCH 53/86] Update create-call-to-action-template.curl --- .../create-call-to-action-template.curl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl index f9c9ae55e..681b48767 100644 --- a/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl +++ b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl @@ -15,7 +15,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ "actions": [{ "type": "URL", "title": "Check Flight Status", - "url": "https://owlair.example.com/%7B%7B5%7D%7D" + "url": "https://owlair.com/%7B%7B5%7D%7D" }, { "type": "PHONE_NUMBER", From 67f17a281c82e3e6ba9012ca5c096a367febd474 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:49:12 -0700 Subject: [PATCH 54/86] Update create-call-to-action-template.json --- .../output/create-call-to-action-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json b/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json index fe5fb15ea..8f64bad1c 100644 --- a/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json +++ b/messaging/content-templates/create-call-to-action-template/output/create-call-to-action-template.json @@ -2,7 +2,7 @@ "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "date_created": "2022-01-15T17:09:58Z", "date_updated": "2022-01-15T17:09:58Z", - "friendly_name": "Owl Air flight departure call to action template", + "friendly_name": "owl_air_cta", "language": "en", "links": { "approval_fetch": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests", From 947e276a2cac9ee67edd6cf6215b85eb194597f2 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:49:25 -0700 Subject: [PATCH 55/86] Update create-call-to-action-template.curl --- .../create-call-to-action-template.curl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl index 681b48767..12626720c 100644 --- a/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl +++ b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.curl @@ -2,7 +2,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ -H 'Content-Type: application/json' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ -d '{ - "friendly_name": "Owl Air flight departure call to action template", + "friendly_name": "owl_air_cta", "language": "en", "variables": {"1": "flight_number", "2": "arrival_city", From 03ae989d7842539cebed90a01c8d9037a86ea5db Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:49:50 -0700 Subject: [PATCH 56/86] Update create-call-to-action-template.java --- .../create-call-to-action-template.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.java b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.java index 88a3b0062..8290aefe1 100644 --- a/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.java +++ b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.java @@ -25,7 +25,7 @@ public static String CreateTemplate() { types.setTwilioCallToAction(twilioCallToAction); var createRequest = new Content.ContentCreateRequest("en", types); - createRequest.setFriendlyName("java_sdk_example_twilio_calltoaction"); + createRequest.setFriendlyName("owl_air_cta"); createRequest.setVariables(Map.of( "1", "flight_number", "2", "arrival_city", From 8cac225fb7c0f9bcad55557ff9cb9acba5f0768d Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:50:28 -0700 Subject: [PATCH 57/86] Update create-call-to-action-template.cs --- .../create-call-to-action-template.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.cs b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.cs index 7b854661f..035e97d6c 100644 --- a/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.cs +++ b/messaging/content-templates/create-call-to-action-template/create-call-to-action-template.cs @@ -16,7 +16,7 @@ .Build(); var cta2 = new CallToAction.Builder() .WithType(CallToActionActionType.PhoneNumber) - .WithPhone("+18005551234") + .WithPhone("+15555551234") .WithTitle("Call Support") .Build(); twilioCallToAction.WithActions(new List() { cta1, cta2 }); @@ -29,7 +29,7 @@ var contentCreateRequest = new ContentCreateRequest.Builder(); contentCreateRequest.WithTypes(types.Build()); contentCreateRequest.WithLanguage("en"); - contentCreateRequest.WithFriendlyName("owl_coupon_code"); + contentCreateRequest.WithFriendlyName("owl_air_cta"); contentCreateRequest.WithVariables(new Dictionary() { {"1", "flight_number"}, {"2", "arrival_city"}, {"3", "departure_time"}, {"4", "gate_number"}, {"5", "url_suffix"} }); // create the twilio template From 9ea426b8f9a085c15434ca1dc8a7b48c931567b1 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:51:17 -0700 Subject: [PATCH 58/86] Update create-card-template.json --- .../create-card-template/output/create-card-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-card-template/output/create-card-template.json b/messaging/content-templates/create-card-template/output/create-card-template.json index ec2cbbca1..6f4d10e17 100644 --- a/messaging/content-templates/create-card-template/output/create-card-template.json +++ b/messaging/content-templates/create-card-template/output/create-card-template.json @@ -2,7 +2,7 @@ "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "date_created": "2022-08-30T09:19:17Z", "date_updated": "2022-08-30T09:19:17Z", - "friendly_name": "Owl Air coupon card template", + "friendly_name": "owl_air_card", "language": "en", "links": { "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", From 47b3fdf894969ef053b5b5dad18e010ae02d8a20 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:51:27 -0700 Subject: [PATCH 59/86] Update create-card-template.json --- .../create-card-template/output/create-card-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-card-template/output/create-card-template.json b/messaging/content-templates/create-card-template/output/create-card-template.json index 6f4d10e17..3867fe542 100644 --- a/messaging/content-templates/create-card-template/output/create-card-template.json +++ b/messaging/content-templates/create-card-template/output/create-card-template.json @@ -15,7 +15,7 @@ { "title": "Order Online", "type": "URL", - "url": "https://owlair.example.com/" + "url": "https://owlair.com/" }, { "phone_number": "+15551234567", From 3c89bf1ee64601ab2cfb9b6ce77cfcfa3d497756 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:51:40 -0700 Subject: [PATCH 60/86] Update create-card-template.curl --- .../create-card-template/create-card-template.curl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messaging/content-templates/create-card-template/create-card-template.curl b/messaging/content-templates/create-card-template/create-card-template.curl index bf3ee32e1..3d2963d3f 100644 --- a/messaging/content-templates/create-card-template/create-card-template.curl +++ b/messaging/content-templates/create-card-template/create-card-template.curl @@ -2,7 +2,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ -H 'Content-Type: application/json' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ -d '{ - "friendly_name": "Owl Air coupon card template", + "friendly_name": "owl_air_card", "language": "en", "variables": { "1": "coupon_code" @@ -13,7 +13,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ "subtitle": "To unsubscribe, reply Stop", "actions": [ { - "url": "https://owlair.example.com/", + "url": "https://owlair.com/", "title": "Order Online", "type": "URL" }, From 6445320142d3af4a1e768fde4e8b71383a03e7fb Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:52:13 -0700 Subject: [PATCH 61/86] Update create-card-template.json --- .../create-card-template/output/create-card-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-card-template/output/create-card-template.json b/messaging/content-templates/create-card-template/output/create-card-template.json index 3867fe542..c4719f121 100644 --- a/messaging/content-templates/create-card-template/output/create-card-template.json +++ b/messaging/content-templates/create-card-template/output/create-card-template.json @@ -15,7 +15,7 @@ { "title": "Order Online", "type": "URL", - "url": "https://owlair.com/" + "url": "https://www.owlair.com/" }, { "phone_number": "+15551234567", From 6008224f3aa132cdf8f8a5bae7e8474e97e0b8dc Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:52:21 -0700 Subject: [PATCH 62/86] Update create-card-template.java --- .../create-card-template/create-card-template.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messaging/content-templates/create-card-template/create-card-template.java b/messaging/content-templates/create-card-template/create-card-template.java index b833ec18a..554e77a0f 100644 --- a/messaging/content-templates/create-card-template/create-card-template.java +++ b/messaging/content-templates/create-card-template/create-card-template.java @@ -14,7 +14,7 @@ public static String CreateTemplate() { var action1 = new Content.CardAction(); action1.setType(Content.CardActionType.URL); - action1.setUrl("https://www.twilio.com/"); + action1.setUrl("https://www.owlair.com/"); action1.setTitle("Contact Us"); twilioCard.setActions(Arrays.asList(action1)); @@ -23,7 +23,7 @@ public static String CreateTemplate() { types.setTwilioCard(twilioCard); var createRequest = new Content.ContentCreateRequest("en", types); - createRequest.setFriendlyName("java_sdk_example_twilio_card"); + createRequest.setFriendlyName("owl_air_card"); createRequest.setVariables(Map.of( "1", "John" )); From 9db0f0e5b798e24b85b72d654196f73ce5c05a4a Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:53:23 -0700 Subject: [PATCH 63/86] Update create-card-template.cs --- .../create-card-template/create-card-template.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-card-template/create-card-template.cs b/messaging/content-templates/create-card-template/create-card-template.cs index 0ee4c51a1..8c4282201 100644 --- a/messaging/content-templates/create-card-template/create-card-template.cs +++ b/messaging/content-templates/create-card-template/create-card-template.cs @@ -29,7 +29,7 @@ var contentCreateRequest = new ContentCreateRequest.Builder(); contentCreateRequest.WithTypes(types.Build()); contentCreateRequest.WithLanguage("en"); - contentCreateRequest.WithFriendlyName("owl_coupon_card"); + contentCreateRequest.WithFriendlyName("owl_air_card"); contentCreateRequest.WithVariables(new Dictionary() { {"1", "John"} }); // create the twilio template From 10c138f18f09f3f996a72e2eff3745f320df14fc Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:54:04 -0700 Subject: [PATCH 64/86] Update create-list-picker-template.json --- .../output/create-list-picker-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-list-picker-template/output/create-list-picker-template.json b/messaging/content-templates/create-list-picker-template/output/create-list-picker-template.json index ccef263f2..70d2e1e26 100644 --- a/messaging/content-templates/create-list-picker-template/output/create-list-picker-template.json +++ b/messaging/content-templates/create-list-picker-template/output/create-list-picker-template.json @@ -2,7 +2,7 @@ "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "date_created": "2022-08-29T15:46:11Z", "date_updated": "2022-08-29T15:46:11Z", - "friendly_name": "Owl Air list picker template", + "friendly_name": "owl_air_list", "language": "en", "links": { "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", From 1b800ee71a09ee18563b452927e546e466324c1a Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:55:12 -0700 Subject: [PATCH 65/86] Update create-list-picker-template.curl --- .../create-list-picker-template.curl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messaging/content-templates/create-list-picker-template/create-list-picker-template.curl b/messaging/content-templates/create-list-picker-template/create-list-picker-template.curl index 218fa70f3..32b53f88c 100644 --- a/messaging/content-templates/create-list-picker-template/create-list-picker-template.curl +++ b/messaging/content-templates/create-list-picker-template/create-list-picker-template.curl @@ -2,7 +2,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ -H 'Content-Type: application/json' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ -d '{ - "friendly_name": "Owl Air list picker template", + "friendly_name": "owl_air_list", "language": "en", "variables": { "1": "end_date" @@ -30,7 +30,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ ] }, "twilio/text": { - "body": "We have flights to the following destinations: (1) New York City, (2) Denver, (3) Chicago. Hurry! Sale ends on {{1}}!" + "body": "We have flights to the following destinations: (1) SFO, (2) OAK, (3) LAX. Hurry! Sale ends on {{1}}!" } } }' From e7071c21d9b116485ebd2a62fa1570922d8f5593 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:55:30 -0700 Subject: [PATCH 66/86] Update create-list-picker-template.java --- .../create-list-picker-template.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-list-picker-template/create-list-picker-template.java b/messaging/content-templates/create-list-picker-template/create-list-picker-template.java index 8387a13c6..7e3b01843 100644 --- a/messaging/content-templates/create-list-picker-template/create-list-picker-template.java +++ b/messaging/content-templates/create-list-picker-template/create-list-picker-template.java @@ -32,7 +32,7 @@ public static String CreateTemplate() { types.setTwilioListPicker(twilioListPicker); var createRequest = new Content.ContentCreateRequest("en", types); - createRequest.setFriendlyName("java_sdk_example_twilio_listpicker"); + createRequest.setFriendlyName("owl_air_list"); createRequest.setVariables(Map.of( "1", "end_date" )); From 740dbd268e9014490683f132328cf9ec26eb63d4 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:56:07 -0700 Subject: [PATCH 67/86] Update create-location-template.json --- .../output/create-location-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-location-template/output/create-location-template.json b/messaging/content-templates/create-location-template/output/create-location-template.json index e5ef336a5..d72a46022 100644 --- a/messaging/content-templates/create-location-template/output/create-location-template.json +++ b/messaging/content-templates/create-location-template/output/create-location-template.json @@ -2,7 +2,7 @@ "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "date_created": "2022-08-29T15:23:12Z", "date_updated": "2022-08-29T15:23:12Z", - "friendly_name": "Owl Air location template", + "friendly_name": "owl_air_location", "language": "en", "links": { "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", From cde05d2d53ec999f01e8d0ecb7b925940c6e8e44 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:56:17 -0700 Subject: [PATCH 68/86] Update create-location-template.cs --- .../create-location-template/create-location-template.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-location-template/create-location-template.cs b/messaging/content-templates/create-location-template/create-location-template.cs index 0e7ae8a16..e7123aedb 100644 --- a/messaging/content-templates/create-location-template/create-location-template.cs +++ b/messaging/content-templates/create-location-template/create-location-template.cs @@ -25,7 +25,7 @@ var contentCreateRequest = new ContentCreateRequest.Builder(); contentCreateRequest.WithTypes(types.Build()); contentCreateRequest.WithLanguage("en"); - contentCreateRequest.WithFriendlyName("location"); + contentCreateRequest.WithFriendlyName("owl_air_location"); // create the twilio template var contentTemplate = await CreateAsync(contentCreateRequest.Build()); From d456c615d5f335f8eba99d8f02d332863aea931a Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:56:40 -0700 Subject: [PATCH 69/86] Update create-location-template.curl --- .../create-location-template/create-location-template.curl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-location-template/create-location-template.curl b/messaging/content-templates/create-location-template/create-location-template.curl index c60c31172..d4d2e9b41 100644 --- a/messaging/content-templates/create-location-template/create-location-template.curl +++ b/messaging/content-templates/create-location-template/create-location-template.curl @@ -2,7 +2,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ -H 'Content-Type: application/json' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ -d '{ - "friendly_name": "Owl Air location template", + "friendly_name": "owl_air_location", "language": "en", "types": { "twilio/text": { From afa88b8cf6071562b438197950d636219a2cb0a4 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:56:52 -0700 Subject: [PATCH 70/86] Update create-location-template.java --- .../create-location-template/create-location-template.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-location-template/create-location-template.java b/messaging/content-templates/create-location-template/create-location-template.java index f76493791..43462a43d 100644 --- a/messaging/content-templates/create-location-template/create-location-template.java +++ b/messaging/content-templates/create-location-template/create-location-template.java @@ -20,7 +20,7 @@ public static String CreateTemplate() { types.setTwilioLocation(twilioLocation); var createRequest = new Content.ContentCreateRequest("en", types); - createRequest.setFriendlyName("java_sdk_example_twilio_location"); + createRequest.setFriendlyName("owl_air_location"); createRequest.setVariables(Map.of( "1", "John" )); From 35e58f1ef448d492d5b06d96d4b492c36917bea6 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:57:34 -0700 Subject: [PATCH 71/86] Update create-media-template.json --- .../create-media-template/output/create-media-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-media-template/output/create-media-template.json b/messaging/content-templates/create-media-template/output/create-media-template.json index 193c226be..ab1b59f51 100644 --- a/messaging/content-templates/create-media-template/output/create-media-template.json +++ b/messaging/content-templates/create-media-template/output/create-media-template.json @@ -2,7 +2,7 @@ "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "date_created": "2022-08-29T15:12:22Z", "date_updated": "2022-08-29T15:12:22Z", - "friendly_name": "Thank you for your order media template", + "friendly_name": "media_template", "language": "en", "links": { "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", From 2a4e437e8532444cabe259117abc3745abe27ed8 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:57:48 -0700 Subject: [PATCH 72/86] Update create-media-template.curl --- .../create-media-template/create-media-template.curl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-media-template/create-media-template.curl b/messaging/content-templates/create-media-template/create-media-template.curl index 4932aadce..772943688 100644 --- a/messaging/content-templates/create-media-template/create-media-template.curl +++ b/messaging/content-templates/create-media-template/create-media-template.curl @@ -2,7 +2,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ -H 'Content-Type: application/json' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ -d '{ - "friendly_name": "Thank you for your order media template", + "friendly_name": "media_template", "language": "en", "variables": {"1":"OrderNumber"}, "types": { From 3fbd50fea553d21a826bd1a271e11b3116ed39bc Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:58:01 -0700 Subject: [PATCH 73/86] Update create-media-template.java --- .../create-media-template/create-media-template.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-media-template/create-media-template.java b/messaging/content-templates/create-media-template/create-media-template.java index 1cf5d89af..98c231079 100644 --- a/messaging/content-templates/create-media-template/create-media-template.java +++ b/messaging/content-templates/create-media-template/create-media-template.java @@ -15,7 +15,7 @@ public static String CreateTemplate() { types.setTwilioMedia(twilioMedia); var createRequest = new Content.ContentCreateRequest("en", types); - createRequest.setFriendlyName("java_sdk_example_twilio_media"); + createRequest.setFriendlyName("media_template"); createRequest.setVariables(Map.of( "1", "order_number" )); From 2d7976d8f30d26166ec6f982b43aab1b2b0d2575 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:58:39 -0700 Subject: [PATCH 74/86] Update create-text-template.json --- .../create-text-template/output/create-text-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-text-template/output/create-text-template.json b/messaging/content-templates/create-text-template/output/create-text-template.json index b4f86ea33..1e6d81847 100644 --- a/messaging/content-templates/create-text-template/output/create-text-template.json +++ b/messaging/content-templates/create-text-template/output/create-text-template.json @@ -2,7 +2,7 @@ "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "date_created": "2022-09-01T12:39:19Z", "date_updated": "2022-09-01T12:39:19Z", - "friendly_name": "Owl Air Support text template", + "friendly_name": "media_template", "language": "en", "links": { "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", From 26a1d83af319567c11777d99b95e9980524e0d25 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:58:49 -0700 Subject: [PATCH 75/86] Update create-text-template.curl --- .../create-text-template/create-text-template.curl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-text-template/create-text-template.curl b/messaging/content-templates/create-text-template/create-text-template.curl index f23b2a12f..6348db7f9 100644 --- a/messaging/content-templates/create-text-template/create-text-template.curl +++ b/messaging/content-templates/create-text-template/create-text-template.curl @@ -2,7 +2,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ -H 'Content-Type: application/json' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ -d '{ - "friendly_name": "Owl Air Support text template", + "friendly_name": "media_template", "language": "en", "variables": {"1":"name"}, "types": { From 4dac42485f721f26336fae9e8e973e946042e03c Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:59:01 -0700 Subject: [PATCH 76/86] Update create-text-template.java --- .../create-text-template/create-text-template.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-text-template/create-text-template.java b/messaging/content-templates/create-text-template/create-text-template.java index 72fb1666b..96a515776 100644 --- a/messaging/content-templates/create-text-template/create-text-template.java +++ b/messaging/content-templates/create-text-template/create-text-template.java @@ -14,7 +14,7 @@ public static String CreateTemplate() { types.setTwilioText(twilioText); var createRequest = new Content.ContentCreateRequest("en", types); - createRequest.setFriendlyName("java_sdk_example_twilio_text"); + createRequest.setFriendlyName("media_template"); createRequest.setVariables(Map.of( "1", "first_name" )); From e354a02455e684b5da670ba2b22075dc4c83cbc5 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:59:28 -0700 Subject: [PATCH 77/86] Update create-wa-otp-button-template.json --- .../output/create-wa-otp-button-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-wa-otp-button-template/output/create-wa-otp-button-template.json b/messaging/content-templates/create-wa-otp-button-template/output/create-wa-otp-button-template.json index a604ba3c8..109480045 100644 --- a/messaging/content-templates/create-wa-otp-button-template/output/create-wa-otp-button-template.json +++ b/messaging/content-templates/create-wa-otp-button-template/output/create-wa-otp-button-template.json @@ -2,7 +2,7 @@ "account_sid": "$TWILIO_ACCOUNT_SID", "date_created": "2023-06-02T14:34:25Z", "date_updated": "2023-06-02T14:34:25Z", - "friendly_name": "WhatsApp OTP button template", + "friendly_name": "whatsapp_otp", "language": "en", "links": { "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", From 47434eb154796e9c84e8a0f67f108dcbf23dfb83 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:59:48 -0700 Subject: [PATCH 78/86] Update create-wa-otp-button-template.curl --- .../create-wa-otp-button-template.curl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.curl b/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.curl index ebd1a9a61..c091ccde1 100644 --- a/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.curl +++ b/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.curl @@ -2,7 +2,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ -H 'Content-Type: application/json' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ -d '{ - "friendly_name": "WhatsApp OTP button template", + "friendly_name": "whatsapp_otp", "language": "en", "types": { "whatsapp/authentication":{ From 89b3c5be6764150d54b703d27d530ffcfb72b27d Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:00:08 -0700 Subject: [PATCH 79/86] Update create-wa-otp-button-template.java --- .../create-wa-otp-button-template.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.java b/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.java index bde8a652b..d8892b820 100644 --- a/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.java +++ b/messaging/content-templates/create-wa-otp-button-template/create-wa-otp-button-template.java @@ -21,7 +21,7 @@ public static String CreateTemplate() { types.setWhatsappAuthentication(waAuth); var createRequest = new Content.ContentCreateRequest("en", types); - createRequest.setFriendlyName("java_sdk_example_wa_auth"); + createRequest.setFriendlyName("whatsapp_otp"); var content = Content.creator(createRequest).create(); From 7ec789a079ded490214ebb5e1f1a17bf934174f5 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:00:41 -0700 Subject: [PATCH 80/86] Update create-whatsapp-card.json --- .../create-whatsapp-card/output/create-whatsapp-card.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-whatsapp-card/output/create-whatsapp-card.json b/messaging/content-templates/create-whatsapp-card/output/create-whatsapp-card.json index dbe99b5ee..ef88ac2fc 100644 --- a/messaging/content-templates/create-whatsapp-card/output/create-whatsapp-card.json +++ b/messaging/content-templates/create-whatsapp-card/output/create-whatsapp-card.json @@ -2,7 +2,7 @@ "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "date_created": "2023-08-03T14:54:47Z", "date_updated": "2023-08-03T14:54:47Z", - "friendly_name": "Owl Air coupon card template", + "friendly_name": "owl_coupon_code", "language": "en", "links": { "approval_create": "https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ApprovalRequests/whatsapp", From a70663e58a3471009219fe843a6e81185bad405e Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:00:52 -0700 Subject: [PATCH 81/86] Update create-whatsapp-card.curl --- .../create-whatsapp-card/create-whatsapp-card.curl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.curl b/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.curl index bb7875fe5..d0b69a230 100644 --- a/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.curl +++ b/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.curl @@ -2,7 +2,7 @@ curl -X POST 'https://content.twilio.com/v1/Content' \ -H 'Content-Type: application/json' \ -u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ -d '{ - "friendly_name": "Owl Air coupon card template", + "friendly_name": "owl_coupon_code", "language": "en", "variables": { "1": "coupon_code" From 3d1fbc97ef6525cc93696811ded3bb51774df36e Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:01:02 -0700 Subject: [PATCH 82/86] Update create-whatsapp-card.java --- .../create-whatsapp-card/create-whatsapp-card.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.java b/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.java index 6375224e3..454f36e85 100644 --- a/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.java +++ b/messaging/content-templates/create-whatsapp-card/create-whatsapp-card.java @@ -28,7 +28,7 @@ public static String CreateTemplate() { types.setWhatsappCard(waCard); var createRequest = new Content.ContentCreateRequest("en", types); - createRequest.setFriendlyName("java_sdk_example_wa_card"); + createRequest.setFriendlyName("owl_coupon_code"); createRequest.setVariables(Map.of( "1", "coupon_code" )); From 64f2048429647f49db0be5a91e1609581c9897bf Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Tue, 25 Jun 2024 09:36:29 -0700 Subject: [PATCH 83/86] Update fetch-all-content-resources-example.json.curl bug --- .../fetch-all-content-resources-example.json.curl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/messaging/content-templates/fetch-all-content-resources/fetch-all-content-resources-example.json.curl b/messaging/content-templates/fetch-all-content-resources/fetch-all-content-resources-example.json.curl index 93196e95c..0a970287e 100644 --- a/messaging/content-templates/fetch-all-content-resources/fetch-all-content-resources-example.json.curl +++ b/messaging/content-templates/fetch-all-content-resources/fetch-all-content-resources-example.json.curl @@ -1,2 +1,2 @@ -curl -X GET "https://content.twilio.com/v1/Content--u%20$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN/%20No%20newline%20at%20end%20of%20file+curl%20-X%20GET"https://content.twilio.com/v1/Content" +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN From ce2bea2944203cb51b5b822b2cf2f88477aa4a4a Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Fri, 12 Jul 2024 13:16:47 -0400 Subject: [PATCH 84/86] Add Transcription TwiML snippets (#1081) --- .../transcription-basic-usage/meta.json | 4 ++++ .../output/transcription-basic-usage.twiml | 6 ++++++ .../transcription-basic-usage.cs | 17 +++++++++++++++++ .../transcription-basic-usage.java | 19 +++++++++++++++++++ .../transcription-basic-usage.js | 7 +++++++ .../transcription-basic-usage.php | 9 +++++++++ .../transcription-basic-usage.py | 9 +++++++++ .../transcription-basic-usage.rb | 8 ++++++++ .../meta.json | 4 ++++ ...scription-enableautomaticpunctuation.twiml | 6 ++++++ ...ranscription-enableautomaticpunctuation.cs | 17 +++++++++++++++++ ...nscription-enableautomaticpunctuation.java | 19 +++++++++++++++++++ ...ranscription-enableautomaticpunctuation.js | 7 +++++++ ...anscription-enableautomaticpunctuation.php | 9 +++++++++ ...ranscription-enableautomaticpunctuation.py | 11 +++++++++++ ...ranscription-enableautomaticpunctuation.rb | 8 ++++++++ .../transcription-hints-tokens/meta.json | 4 ++++ .../output/transcription-hints-tokens.twiml | 6 ++++++ .../transcription-hints-tokens.cs | 17 +++++++++++++++++ .../transcription-hints-tokens.java | 19 +++++++++++++++++++ .../transcription-hints-tokens.js | 7 +++++++ .../transcription-hints-tokens.php | 9 +++++++++ .../transcription-hints-tokens.py | 10 ++++++++++ .../transcription-hints-tokens.rb | 8 ++++++++ .../transcription-hints/meta.json | 4 ++++ .../output/transcription-hints.twiml | 6 ++++++ .../transcription-hints.cs | 17 +++++++++++++++++ .../transcription-hints.java | 19 +++++++++++++++++++ .../transcription-hints.js | 7 +++++++ .../transcription-hints.php | 9 +++++++++ .../transcription-hints.py | 12 ++++++++++++ .../transcription-hints.rb | 8 ++++++++ .../meta.json | 4 ++++ ...inboundtracklabel-outboundtracklabel.twiml | 6 ++++++ ...on-inboundtracklabel-outboundtracklabel.cs | 17 +++++++++++++++++ ...-inboundtracklabel-outboundtracklabel.java | 19 +++++++++++++++++++ ...on-inboundtracklabel-outboundtracklabel.js | 7 +++++++ ...n-inboundtracklabel-outboundtracklabel.php | 9 +++++++++ ...on-inboundtracklabel-outboundtracklabel.py | 11 +++++++++++ ...on-inboundtracklabel-outboundtracklabel.rb | 8 ++++++++ .../transcription-languagecode/meta.json | 4 ++++ .../output/transcription-languagecode.twiml | 6 ++++++ .../transcription-languagecode.cs | 17 +++++++++++++++++ .../transcription-languagecode.java | 19 +++++++++++++++++++ .../transcription-languagecode.js | 7 +++++++ .../transcription-languagecode.php | 9 +++++++++ .../transcription-languagecode.py | 10 ++++++++++ .../transcription-languagecode.rb | 8 ++++++++ .../transcription-name/meta.json | 4 ++++ .../output/transcription-name.twiml | 6 ++++++ .../transcription-name/transcription-name.cs | 17 +++++++++++++++++ .../transcription-name.java | 19 +++++++++++++++++++ .../transcription-name/transcription-name.js | 7 +++++++ .../transcription-name/transcription-name.php | 9 +++++++++ .../transcription-name/transcription-name.py | 10 ++++++++++ .../transcription-name/transcription-name.rb | 8 ++++++++ .../transcription-partialresults/meta.json | 4 ++++ .../output/transcription-partialresults.twiml | 6 ++++++ .../transcription-partialresults.cs | 17 +++++++++++++++++ .../transcription-partialresults.java | 19 +++++++++++++++++++ .../transcription-partialresults.js | 7 +++++++ .../transcription-partialresults.php | 9 +++++++++ .../transcription-partialresults.py | 11 +++++++++++ .../transcription-partialresults.rb | 8 ++++++++ .../transcription-profanityfilter/meta.json | 4 ++++ .../transcription-profanityfilter.twiml | 6 ++++++ .../transcription-profanityfilter.cs | 17 +++++++++++++++++ .../transcription-profanityfilter.java | 19 +++++++++++++++++++ .../transcription-profanityfilter.js | 7 +++++++ .../transcription-profanityfilter.php | 9 +++++++++ .../transcription-profanityfilter.py | 11 +++++++++++ .../transcription-profanityfilter.rb | 8 ++++++++ .../transcription-speechmodel/meta.json | 4 ++++ .../output/transcription-speechmodel.twiml | 6 ++++++ .../transcription-speechmodel.cs | 17 +++++++++++++++++ .../transcription-speechmodel.java | 19 +++++++++++++++++++ .../transcription-speechmodel.js | 7 +++++++ .../transcription-speechmodel.php | 9 +++++++++ .../transcription-speechmodel.py | 11 +++++++++++ .../transcription-speechmodel.rb | 8 ++++++++ .../transcription-stop/meta.json | 4 ++++ .../output/transcription-stop.twiml | 6 ++++++ .../transcription-stop/transcription-stop.cs | 17 +++++++++++++++++ .../transcription-stop.java | 19 +++++++++++++++++++ .../transcription-stop/transcription-stop.js | 7 +++++++ .../transcription-stop/transcription-stop.php | 9 +++++++++ .../transcription-stop/transcription-stop.py | 8 ++++++++ .../transcription-stop/transcription-stop.rb | 8 ++++++++ .../transcription-track/meta.json | 4 ++++ .../output/transcription-track.twiml | 6 ++++++ .../transcription-track.cs | 17 +++++++++++++++++ .../transcription-track.java | 19 +++++++++++++++++++ .../transcription-track.js | 7 +++++++ .../transcription-track.php | 9 +++++++++ .../transcription-track.py | 10 ++++++++++ .../transcription-track.rb | 8 ++++++++ .../meta.json | 4 ++++ .../transcription-transcriptionengine.twiml | 6 ++++++ .../transcription-transcriptionengine.cs | 17 +++++++++++++++++ .../transcription-transcriptionengine.java | 19 +++++++++++++++++++ .../transcription-transcriptionengine.js | 7 +++++++ .../transcription-transcriptionengine.php | 9 +++++++++ .../transcription-transcriptionengine.py | 10 ++++++++++ .../transcription-transcriptionengine.rb | 8 ++++++++ 104 files changed, 1044 insertions(+) create mode 100644 twiml/voice/transcription/transcription-basic-usage/meta.json create mode 100644 twiml/voice/transcription/transcription-basic-usage/output/transcription-basic-usage.twiml create mode 100644 twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.cs create mode 100644 twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.java create mode 100644 twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.js create mode 100644 twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.php create mode 100644 twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.py create mode 100644 twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.rb create mode 100644 twiml/voice/transcription/transcription-enableautomaticpunctuation/meta.json create mode 100644 twiml/voice/transcription/transcription-enableautomaticpunctuation/output/transcription-enableautomaticpunctuation.twiml create mode 100644 twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.cs create mode 100644 twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.java create mode 100644 twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.js create mode 100644 twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.php create mode 100644 twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.py create mode 100644 twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.rb create mode 100644 twiml/voice/transcription/transcription-hints-tokens/meta.json create mode 100644 twiml/voice/transcription/transcription-hints-tokens/output/transcription-hints-tokens.twiml create mode 100644 twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.cs create mode 100644 twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.java create mode 100644 twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.js create mode 100644 twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.php create mode 100644 twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.py create mode 100644 twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.rb create mode 100644 twiml/voice/transcription/transcription-hints/meta.json create mode 100644 twiml/voice/transcription/transcription-hints/output/transcription-hints.twiml create mode 100644 twiml/voice/transcription/transcription-hints/transcription-hints.cs create mode 100644 twiml/voice/transcription/transcription-hints/transcription-hints.java create mode 100644 twiml/voice/transcription/transcription-hints/transcription-hints.js create mode 100644 twiml/voice/transcription/transcription-hints/transcription-hints.php create mode 100644 twiml/voice/transcription/transcription-hints/transcription-hints.py create mode 100644 twiml/voice/transcription/transcription-hints/transcription-hints.rb create mode 100644 twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/meta.json create mode 100644 twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/output/transcription-inboundtracklabel-outboundtracklabel.twiml create mode 100644 twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.cs create mode 100644 twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.java create mode 100644 twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.js create mode 100644 twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.php create mode 100644 twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.py create mode 100644 twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.rb create mode 100644 twiml/voice/transcription/transcription-languagecode/meta.json create mode 100644 twiml/voice/transcription/transcription-languagecode/output/transcription-languagecode.twiml create mode 100644 twiml/voice/transcription/transcription-languagecode/transcription-languagecode.cs create mode 100644 twiml/voice/transcription/transcription-languagecode/transcription-languagecode.java create mode 100644 twiml/voice/transcription/transcription-languagecode/transcription-languagecode.js create mode 100644 twiml/voice/transcription/transcription-languagecode/transcription-languagecode.php create mode 100644 twiml/voice/transcription/transcription-languagecode/transcription-languagecode.py create mode 100644 twiml/voice/transcription/transcription-languagecode/transcription-languagecode.rb create mode 100644 twiml/voice/transcription/transcription-name/meta.json create mode 100644 twiml/voice/transcription/transcription-name/output/transcription-name.twiml create mode 100644 twiml/voice/transcription/transcription-name/transcription-name.cs create mode 100644 twiml/voice/transcription/transcription-name/transcription-name.java create mode 100644 twiml/voice/transcription/transcription-name/transcription-name.js create mode 100644 twiml/voice/transcription/transcription-name/transcription-name.php create mode 100644 twiml/voice/transcription/transcription-name/transcription-name.py create mode 100644 twiml/voice/transcription/transcription-name/transcription-name.rb create mode 100644 twiml/voice/transcription/transcription-partialresults/meta.json create mode 100644 twiml/voice/transcription/transcription-partialresults/output/transcription-partialresults.twiml create mode 100644 twiml/voice/transcription/transcription-partialresults/transcription-partialresults.cs create mode 100644 twiml/voice/transcription/transcription-partialresults/transcription-partialresults.java create mode 100644 twiml/voice/transcription/transcription-partialresults/transcription-partialresults.js create mode 100644 twiml/voice/transcription/transcription-partialresults/transcription-partialresults.php create mode 100644 twiml/voice/transcription/transcription-partialresults/transcription-partialresults.py create mode 100644 twiml/voice/transcription/transcription-partialresults/transcription-partialresults.rb create mode 100644 twiml/voice/transcription/transcription-profanityfilter/meta.json create mode 100644 twiml/voice/transcription/transcription-profanityfilter/output/transcription-profanityfilter.twiml create mode 100644 twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.cs create mode 100644 twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.java create mode 100644 twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.js create mode 100644 twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.php create mode 100644 twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.py create mode 100644 twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.rb create mode 100644 twiml/voice/transcription/transcription-speechmodel/meta.json create mode 100644 twiml/voice/transcription/transcription-speechmodel/output/transcription-speechmodel.twiml create mode 100644 twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.cs create mode 100644 twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.java create mode 100644 twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.js create mode 100644 twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.php create mode 100644 twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.py create mode 100644 twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.rb create mode 100644 twiml/voice/transcription/transcription-stop/meta.json create mode 100644 twiml/voice/transcription/transcription-stop/output/transcription-stop.twiml create mode 100644 twiml/voice/transcription/transcription-stop/transcription-stop.cs create mode 100644 twiml/voice/transcription/transcription-stop/transcription-stop.java create mode 100644 twiml/voice/transcription/transcription-stop/transcription-stop.js create mode 100644 twiml/voice/transcription/transcription-stop/transcription-stop.php create mode 100644 twiml/voice/transcription/transcription-stop/transcription-stop.py create mode 100644 twiml/voice/transcription/transcription-stop/transcription-stop.rb create mode 100644 twiml/voice/transcription/transcription-track/meta.json create mode 100644 twiml/voice/transcription/transcription-track/output/transcription-track.twiml create mode 100644 twiml/voice/transcription/transcription-track/transcription-track.cs create mode 100644 twiml/voice/transcription/transcription-track/transcription-track.java create mode 100644 twiml/voice/transcription/transcription-track/transcription-track.js create mode 100644 twiml/voice/transcription/transcription-track/transcription-track.php create mode 100644 twiml/voice/transcription/transcription-track/transcription-track.py create mode 100644 twiml/voice/transcription/transcription-track/transcription-track.rb create mode 100644 twiml/voice/transcription/transcription-transcriptionengine/meta.json create mode 100644 twiml/voice/transcription/transcription-transcriptionengine/output/transcription-transcriptionengine.twiml create mode 100644 twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.cs create mode 100644 twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.java create mode 100644 twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.js create mode 100644 twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.php create mode 100644 twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.py create mode 100644 twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.rb diff --git a/twiml/voice/transcription/transcription-basic-usage/meta.json b/twiml/voice/transcription/transcription-basic-usage/meta.json new file mode 100644 index 000000000..4e2af60ad --- /dev/null +++ b/twiml/voice/transcription/transcription-basic-usage/meta.json @@ -0,0 +1,4 @@ +{ + "title": " - basic usage", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-basic-usage/output/transcription-basic-usage.twiml b/twiml/voice/transcription/transcription-basic-usage/output/transcription-basic-usage.twiml new file mode 100644 index 000000000..d559de1de --- /dev/null +++ b/twiml/voice/transcription/transcription-basic-usage/output/transcription-basic-usage.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.cs b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.cs new file mode 100644 index 000000000..5d2313f51 --- /dev/null +++ b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.java b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.java new file mode 100644 index 000000000..6a1bdc5e6 --- /dev/null +++ b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.js b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.js new file mode 100644 index 000000000..18834b050 --- /dev/null +++ b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.php b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.php new file mode 100644 index 000000000..6775ba515 --- /dev/null +++ b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.py b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.py new file mode 100644 index 000000000..3d138da17 --- /dev/null +++ b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.py @@ -0,0 +1,9 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.rb b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.rb new file mode 100644 index 000000000..6eeda3379 --- /dev/null +++ b/twiml/voice/transcription/transcription-basic-usage/transcription-basic-usage.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url') +end + +puts response diff --git a/twiml/voice/transcription/transcription-enableautomaticpunctuation/meta.json b/twiml/voice/transcription/transcription-enableautomaticpunctuation/meta.json new file mode 100644 index 000000000..403046f65 --- /dev/null +++ b/twiml/voice/transcription/transcription-enableautomaticpunctuation/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with enableAutomaticPunctuation attribute", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-enableautomaticpunctuation/output/transcription-enableautomaticpunctuation.twiml b/twiml/voice/transcription/transcription-enableautomaticpunctuation/output/transcription-enableautomaticpunctuation.twiml new file mode 100644 index 000000000..874c9014d --- /dev/null +++ b/twiml/voice/transcription/transcription-enableautomaticpunctuation/output/transcription-enableautomaticpunctuation.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.cs b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.cs new file mode 100644 index 000000000..b2494dcac --- /dev/null +++ b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", enableAutomaticPunctuation: true, transcriptionEngine: "google"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.java b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.java new file mode 100644 index 000000000..1cd0cf3ad --- /dev/null +++ b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").enableAutomaticPunctuation(true).transcriptionEngine("google").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.js b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.js new file mode 100644 index 000000000..f02b7d065 --- /dev/null +++ b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', enableAutomaticPunctuation: true, transcriptionEngine: 'google'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.php b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.php new file mode 100644 index 000000000..ebfb3ac71 --- /dev/null +++ b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'enableAutomaticPunctuation' => 'true', 'transcriptionEngine' => 'google']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.py b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.py new file mode 100644 index 000000000..29be68bdc --- /dev/null +++ b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.py @@ -0,0 +1,11 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + enable_automatic_punctuation=True, + transcription_engine='google') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.rb b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.rb new file mode 100644 index 000000000..97796666f --- /dev/null +++ b/twiml/voice/transcription/transcription-enableautomaticpunctuation/transcription-enableautomaticpunctuation.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', enable_automatic_punctuation: true, transcription_engine: 'google') +end + +puts response diff --git a/twiml/voice/transcription/transcription-hints-tokens/meta.json b/twiml/voice/transcription/transcription-hints-tokens/meta.json new file mode 100644 index 000000000..90a935ed6 --- /dev/null +++ b/twiml/voice/transcription/transcription-hints-tokens/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with hints attribute using tokens", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-hints-tokens/output/transcription-hints-tokens.twiml b/twiml/voice/transcription/transcription-hints-tokens/output/transcription-hints-tokens.twiml new file mode 100644 index 000000000..68a175a54 --- /dev/null +++ b/twiml/voice/transcription/transcription-hints-tokens/output/transcription-hints-tokens.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.cs b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.cs new file mode 100644 index 000000000..9de49d05f --- /dev/null +++ b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", hints: "$OOV_CLASS_ALPHANUMERIC_SEQUENCE"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.java b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.java new file mode 100644 index 000000000..5e55eb563 --- /dev/null +++ b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").hints("$OOV_CLASS_ALPHANUMERIC_SEQUENCE").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.js b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.js new file mode 100644 index 000000000..41db64eba --- /dev/null +++ b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', hints: '$OOV_CLASS_ALPHANUMERIC_SEQUENCE'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.php b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.php new file mode 100644 index 000000000..6c0b22911 --- /dev/null +++ b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'hints' => '$OOV_CLASS_ALPHANUMERIC_SEQUENCE']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.py b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.py new file mode 100644 index 000000000..8e0813e31 --- /dev/null +++ b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.py @@ -0,0 +1,10 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + hints='$OOV_CLASS_ALPHANUMERIC_SEQUENCE') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.rb b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.rb new file mode 100644 index 000000000..260625991 --- /dev/null +++ b/twiml/voice/transcription/transcription-hints-tokens/transcription-hints-tokens.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', hints: '$OOV_CLASS_ALPHANUMERIC_SEQUENCE') +end + +puts response diff --git a/twiml/voice/transcription/transcription-hints/meta.json b/twiml/voice/transcription/transcription-hints/meta.json new file mode 100644 index 000000000..e2365675f --- /dev/null +++ b/twiml/voice/transcription/transcription-hints/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with hints attribute", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-hints/output/transcription-hints.twiml b/twiml/voice/transcription/transcription-hints/output/transcription-hints.twiml new file mode 100644 index 000000000..9f1273a7a --- /dev/null +++ b/twiml/voice/transcription/transcription-hints/output/transcription-hints.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-hints/transcription-hints.cs b/twiml/voice/transcription/transcription-hints/transcription-hints.cs new file mode 100644 index 000000000..22d8b957b --- /dev/null +++ b/twiml/voice/transcription/transcription-hints/transcription-hints.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", hints: "Alice Johnson, Bob Martin, ACME Corp, XYZ Enterprises, product demo, sales inquiry, customer feedback"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-hints/transcription-hints.java b/twiml/voice/transcription/transcription-hints/transcription-hints.java new file mode 100644 index 000000000..c938659ce --- /dev/null +++ b/twiml/voice/transcription/transcription-hints/transcription-hints.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").hints("Alice Johnson, Bob Martin, ACME Corp, XYZ Enterprises, product demo, sales inquiry, customer feedback").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-hints/transcription-hints.js b/twiml/voice/transcription/transcription-hints/transcription-hints.js new file mode 100644 index 000000000..2a7a238a9 --- /dev/null +++ b/twiml/voice/transcription/transcription-hints/transcription-hints.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', hints: 'Alice Johnson, Bob Martin, ACME Corp, XYZ Enterprises, product demo, sales inquiry, customer feedback'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-hints/transcription-hints.php b/twiml/voice/transcription/transcription-hints/transcription-hints.php new file mode 100644 index 000000000..b29be1276 --- /dev/null +++ b/twiml/voice/transcription/transcription-hints/transcription-hints.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'hints' => 'Alice Johnson, Bob Martin, ACME Corp, XYZ Enterprises, product demo, sales inquiry, customer feedback']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-hints/transcription-hints.py b/twiml/voice/transcription/transcription-hints/transcription-hints.py new file mode 100644 index 000000000..639b7c82b --- /dev/null +++ b/twiml/voice/transcription/transcription-hints/transcription-hints.py @@ -0,0 +1,12 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + hints= + 'Alice Johnson, Bob Martin, ACME Corp, XYZ Enterprises, product demo, sales inquiry, customer feedback' +) +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-hints/transcription-hints.rb b/twiml/voice/transcription/transcription-hints/transcription-hints.rb new file mode 100644 index 000000000..d879d1438 --- /dev/null +++ b/twiml/voice/transcription/transcription-hints/transcription-hints.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', hints: 'Alice Johnson, Bob Martin, ACME Corp, XYZ Enterprises, product demo, sales inquiry, customer feedback') +end + +puts response diff --git a/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/meta.json b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/meta.json new file mode 100644 index 000000000..b3f70d7ca --- /dev/null +++ b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with inboundTrackLabel and outboundTrackLabel attributes", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/output/transcription-inboundtracklabel-outboundtracklabel.twiml b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/output/transcription-inboundtracklabel-outboundtracklabel.twiml new file mode 100644 index 000000000..d153c67ea --- /dev/null +++ b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/output/transcription-inboundtracklabel-outboundtracklabel.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.cs b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.cs new file mode 100644 index 000000000..729019a3c --- /dev/null +++ b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", inboundTrackLabel: "agent", outboundTrackLabel: "customer"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.java b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.java new file mode 100644 index 000000000..2f2a3eaea --- /dev/null +++ b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").inboundTrackLabel("agent").outboundTrackLabel("customer").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.js b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.js new file mode 100644 index 000000000..1b3c91207 --- /dev/null +++ b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', inboundTrackLabel: 'agent', outboundTrackLabel: 'customer'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.php b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.php new file mode 100644 index 000000000..50098443c --- /dev/null +++ b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'inboundTrackLabel' => 'agent', 'outboundTrackLabel' => 'customer']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.py b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.py new file mode 100644 index 000000000..f8776c12f --- /dev/null +++ b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.py @@ -0,0 +1,11 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + inbound_track_label='agent', + outbound_track_label='customer') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.rb b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.rb new file mode 100644 index 000000000..b50d165a7 --- /dev/null +++ b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/transcription-inboundtracklabel-outboundtracklabel.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', inbound_track_label: 'agent', outbound_track_label: 'customer') +end + +puts response diff --git a/twiml/voice/transcription/transcription-languagecode/meta.json b/twiml/voice/transcription/transcription-languagecode/meta.json new file mode 100644 index 000000000..a30e23787 --- /dev/null +++ b/twiml/voice/transcription/transcription-languagecode/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with languageCode attribute", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-languagecode/output/transcription-languagecode.twiml b/twiml/voice/transcription/transcription-languagecode/output/transcription-languagecode.twiml new file mode 100644 index 000000000..315b1f400 --- /dev/null +++ b/twiml/voice/transcription/transcription-languagecode/output/transcription-languagecode.twiml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.cs b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.cs new file mode 100644 index 000000000..dcbfdf06c --- /dev/null +++ b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", languageCode: "es-MX"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.java b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.java new file mode 100644 index 000000000..9a4868a95 --- /dev/null +++ b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").languageCode("es-MX").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.js b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.js new file mode 100644 index 000000000..e559941ce --- /dev/null +++ b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', languageCode: 'es-MX'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.php b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.php new file mode 100644 index 000000000..c42f527c3 --- /dev/null +++ b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'languageCode' => 'es-MX']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.py b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.py new file mode 100644 index 000000000..e4e70f6dd --- /dev/null +++ b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.py @@ -0,0 +1,10 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + language_code='es-MX') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.rb b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.rb new file mode 100644 index 000000000..614c24fc6 --- /dev/null +++ b/twiml/voice/transcription/transcription-languagecode/transcription-languagecode.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', language_code: 'es-MX') +end + +puts response diff --git a/twiml/voice/transcription/transcription-name/meta.json b/twiml/voice/transcription/transcription-name/meta.json new file mode 100644 index 000000000..0825fddd1 --- /dev/null +++ b/twiml/voice/transcription/transcription-name/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with name attribute", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-name/output/transcription-name.twiml b/twiml/voice/transcription/transcription-name/output/transcription-name.twiml new file mode 100644 index 000000000..4fa2aa746 --- /dev/null +++ b/twiml/voice/transcription/transcription-name/output/transcription-name.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-name/transcription-name.cs b/twiml/voice/transcription/transcription-name/transcription-name.cs new file mode 100644 index 000000000..819ba925b --- /dev/null +++ b/twiml/voice/transcription/transcription-name/transcription-name.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", name: "Contact center transcription"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-name/transcription-name.java b/twiml/voice/transcription/transcription-name/transcription-name.java new file mode 100644 index 000000000..1566bfdb2 --- /dev/null +++ b/twiml/voice/transcription/transcription-name/transcription-name.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").name("Contact center transcription").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-name/transcription-name.js b/twiml/voice/transcription/transcription-name/transcription-name.js new file mode 100644 index 000000000..e6f960718 --- /dev/null +++ b/twiml/voice/transcription/transcription-name/transcription-name.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', name: 'Contact center transcription'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-name/transcription-name.php b/twiml/voice/transcription/transcription-name/transcription-name.php new file mode 100644 index 000000000..13ec51de3 --- /dev/null +++ b/twiml/voice/transcription/transcription-name/transcription-name.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'name' => 'Contact center transcription']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-name/transcription-name.py b/twiml/voice/transcription/transcription-name/transcription-name.py new file mode 100644 index 000000000..fece2d43f --- /dev/null +++ b/twiml/voice/transcription/transcription-name/transcription-name.py @@ -0,0 +1,10 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + name='Contact center transcription') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-name/transcription-name.rb b/twiml/voice/transcription/transcription-name/transcription-name.rb new file mode 100644 index 000000000..916da65df --- /dev/null +++ b/twiml/voice/transcription/transcription-name/transcription-name.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', name: 'Contact center transcription') +end + +puts response diff --git a/twiml/voice/transcription/transcription-partialresults/meta.json b/twiml/voice/transcription/transcription-partialresults/meta.json new file mode 100644 index 000000000..adc9b0922 --- /dev/null +++ b/twiml/voice/transcription/transcription-partialresults/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with partialResults attribute", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-partialresults/output/transcription-partialresults.twiml b/twiml/voice/transcription/transcription-partialresults/output/transcription-partialresults.twiml new file mode 100644 index 000000000..e1ef209b0 --- /dev/null +++ b/twiml/voice/transcription/transcription-partialresults/output/transcription-partialresults.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.cs b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.cs new file mode 100644 index 000000000..59aa0bfe1 --- /dev/null +++ b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", partialResults: true, transcriptionEngine: "google"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.java b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.java new file mode 100644 index 000000000..385eef31f --- /dev/null +++ b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").partialResults(true).transcriptionEngine("google").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.js b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.js new file mode 100644 index 000000000..dded38d40 --- /dev/null +++ b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', partialResults: true, transcriptionEngine: 'google'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.php b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.php new file mode 100644 index 000000000..f203f2a94 --- /dev/null +++ b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'partialResults' => 'true', 'transcriptionEngine' => 'google']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.py b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.py new file mode 100644 index 000000000..4c6c0e252 --- /dev/null +++ b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.py @@ -0,0 +1,11 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + partial_results=True, + transcription_engine='google') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.rb b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.rb new file mode 100644 index 000000000..69e4a7cc3 --- /dev/null +++ b/twiml/voice/transcription/transcription-partialresults/transcription-partialresults.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', partial_results: true, transcription_engine: 'google') +end + +puts response diff --git a/twiml/voice/transcription/transcription-profanityfilter/meta.json b/twiml/voice/transcription/transcription-profanityfilter/meta.json new file mode 100644 index 000000000..5105fe1b0 --- /dev/null +++ b/twiml/voice/transcription/transcription-profanityfilter/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with profanityFilter attribute", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-profanityfilter/output/transcription-profanityfilter.twiml b/twiml/voice/transcription/transcription-profanityfilter/output/transcription-profanityfilter.twiml new file mode 100644 index 000000000..0f834fb3d --- /dev/null +++ b/twiml/voice/transcription/transcription-profanityfilter/output/transcription-profanityfilter.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.cs b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.cs new file mode 100644 index 000000000..dbaba7206 --- /dev/null +++ b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", profanityFilter: false, transcriptionEngine: "google"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.java b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.java new file mode 100644 index 000000000..08af0f357 --- /dev/null +++ b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").profanityFilter(false).transcriptionEngine("google").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.js b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.js new file mode 100644 index 000000000..4ceb62dbd --- /dev/null +++ b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', profanityFilter: false, transcriptionEngine: 'google'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.php b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.php new file mode 100644 index 000000000..9c561eba1 --- /dev/null +++ b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'profanityFilter' => 'false', 'transcriptionEngine' => 'google']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.py b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.py new file mode 100644 index 000000000..5503fe96c --- /dev/null +++ b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.py @@ -0,0 +1,11 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + profanity_filter=False, + transcription_engine='google') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.rb b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.rb new file mode 100644 index 000000000..2f84ba6bb --- /dev/null +++ b/twiml/voice/transcription/transcription-profanityfilter/transcription-profanityfilter.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', profanity_filter: false, transcription_engine: 'google') +end + +puts response diff --git a/twiml/voice/transcription/transcription-speechmodel/meta.json b/twiml/voice/transcription/transcription-speechmodel/meta.json new file mode 100644 index 000000000..0e8726d47 --- /dev/null +++ b/twiml/voice/transcription/transcription-speechmodel/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with speechModel attribute", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-speechmodel/output/transcription-speechmodel.twiml b/twiml/voice/transcription/transcription-speechmodel/output/transcription-speechmodel.twiml new file mode 100644 index 000000000..b83f9828f --- /dev/null +++ b/twiml/voice/transcription/transcription-speechmodel/output/transcription-speechmodel.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.cs b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.cs new file mode 100644 index 000000000..d671251fa --- /dev/null +++ b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", speechModel: "telephony", transcriptionEngine: "google"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.java b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.java new file mode 100644 index 000000000..5f4dd5e9a --- /dev/null +++ b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").speechModel("telephony").transcriptionEngine("google").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.js b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.js new file mode 100644 index 000000000..a88e80f55 --- /dev/null +++ b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', speechModel: 'telephony', transcriptionEngine: 'google'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.php b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.php new file mode 100644 index 000000000..56c546d81 --- /dev/null +++ b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'speechModel' => 'telephony', 'transcriptionEngine' => 'google']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.py b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.py new file mode 100644 index 000000000..561533b12 --- /dev/null +++ b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.py @@ -0,0 +1,11 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + speech_model='telephony', + transcription_engine='google') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.rb b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.rb new file mode 100644 index 000000000..b09a575e5 --- /dev/null +++ b/twiml/voice/transcription/transcription-speechmodel/transcription-speechmodel.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', speech_model: 'telephony', transcription_engine: 'google') +end + +puts response diff --git a/twiml/voice/transcription/transcription-stop/meta.json b/twiml/voice/transcription/transcription-stop/meta.json new file mode 100644 index 000000000..387ff8691 --- /dev/null +++ b/twiml/voice/transcription/transcription-stop/meta.json @@ -0,0 +1,4 @@ +{ + "title": "Stop a ", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-stop/output/transcription-stop.twiml b/twiml/voice/transcription/transcription-stop/output/transcription-stop.twiml new file mode 100644 index 000000000..7520bc895 --- /dev/null +++ b/twiml/voice/transcription/transcription-stop/output/transcription-stop.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-stop/transcription-stop.cs b/twiml/voice/transcription/transcription-stop/transcription-stop.cs new file mode 100644 index 000000000..1dbe72a7c --- /dev/null +++ b/twiml/voice/transcription/transcription-stop/transcription-stop.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var stop = new Stop(); + stop.Transcription(name: "Contact center transcription"); + response.Append(stop); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-stop/transcription-stop.java b/twiml/voice/transcription/transcription-stop/transcription-stop.java new file mode 100644 index 000000000..131f03f47 --- /dev/null +++ b/twiml/voice/transcription/transcription-stop/transcription-stop.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Stop; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().name("Contact center transcription").build(); + Stop stop = new Stop.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().stop(stop).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-stop/transcription-stop.js b/twiml/voice/transcription/transcription-stop/transcription-stop.js new file mode 100644 index 000000000..8bef4992b --- /dev/null +++ b/twiml/voice/transcription/transcription-stop/transcription-stop.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const stop = response.stop(); +stop.transcription({name: 'Contact center transcription'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-stop/transcription-stop.php b/twiml/voice/transcription/transcription-stop/transcription-stop.php new file mode 100644 index 000000000..a061422f9 --- /dev/null +++ b/twiml/voice/transcription/transcription-stop/transcription-stop.php @@ -0,0 +1,9 @@ +stop(); +$stop->transcription(['name' => 'Contact center transcription']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-stop/transcription-stop.py b/twiml/voice/transcription/transcription-stop/transcription-stop.py new file mode 100644 index 000000000..267be896b --- /dev/null +++ b/twiml/voice/transcription/transcription-stop/transcription-stop.py @@ -0,0 +1,8 @@ +from twilio.twiml.voice_response import VoiceResponse, Stop, Transcription + +response = VoiceResponse() +stop = Stop() +stop.transcription(name='Contact center transcription') +response.append(stop) + +print(response) diff --git a/twiml/voice/transcription/transcription-stop/transcription-stop.rb b/twiml/voice/transcription/transcription-stop/transcription-stop.rb new file mode 100644 index 000000000..89f632d12 --- /dev/null +++ b/twiml/voice/transcription/transcription-stop/transcription-stop.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.stop do |stop| + stop.transcription(name: 'Contact center transcription') +end + +puts response diff --git a/twiml/voice/transcription/transcription-track/meta.json b/twiml/voice/transcription/transcription-track/meta.json new file mode 100644 index 000000000..e202a70ee --- /dev/null +++ b/twiml/voice/transcription/transcription-track/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with track attribute", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-track/output/transcription-track.twiml b/twiml/voice/transcription/transcription-track/output/transcription-track.twiml new file mode 100644 index 000000000..4c1d57c9a --- /dev/null +++ b/twiml/voice/transcription/transcription-track/output/transcription-track.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-track/transcription-track.cs b/twiml/voice/transcription/transcription-track/transcription-track.cs new file mode 100644 index 000000000..4e1a75cab --- /dev/null +++ b/twiml/voice/transcription/transcription-track/transcription-track.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", track: "inbound_track"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-track/transcription-track.java b/twiml/voice/transcription/transcription-track/transcription-track.java new file mode 100644 index 000000000..12cbf7437 --- /dev/null +++ b/twiml/voice/transcription/transcription-track/transcription-track.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").track(Transcription.Track.INBOUND_TRACK).build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-track/transcription-track.js b/twiml/voice/transcription/transcription-track/transcription-track.js new file mode 100644 index 000000000..da06e7203 --- /dev/null +++ b/twiml/voice/transcription/transcription-track/transcription-track.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', track: 'inbound_track'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-track/transcription-track.php b/twiml/voice/transcription/transcription-track/transcription-track.php new file mode 100644 index 000000000..2b891129b --- /dev/null +++ b/twiml/voice/transcription/transcription-track/transcription-track.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'track' => 'inbound_track']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-track/transcription-track.py b/twiml/voice/transcription/transcription-track/transcription-track.py new file mode 100644 index 000000000..b59299e54 --- /dev/null +++ b/twiml/voice/transcription/transcription-track/transcription-track.py @@ -0,0 +1,10 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + track='inbound_track') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-track/transcription-track.rb b/twiml/voice/transcription/transcription-track/transcription-track.rb new file mode 100644 index 000000000..3d9dd40f6 --- /dev/null +++ b/twiml/voice/transcription/transcription-track/transcription-track.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', track: 'inbound_track') +end + +puts response diff --git a/twiml/voice/transcription/transcription-transcriptionengine/meta.json b/twiml/voice/transcription/transcription-transcriptionengine/meta.json new file mode 100644 index 000000000..cb51d2636 --- /dev/null +++ b/twiml/voice/transcription/transcription-transcriptionengine/meta.json @@ -0,0 +1,4 @@ +{ + "title": " with transcriptionEngine attribute", + "type": "server" +} diff --git a/twiml/voice/transcription/transcription-transcriptionengine/output/transcription-transcriptionengine.twiml b/twiml/voice/transcription/transcription-transcriptionengine/output/transcription-transcriptionengine.twiml new file mode 100644 index 000000000..6d0e88c1f --- /dev/null +++ b/twiml/voice/transcription/transcription-transcriptionengine/output/transcription-transcriptionengine.twiml @@ -0,0 +1,6 @@ + + + + + + diff --git a/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.cs b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.cs new file mode 100644 index 000000000..af298f224 --- /dev/null +++ b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.cs @@ -0,0 +1,17 @@ +using System; +using Twilio.TwiML; +using Twilio.TwiML.Voice; + + +class Example +{ + static void Main() + { + var response = new VoiceResponse(); + var start = new Start(); + start.Transcription(statusCallbackUrl: "https://example.com/your-callback-url", transcriptionEngine: "google"); + response.Append(start); + + Console.WriteLine(response.ToString()); + } +} diff --git a/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.java b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.java new file mode 100644 index 000000000..e424233ce --- /dev/null +++ b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.java @@ -0,0 +1,19 @@ +import com.twilio.twiml.VoiceResponse; +import com.twilio.twiml.voice.Start; +import com.twilio.twiml.voice.Transcription; +import com.twilio.twiml.TwiMLException; + + +public class Example { + public static void main(String[] args) { + Transcription transcription = new Transcription.Builder().statusCallbackUrl("https://example.com/your-callback-url").transcriptionEngine("google").build(); + Start start = new Start.Builder().transcription(transcription).build(); + VoiceResponse response = new VoiceResponse.Builder().start(start).build(); + + try { + System.out.println(response.toXml()); + } catch (TwiMLException e) { + e.printStackTrace(); + } + } +} diff --git a/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.js b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.js new file mode 100644 index 000000000..49683d6e9 --- /dev/null +++ b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.js @@ -0,0 +1,7 @@ +const VoiceResponse = require('twilio').twiml.VoiceResponse; + +const response = new VoiceResponse(); +const start = response.start(); +start.transcription({statusCallbackUrl: 'https://example.com/your-callback-url', transcriptionEngine: 'google'}); + +console.log(response.toString()); diff --git a/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.php b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.php new file mode 100644 index 000000000..5ae2eb901 --- /dev/null +++ b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.php @@ -0,0 +1,9 @@ +start(); +$start->transcription(['statusCallbackUrl' => 'https://example.com/your-callback-url', 'transcriptionEngine' => 'google']); + +echo $response; diff --git a/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.py b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.py new file mode 100644 index 000000000..f0383ba0f --- /dev/null +++ b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.py @@ -0,0 +1,10 @@ +from twilio.twiml.voice_response import VoiceResponse, Start, Transcription + +response = VoiceResponse() +start = Start() +start.transcription( + status_callback_url='https://example.com/your-callback-url', + transcription_engine='google') +response.append(start) + +print(response) diff --git a/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.rb b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.rb new file mode 100644 index 000000000..28b3658b1 --- /dev/null +++ b/twiml/voice/transcription/transcription-transcriptionengine/transcription-transcriptionengine.rb @@ -0,0 +1,8 @@ +require 'twilio-ruby' + +response = Twilio::TwiML::VoiceResponse.new +response.start do |start| + start.transcription(status_callback_url: 'https://example.com/your-callback-url', transcription_engine: 'google') +end + +puts response From c556ee1472fce4ba092e2447045946dcc21f229d Mon Sep 17 00:00:00 2001 From: Brianna DelValle Date: Mon, 15 Jul 2024 16:43:33 -0400 Subject: [PATCH 85/86] Add backslashes (#1082) --- twiml/voice/transcription/transcription-hints-tokens/meta.json | 2 +- twiml/voice/transcription/transcription-hints/meta.json | 2 +- .../meta.json | 2 +- twiml/voice/transcription/transcription-languagecode/meta.json | 2 +- twiml/voice/transcription/transcription-name/meta.json | 2 +- .../voice/transcription/transcription-partialresults/meta.json | 2 +- .../voice/transcription/transcription-profanityfilter/meta.json | 2 +- twiml/voice/transcription/transcription-speechmodel/meta.json | 2 +- twiml/voice/transcription/transcription-stop/meta.json | 2 +- twiml/voice/transcription/transcription-track/meta.json | 2 +- .../transcription/transcription-transcriptionengine/meta.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/twiml/voice/transcription/transcription-hints-tokens/meta.json b/twiml/voice/transcription/transcription-hints-tokens/meta.json index 90a935ed6..6f18251c7 100644 --- a/twiml/voice/transcription/transcription-hints-tokens/meta.json +++ b/twiml/voice/transcription/transcription-hints-tokens/meta.json @@ -1,4 +1,4 @@ { - "title": " with hints attribute using tokens", + "title": "\\ with hints attribute using tokens", "type": "server" } diff --git a/twiml/voice/transcription/transcription-hints/meta.json b/twiml/voice/transcription/transcription-hints/meta.json index e2365675f..11ecbb4c4 100644 --- a/twiml/voice/transcription/transcription-hints/meta.json +++ b/twiml/voice/transcription/transcription-hints/meta.json @@ -1,4 +1,4 @@ { - "title": " with hints attribute", + "title": "\\ with hints attribute", "type": "server" } diff --git a/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/meta.json b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/meta.json index b3f70d7ca..3a303b523 100644 --- a/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/meta.json +++ b/twiml/voice/transcription/transcription-inboundtracklabel-outboundtracklabel/meta.json @@ -1,4 +1,4 @@ { - "title": " with inboundTrackLabel and outboundTrackLabel attributes", + "title": "\\ with inboundTrackLabel and outboundTrackLabel attributes", "type": "server" } diff --git a/twiml/voice/transcription/transcription-languagecode/meta.json b/twiml/voice/transcription/transcription-languagecode/meta.json index a30e23787..fa0130eb1 100644 --- a/twiml/voice/transcription/transcription-languagecode/meta.json +++ b/twiml/voice/transcription/transcription-languagecode/meta.json @@ -1,4 +1,4 @@ { - "title": " with languageCode attribute", + "title": "\\ with languageCode attribute", "type": "server" } diff --git a/twiml/voice/transcription/transcription-name/meta.json b/twiml/voice/transcription/transcription-name/meta.json index 0825fddd1..1ce6be220 100644 --- a/twiml/voice/transcription/transcription-name/meta.json +++ b/twiml/voice/transcription/transcription-name/meta.json @@ -1,4 +1,4 @@ { - "title": " with name attribute", + "title": "\\ with name attribute", "type": "server" } diff --git a/twiml/voice/transcription/transcription-partialresults/meta.json b/twiml/voice/transcription/transcription-partialresults/meta.json index adc9b0922..b146f4f6d 100644 --- a/twiml/voice/transcription/transcription-partialresults/meta.json +++ b/twiml/voice/transcription/transcription-partialresults/meta.json @@ -1,4 +1,4 @@ { - "title": " with partialResults attribute", + "title": "\\ with partialResults attribute", "type": "server" } diff --git a/twiml/voice/transcription/transcription-profanityfilter/meta.json b/twiml/voice/transcription/transcription-profanityfilter/meta.json index 5105fe1b0..78d650f0b 100644 --- a/twiml/voice/transcription/transcription-profanityfilter/meta.json +++ b/twiml/voice/transcription/transcription-profanityfilter/meta.json @@ -1,4 +1,4 @@ { - "title": " with profanityFilter attribute", + "title": "\\ with profanityFilter attribute", "type": "server" } diff --git a/twiml/voice/transcription/transcription-speechmodel/meta.json b/twiml/voice/transcription/transcription-speechmodel/meta.json index 0e8726d47..9040c48a0 100644 --- a/twiml/voice/transcription/transcription-speechmodel/meta.json +++ b/twiml/voice/transcription/transcription-speechmodel/meta.json @@ -1,4 +1,4 @@ { - "title": " with speechModel attribute", + "title": "\\ with speechModel attribute", "type": "server" } diff --git a/twiml/voice/transcription/transcription-stop/meta.json b/twiml/voice/transcription/transcription-stop/meta.json index 387ff8691..0a8dd67f3 100644 --- a/twiml/voice/transcription/transcription-stop/meta.json +++ b/twiml/voice/transcription/transcription-stop/meta.json @@ -1,4 +1,4 @@ { - "title": "Stop a ", + "title": "Stop a \\", "type": "server" } diff --git a/twiml/voice/transcription/transcription-track/meta.json b/twiml/voice/transcription/transcription-track/meta.json index e202a70ee..579b90759 100644 --- a/twiml/voice/transcription/transcription-track/meta.json +++ b/twiml/voice/transcription/transcription-track/meta.json @@ -1,4 +1,4 @@ { - "title": " with track attribute", + "title": "\\ with track attribute", "type": "server" } diff --git a/twiml/voice/transcription/transcription-transcriptionengine/meta.json b/twiml/voice/transcription/transcription-transcriptionengine/meta.json index cb51d2636..179fe7d5b 100644 --- a/twiml/voice/transcription/transcription-transcriptionengine/meta.json +++ b/twiml/voice/transcription/transcription-transcriptionengine/meta.json @@ -1,4 +1,4 @@ { - "title": " with transcriptionEngine attribute", + "title": "\\ with transcriptionEngine attribute", "type": "server" } From a392576838c82a837a952e39b08af7e343960c93 Mon Sep 17 00:00:00 2001 From: benparj98 <109106005+benparj98@users.noreply.github.com> Date: Thu, 25 Jul 2024 07:57:04 -0700 Subject: [PATCH 86/86] Add files via upload (#1083) * Add files via upload New content type sample * Update messaging/content-templates/create-carousel-template/create-carousel-template.curl Co-authored-by: Cristhian Motoche * Update create-carousel-template.json --------- Co-authored-by: Cristhian Motoche --- .../create-carousel-template.curl | 85 +++++++++++++++++ .../create-carousel-template/meta.json | 6 ++ .../output/create-carousel-template.json | 95 +++++++++++++++++++ 3 files changed, 186 insertions(+) create mode 100644 messaging/content-templates/create-carousel-template/create-carousel-template.curl create mode 100644 messaging/content-templates/create-carousel-template/meta.json create mode 100644 messaging/content-templates/create-carousel-template/output/create-carousel-template.json diff --git a/messaging/content-templates/create-carousel-template/create-carousel-template.curl b/messaging/content-templates/create-carousel-template/create-carousel-template.curl new file mode 100644 index 000000000..f3b33ac93 --- /dev/null +++ b/messaging/content-templates/create-carousel-template/create-carousel-template.curl @@ -0,0 +1,85 @@ +curl -X POST 'https://content.twilio.com/v1/Content' \ +-H 'Content-Type: application/json' \ +-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN \ +-d '{ + "friendly_name": "twilio_deal", + "language": "en", + "variables": { + "1": "Twilio" + }, + "types": { + "twilio/carousel": { + "body": "New {{1}} merch just dropped! 👀", + "cards": [ + { + "title":"Twilio Hoodie", + "body":"Warm as owl feathers.", + "media":"https://sienna-grasshopper-3262.twil.io/assets/hoodie.jpeg", + "actions":[ + { + "type":"QUICK_REPLY", + "title":"I want it!", + "id":"want_hoodie" + }, + { + "type":"URL", + "title":"I am taking this!", + "url":"https://sienna-grasshopper-3262.twil.io/assets/hoodie.jpeg" + } + ] + }, + { + "title":"Twilio Tote", + "body":"Carry a little more.", + "media":"https://sienna-grasshopper-3262.twil.io/assets/tote.jpeg", + "actions":[ + { + "type":"QUICK_REPLY", + "title":"I want it!", + "id":"want_tote" + }, + { + "type":"URL", + "title":"Take the tote!", + "url":"https://sienna-grasshopper-3262.twil.io/assets/tote.jpeg" + } + ] + }, + { + "title":"Twilio Bucket Hat", + "body":"Stay in the shade.", + "media":"https://sienna-grasshopper-3262.twil.io/assets/hat.jpeg", + "actions":[ + { + "type":"QUICK_REPLY", + "title":"I want it!", + "id":"want_hat" + }, + { + "type":"URL", + "title":"Hand me the hat!", + "url":"https://sienna-grasshopper-3262.twil.io/assets/hat.jpeg" + } + ] + }, + { + "title":"Twilio Mug", + "body":"Sip a little.", + "media":"https://sienna-grasshopper-3262.twil.io/assets/mug.jpeg", + "actions":[ + { + "type":"QUICK_REPLY", + "title":"I want it!", + "id":"want_mug" + }, + { + "type":"URL", + "title":"Make me a mug!", + "url":"https://sienna-grasshopper-3262.twil.io/assets/mug.jpeg" + } + ] + } +] + } + } +}' diff --git a/messaging/content-templates/create-carousel-template/meta.json b/messaging/content-templates/create-carousel-template/meta.json new file mode 100644 index 000000000..c9d5e7050 --- /dev/null +++ b/messaging/content-templates/create-carousel-template/meta.json @@ -0,0 +1,6 @@ +{ + "title": "Content Templates API - Create a Carousel Template", + "title_override": "Create Carousel Content Template", + "description_override": "", + "type": "server" +} \ No newline at end of file diff --git a/messaging/content-templates/create-carousel-template/output/create-carousel-template.json b/messaging/content-templates/create-carousel-template/output/create-carousel-template.json new file mode 100644 index 000000000..d09173709 --- /dev/null +++ b/messaging/content-templates/create-carousel-template/output/create-carousel-template.json @@ -0,0 +1,95 @@ +{ + "account_sid": "ACXXXXXXXX", + "date_created": "2024-07-24T20:35:59Z", + "date_updated": "2024-07-24T20:35:59Z", + "friendly_name": "twilio_deal", + "language": "en", + "links": { + "approval_create": "https://content.twilio.com/v1/Content/HXxxxxxxxxx/ApprovalRequests/whatsapp", + "approval_fetch": "https://content.twilio.com/v1/Content/HXxxxxxxxxx/ApprovalRequests" + }, + "sid": "HXxxxxxxx", + "types": { + "twilio/carousel": { + "body": "New {{1}} merch just dropped! 👀", + "cards": [ + { + "actions": [ + { + "id": "want_hoodie", + "index": 0, + "title": "I want it!", + "type": "QUICK_REPLY" + }, + { + "title": "I'm taking this!", + "type": "URL", + "url": "https://sienna-grasshopper-3262.twil.io/assets/hoodie.jpeg" + } + ], + "body": "Warm as owl feathers.", + "media": "https://sienna-grasshopper-3262.twil.io/assets/hoodie.jpeg", + "title": "Twilio Hoodie" + }, + { + "actions": [ + { + "id": "want_tote", + "index": 0, + "title": "I want it!", + "type": "QUICK_REPLY" + }, + { + "title": "Take the tote!", + "type": "URL", + "url": "https://sienna-grasshopper-3262.twil.io/assets/tote.jpeg" + } + ], + "body": "Carry a little more.", + "media": "https://sienna-grasshopper-3262.twil.io/assets/tote.jpeg", + "title": "Twilio Tote" + }, + { + "actions": [ + { + "id": "want_hat", + "index": 0, + "title": "I want it!", + "type": "QUICK_REPLY" + }, + { + "title": "Hand me the hat!", + "type": "URL", + "url": "https://sienna-grasshopper-3262.twil.io/assets/hat.jpeg" + } + ], + "body": "Stay in the shade.", + "media": "https://sienna-grasshopper-3262.twil.io/assets/hat.jpeg", + "title": "Twilio Bucket Hat" + }, + { + "actions": [ + { + "id": "want_mug", + "index": 0, + "title": "I want it!", + "type": "QUICK_REPLY" + }, + { + "title": "Make me a mug!", + "type": "URL", + "url": "https://sienna-grasshopper-3262.twil.io/assets/mug.jpeg" + } + ], + "body": "Sip a little.", + "media": "https://sienna-grasshopper-3262.twil.io/assets/mug.jpeg", + "title": "Twilio Mug" + } + ] + } + }, + "url": "https://content.twilio.com/v1/Content/HXxxxxxxxxx", + "variables": { + "1": "Twilio" + } +}