Retrieve a list of Contents with approval statuses belonging to the account used to make the request
A Content resource represents rich messaging content and its respective approval request status.
Retrieve a list of Contents with approval statuses belonging to the account used to make the request
Query parameters
-
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum value is
1
, maximum value is1000
. -
The page index. This value is simply for client state.
Minimum value is
0
. -
The page token. This is provided by the API.
-
Whether to sort by ascending or descending date updated
-
Whether to sort by ascending or descending content name
-
Filter by >=[date-time]
-
Filter by <=[date-time]
-
Filter by Regex Pattern in content name
-
Filter by Regex Pattern in template content
-
Filter by array of valid language(s)
-
Filter by array of contentType(s)
-
Filter by array of ChannelEligibility(s), where ChannelEligibility=
:
curl \
--request GET 'https://content.twilio.com/v2/ContentAndApprovals' \
--user "username:password"
{
"meta": {
"key": "contents",
"url": "https://content.twilio.com/v2/ContentAndApprovals?PageSize=10&Page=0",
"page": 0,
"page_size": 10,
"next_page_url": null,
"first_page_url": "https://content.twilio.com/v2/ContentAndApprovals?PageSize=10&Page=0",
"previous_page_url": null
},
"contents": []
}
{
"meta": {
"key": "contents",
"url": "https://content.twilio.com/v2/ContentAndApprovals?PageSize=20&Page=0",
"page": 0,
"page_size": 20,
"next_page_url": null,
"first_page_url": "https://content.twilio.com/v2/ContentAndApprovals?PageSize=20&Page=0",
"previous_page_url": null
},
"contents": [
{
"sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"types": {
"twilio/text": {
"body": "Foo Bar Co is located at 39.7392, 104.9903"
},
"twilio/location": {
"label": "Foo Bar Co",
"latitude": 39.7392,
"longitude": 104.9903
}
},
"language": "en",
"variables": {
"name": "foo"
},
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2015-07-30T19:00:00Z",
"date_updated": "2015-07-30T19:00:00Z",
"friendly_name": "Some content",
"approval_requests": {
"name": "",
"status": "unsubmitted",
"category": "",
"content_type": "",
"rejection_reason": "",
"allow_category_change": true
}
},
{
"sid": "HX5fcd48a417c1cb59da349ad6d5da4607",
"types": {
"twilio/media": {
"body": "{{1}}, Congratulations {{2}}! For additional assistance, please contact us at hello@twilio.com",
"media": [
"https://example.com/template"
]
}
},
"language": "en",
"variables": {
"1": "name",
"2": "typedocument"
},
"account_sid": "AC25c0d4b9093547216c460212e24e77ee",
"date_created": "2023-01-13T23:33:46Z",
"date_updated": "2023-01-13T23:33:46Z",
"friendly_name": "Media Test",
"approval_requests": {
"name": "Media Test",
"status": "approved",
"category": "TRANSACTIONAL",
"content_type": "twilio/media",
"rejection_reason": "",
"allow_category_change": false
}
},
{
"sid": "HX15c711fcc6d9ea5268d7ab77938a20ff",
"types": {
"twilio/media": {
"body": "Hi there, {{1}}, we have received your request to upload {{2}}, and should be uploaded shortly.",
"media": [
"http://example.com/highlights/{{3}}"
]
}
},
"language": "en",
"variables": {
"1": "name",
"2": "type_video",
"3": "small.mp4"
},
"account_sid": "AC25c0d4b9093547216c460212e24e77ee",
"date_created": "2023-01-18T02:46:35Z",
"date_updated": "2023-01-18T02:46:35Z",
"friendly_name": "Video Highlights",
"approval_requests": {
"name": "Video Highlights",
"status": "rejected",
"category": "TRANSACTIONAL",
"content_type": "twilio/media",
"rejection_reason": "INVALID_FORMAT. Facebook is not able to create template with templateName=Video Highlights_hx15c711fcc6d9ea5268d7ab77938a20ff due to the following error: Invalid parameter. More Details: Message template 'components' param is missing expected field(s). component of type HEADER is missing expected field(s) (example)",
"allow_category_change": true
}
}
]
}