A Content resource represents rich messaging content.
Create a Content resource
POST
/v1/Content
curl \
--request POST 'https://content.twilio.com/v1/Content' \
--user "username:password" \
--header "Content-Type: application/json" \
--data '{
"friendly_name": "string",
"variables": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"language": "string",
"types": {
"twilio/text": {
"body": "string"
},
"twilio/media": {
"body": "string",
"media": [
"string"
]
},
"twilio/location": {
"latitude": 42.0,
"longitude": 42.0,
"label": "string",
"id": "string",
"address": "string"
},
"twilio/list-picker": {
"body": "string",
"button": "string",
"items": [
{
"id": "string",
"item": "string",
"description": "string"
}
]
},
"twilio/call-to-action": {
"body": "string",
"actions": [
{
"type": "URL",
"title": "string",
"url": "string",
"phone": "string",
"code": "string",
"id": "string"
}
]
},
"twilio/quick-reply": {
"body": "string",
"actions": [
{
"type": "QUICK_REPLY",
"title": "string",
"id": "string"
}
]
},
"twilio/card": {
"title": "string",
"subtitle": "string",
"media": [
"string"
],
"actions": [
{
"type": "URL",
"title": "string",
"url": "string",
"phone": "string",
"id": "string",
"code": "string"
}
]
},
"twilio/catalog": {
"title": "string",
"body": "string",
"subtitle": "string",
"id": "string",
"items": [
{
"id": "string",
"section_title": "string",
"name": "string",
"media_url": "string",
"price": 42.0,
"description": "string"
}
],
"dynamic_items": "string"
},
"twilio/carousel": {
"body": "string",
"cards": [
{
"title": "string",
"body": "string",
"media": "string",
"actions": [
{
"type": "URL",
"title": "string",
"url": "string",
"phone": "string",
"id": "string"
}
]
}
]
},
"twilio/flows": {
"body": "string",
"button_text": "string",
"subtitle": "string",
"media_url": "string",
"pages": [
{
"id": "string",
"next_page_id": "string",
"title": "string",
"subtitle": "string",
"layout": [
{
"label": "string",
"type": "string"
}
]
}
],
"type": "string"
},
"twilio/schedule": {
"id": "string",
"title": "string",
"timeSlots": "string"
},
"whatsapp/card": {
"body": "string",
"footer": "string",
"media": [
"string"
],
"header_text": "string",
"actions": [
{
"type": "URL",
"title": "string",
"url": "string",
"phone": "string",
"id": "string",
"code": "string"
}
]
},
"whatsapp/authentication": {
"add_security_recommendation": true,
"code_expiration_minutes": 42.0,
"actions": [
{
"type": "COPY_CODE",
"copy_code_text": "string"
}
]
}
}
}'
Request examples
{
"friendly_name": "string",
"variables": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"language": "string",
"types": {
"twilio/text": {
"body": "string"
},
"twilio/media": {
"body": "string",
"media": [
"string"
]
},
"twilio/location": {
"latitude": 42.0,
"longitude": 42.0,
"label": "string",
"id": "string",
"address": "string"
},
"twilio/list-picker": {
"body": "string",
"button": "string",
"items": [
{
"id": "string",
"item": "string",
"description": "string"
}
]
},
"twilio/call-to-action": {
"body": "string",
"actions": [
{
"type": "URL",
"title": "string",
"url": "string",
"phone": "string",
"code": "string",
"id": "string"
}
]
},
"twilio/quick-reply": {
"body": "string",
"actions": [
{
"type": "QUICK_REPLY",
"title": "string",
"id": "string"
}
]
},
"twilio/card": {
"title": "string",
"subtitle": "string",
"media": [
"string"
],
"actions": [
{
"type": "URL",
"title": "string",
"url": "string",
"phone": "string",
"id": "string",
"code": "string"
}
]
},
"twilio/catalog": {
"title": "string",
"body": "string",
"subtitle": "string",
"id": "string",
"items": [
{
"id": "string",
"section_title": "string",
"name": "string",
"media_url": "string",
"price": 42.0,
"description": "string"
}
],
"dynamic_items": "string"
},
"twilio/carousel": {
"body": "string",
"cards": [
{
"title": "string",
"body": "string",
"media": "string",
"actions": [
{
"type": "URL",
"title": "string",
"url": "string",
"phone": "string",
"id": "string"
}
]
}
]
},
"twilio/flows": {
"body": "string",
"button_text": "string",
"subtitle": "string",
"media_url": "string",
"pages": [
{
"id": "string",
"next_page_id": "string",
"title": "string",
"subtitle": "string",
"layout": [
{
"label": "string",
"type": "string"
}
]
}
],
"type": "string"
},
"twilio/schedule": {
"id": "string",
"title": "string",
"timeSlots": "string"
},
"whatsapp/card": {
"body": "string",
"footer": "string",
"media": [
"string"
],
"header_text": "string",
"actions": [
{
"type": "URL",
"title": "string",
"url": "string",
"phone": "string",
"id": "string",
"code": "string"
}
]
},
"whatsapp/authentication": {
"add_security_recommendation": true,
"code_expiration_minutes": 42.0,
"actions": [
{
"type": "COPY_CODE",
"copy_code_text": "string"
}
]
}
}
}
Response examples (201)
{
"sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"friendly_name": "",
"language": "en",
"variables": {
"name": "foo"
},
"types": {
"twilio/text": {
"body": "Foo Bar Co is located at 39.7392, 104.9903"
},
"twilio/location": {
"longitude": 104.9903,
"latitude": 39.7392,
"label": "Foo Bar Co"
}
},
"url": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2015-07-30T19:00:00Z",
"date_updated": "2015-07-30T19:00:00Z",
"links": {
"approval_create": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests/whatsapp",
"approval_fetch": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests"
}
}