From b405ab00501323f853917c2ea77345bd28c38769 Mon Sep 17 00:00:00 2001 From: sbansla Date: Wed, 25 Sep 2024 15:03:56 +0530 Subject: [PATCH] chore: content sdk changes moved to content v1 in internal open api repo --- spec/json/twilio_content_sdk.json | 2289 ----------------------------- spec/yaml/twilio_content_sdk.yaml | 1674 --------------------- 2 files changed, 3963 deletions(-) delete mode 100644 spec/json/twilio_content_sdk.json delete mode 100644 spec/yaml/twilio_content_sdk.yaml diff --git a/spec/json/twilio_content_sdk.json b/spec/json/twilio_content_sdk.json deleted file mode 100644 index ae8b42e1..00000000 --- a/spec/json/twilio_content_sdk.json +++ /dev/null @@ -1,2289 +0,0 @@ -{ - "components": { - "securitySchemes": { - "accountSid_authToken": { - "scheme": "basic", - "type": "http" - } - }, - "schemas": { - "listItems": { - "type": "array", - "items": { - "$ref": "#/components/schemas/listItem" - } - }, - "listItem": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "item": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "id", - "item" - ] - }, - "callToActionActions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/callToActionAction" - } - }, - "callToActionActionType": { - "type": "string", - "enum": [ - "URL", - "PHONE_NUMBER", - "COPY_CODE", - "VOICE_CALL" - ] - }, - "callToActionAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "$ref": "#/components/schemas/callToActionActionType" - }, - "title": { - "type": "string" - }, - "url": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "code": { - "type": "string" - } - }, - "required": [ - "type", - "title" - ] - }, - "quickReplyActions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/quickReplyAction" - } - }, - "quickReplyActionType": { - "type": "string", - "enum": [ - "QUICK_REPLY" - ] - }, - "quickReplyAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "$ref": "#/components/schemas/quickReplyActionType" - }, - "title": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": [ - "type", - "title" - ] - }, - "cardActions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/cardAction" - } - }, - "cardActionType": { - "type": "string", - "enum": [ - "URL", - "PHONE_NUMBER", - "QUICK_REPLY", - "COPY_CODE", - "VOICE_CALL" - ] - }, - "cardAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "$ref": "#/components/schemas/cardActionType" - }, - "title": { - "type": "string" - }, - "url": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "id": { - "type": "string" - }, - "code": { - "type": "string" - } - }, - "required": [ - "type", - "title" - ] - }, - "carouselActions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/carouselAction" - } - }, - "carouselActionType": { - "type": "string", - "enum": [ - "URL", - "PHONE_NUMBER", - "QUICK_REPLY" - ] - }, - "carouselAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "$ref": "#/components/schemas/carouselActionType" - }, - "title": { - "type": "string" - }, - "url": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": [ - "type", - "title" - ] - }, - "authenticationActions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/authenticationAction" - } - }, - "authenticationActionType": { - "type": "string", - "enum": [ - "COPY_CODE" - ] - }, - "authenticationAction": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "$ref": "#/components/schemas/authenticationActionType" - }, - "copy_code_text": { - "type": "string" - } - }, - "required": [ - "type", - "copy_code_text" - ] - }, - "catalogItems": { - "type": "array", - "items": { - "$ref": "#/components/schemas/catalogItem" - } - }, - "catalogItem": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "section_title": { - "type": "string" - }, - "name": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "price": { - "type": "number" - }, - "description": { - "type": "string" - } - } - }, - "carouselCards": { - "type": "array", - "items": { - "$ref": "#/components/schemas/carouselCard" - } - }, - "carouselCard": { - "type": "object", - "additionalProperties": false, - "properties": { - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "media": { - "type": "string" - }, - "actions": { - "$ref": "#/components/schemas/carouselActions" - } - } - }, - "twilioText": { - "type": "object", - "description": "Type containing only plain text-based content", - "nullable": true, - "additionalProperties": false, - "properties": { - "body": { - "type": "string" - } - }, - "required": [ - "body" - ] - }, - "twilioMedia": { - "type": "object", - "description": "twilio/media is used to send file attachments, or to send long text via MMS in the US and Canada. As such, the twilio/media type must contain at least ONE of text or media content.", - "nullable": true, - "additionalProperties": false, - "properties": { - "body": { - "type": "string" - }, - "media": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "media" - ] - }, - "twilioLocation": { - "type": "object", - "description": "twilio/location type contains a location pin and an optional label, which can be used to enhance delivery notifications or connect recipients to physical experiences you offer.", - "nullable": true, - "additionalProperties": false, - "properties": { - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - }, - "label": { - "type": "string" - } - }, - "required": [ - "latitude", - "longitude" - ] - }, - "twilioListPicker": { - "type": "object", - "description": "twilio/list-picker includes a menu of up to 10 options, which offers a simple way for users to make a selection.", - "nullable": true, - "additionalProperties": false, - "properties": { - "body": { - "type": "string" - }, - "button": { - "type": "string" - }, - "items": { - "$ref": "#/components/schemas/listItems" - } - }, - "required": [ - "body", - "button", - "items" - ] - }, - "twilioCallToAction": { - "type": "object", - "description": "twilio/call-to-action buttons let recipients tap to trigger actions such as launching a website or making a phone call.", - "nullable": true, - "additionalProperties": false, - "properties": { - "body": { - "type": "string" - }, - "actions": { - "$ref": "#/components/schemas/callToActionActions" - } - } - }, - "twilioQuickReply": { - "type": "object", - "description": "twilio/quick-reply templates let recipients tap, rather than type, to respond to the message.", - "nullable": true, - "additionalProperties": false, - "properties": { - "body": { - "type": "string" - }, - "actions": { - "$ref": "#/components/schemas/quickReplyActions" - } - }, - "required": [ - "body", - "actions" - ] - }, - "twilioCard": { - "type": "object", - "description": "twilio/card is a structured template which can be used to send a series of related information. It must include a title and at least one additional field.", - "nullable": true, - "additionalProperties": false, - "properties": { - "title": { - "type": "string" - }, - "subtitle": { - "type": "string" - }, - "media": { - "type": "array", - "items": { - "type": "string" - } - }, - "actions": { - "$ref": "#/components/schemas/cardActions" - } - }, - "required": [ - "title" - ] - }, - "whatsappCard": { - "type": "object", - "description": "whatsapp/card is a structured template which can be used to send a series of related information. It must include a body and at least one additional field.", - "nullable": true, - "additionalProperties": false, - "properties": { - "body": { - "type": "string" - }, - "footer": { - "type": "string" - }, - "media": { - "type": "array", - "items": { - "type": "string" - } - }, - "header_text": { - "type": "string" - }, - "actions": { - "$ref": "#/components/schemas/cardActions" - } - }, - "required": [ - "body" - ] - }, - "whatsappAuthentication": { - "type": "object", - "description": "whatsApp/authentication templates let companies deliver WA approved one-time-password button.", - "nullable": true, - "additionalProperties": false, - "properties": { - "add_security_recommendation": { - "type": "boolean" - }, - "code_expiration_minutes": { - "type": "number" - }, - "actions": { - "$ref": "#/components/schemas/authenticationActions" - } - }, - "required": [ - "actions" - ] - }, - "twilioCatalog": { - "type": "object", - "description": "twilio/catalog type lets recipients view list of catalog products, ask questions about products, order products.", - "nullable": true, - "additionalProperties": false, - "properties": { - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "subtitle": { - "type": "string" - }, - "id": { - "type": "string" - }, - "items": { - "$ref": "#/components/schemas/catalogItems" - }, - "dynamic_items": { - "type": "string" - } - }, - "required": [ - "body" - ] - }, - "twilioCarousel": { - "type": "object", - "description": "twilio/carousel templates allow you to send a single text message accompanied by a set of up to 10 carousel cards in a horizontally scrollable view", - "nullable": true, - "additionalProperties": false, - "properties": { - "body": { - "type": "string" - }, - "cards": { - "$ref": "#/components/schemas/carouselCards" - } - }, - "required": [ - "body", - "cards" - ] - }, - "twilioFlows": { - "type": "object", - "description": "twilio/flows templates allow you to send multiple messages in a set order with text or select options", - "nullable": true, - "additionalProperties": false, - "properties": { - "body": { - "type": "string" - }, - "button_text": { - "type": "string" - }, - "subtitle": { - "type": "string" - }, - "media_url": { - "type": "string" - }, - "pages": { - "$ref": "#/components/schemas/flowsPages" - }, - "type": { - "type": "string" - } - }, - "required": [ - "body", - "button_text", - "subtitle", - "media_url", - "pages", - "type" - ] - }, - "flowsPages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/flowsPage" - } - }, - "flowsPage": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "next_page_id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "subtitle": { - "type": "string" - }, - "layout": { - "$ref": "#/components/schemas/flowsPageComponents" - } - }, - "required": [ - "id", - "layout" - ] - }, - "flowsPageComponents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/flowsPageComponent" - } - }, - "flowsPageComponent": { - "type": "object", - "additionalProperties": false, - "properties": { - "label": { - "type": "string" - }, - "type": { - "type": "string" - }, - "text": { - "type": "string" - }, - "options": { - "$ref": "#/components/schemas/flowsPageComponentSelectItems" - } - }, - "required": [ - "label", - "type" - ] - }, - "flowsPageComponentSelectItems": { - "type": "array", - "items": { - "$ref": "#/components/schemas/flowsPageComponentSelectItem" - } - }, - "flowsPageComponentSelectItem": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "title" - ] - }, - "ContentApprovalRequest": { - "type": "object", - "description": "Content approval request body", - "required": [ - "name", - "category" - ], - "properties": { - "name": { - "description": "Name of the template.", - "type": "string" - }, - "category": { - "description": "A WhatsApp recognized template category.", - "type": "string" - } - } - }, - "ContentCreateRequest": { - "type": "object", - "description": "Content creation request body", - "properties": { - "friendly_name": { - "description": "User defined name of the content", - "type": "string" - }, - "variables": { - "description": "Key value pairs of variable name to value", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "language": { - "description": "Language code for the content", - "type": "string" - }, - "types": { - "$ref": "#/components/schemas/types" - } - }, - "required": [ - "language", - "types" - ] - }, - "types": { - "description": "Content types", - "type": "object", - "properties": { - "twilio/text": { - "$ref": "#/components/schemas/twilioText" - }, - "twilio/media": { - "$ref": "#/components/schemas/twilioMedia" - }, - "twilio/location": { - "$ref": "#/components/schemas/twilioLocation" - }, - "twilio/list-picker": { - "$ref": "#/components/schemas/twilioListPicker" - }, - "twilio/call-to-action": { - "$ref": "#/components/schemas/twilioCallToAction" - }, - "twilio/quick-reply": { - "$ref": "#/components/schemas/twilioQuickReply" - }, - "twilio/card": { - "$ref": "#/components/schemas/twilioCard" - }, - "twilio/catalog": { - "$ref": "#/components/schemas/twilioCatalog" - }, - "twilio/carousel": { - "$ref": "#/components/schemas/twilioCarousel" - }, - "twilio/flows": { - "$ref": "#/components/schemas/twilioFlows" - }, - "whatsapp/card": { - "$ref": "#/components/schemas/whatsappCard" - }, - "whatsapp/authentication": { - "$ref": "#/components/schemas/whatsappAuthentication" - } - } - }, - "content.v1.content.approval_create": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "category": { - "type": "string", - "nullable": true - }, - "content_type": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "nullable": true - }, - "rejection_reason": { - "type": "string", - "nullable": true - }, - "allow_category_change": { - "type": "boolean", - "nullable": true - } - } - }, - "content.v1.content.approval_fetch": { - "type": "object", - "properties": { - "sid": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^HX[0-9a-fA-F]{32}$", - "nullable": true, - "description": "The unique string that that we created to identify the Content resource." - }, - "account_sid": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "nullable": true, - "description": "The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource." - }, - "whatsapp": { - "nullable": true, - "description": "Contains the whatsapp approval information for the Content resource, with fields such as approval status, rejection reason, and category, amongst others." - }, - "url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The URL of the resource, relative to `https://content.twilio.com`." - } - } - }, - "content.v1.content": { - "type": "object", - "properties": { - "date_created": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." - }, - "date_updated": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." - }, - "sid": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^HX[0-9a-fA-F]{32}$", - "nullable": true, - "description": "The unique string that that we created to identify the Content resource." - }, - "account_sid": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "nullable": true, - "description": "The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource." - }, - "friendly_name": { - "type": "string", - "nullable": true, - "description": "A string name used to describe the Content resource. Not visible to the end recipient." - }, - "language": { - "type": "string", - "nullable": true, - "description": "Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in." - }, - "variables": { - "nullable": true, - "description": "Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}." - }, - "types": { - "nullable": true, - "description": "The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource." - }, - "url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The URL of the resource, relative to `https://content.twilio.com`." - }, - "links": { - "type": "object", - "format": "uri-map", - "nullable": true, - "description": "A list of links related to the Content resource, such as approval_fetch and approval_create" - } - } - }, - "content.v1.content_and_approvals": { - "type": "object", - "properties": { - "date_created": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." - }, - "date_updated": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." - }, - "sid": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^HX[0-9a-fA-F]{32}$", - "nullable": true, - "description": "The unique string that that we created to identify the Content resource." - }, - "account_sid": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "nullable": true, - "description": "The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource." - }, - "friendly_name": { - "type": "string", - "nullable": true, - "description": "A string name used to describe the Content resource. Not visible to the end recipient." - }, - "language": { - "type": "string", - "nullable": true, - "description": "Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in." - }, - "variables": { - "nullable": true, - "description": "Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}." - }, - "types": { - "nullable": true, - "description": "The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource." - }, - "approval_requests": { - "nullable": true, - "description": "The submitted information and approval request status of the Content resource." - } - } - }, - "content.v1.legacy_content": { - "type": "object", - "properties": { - "date_created": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." - }, - "date_updated": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format." - }, - "sid": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^HX[0-9a-fA-F]{32}$", - "nullable": true, - "description": "The unique string that that we created to identify the Content resource." - }, - "account_sid": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "nullable": true, - "description": "The SID of the [Account](https://www.twilio.com/docs/usage/api/account) that created Content resource." - }, - "friendly_name": { - "type": "string", - "nullable": true, - "description": "A string name used to describe the Content resource. Not visible to the end recipient." - }, - "language": { - "type": "string", - "nullable": true, - "description": "Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in." - }, - "variables": { - "nullable": true, - "description": "Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}." - }, - "types": { - "nullable": true, - "description": "The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource." - }, - "legacy_template_name": { - "type": "string", - "nullable": true, - "description": "The string name of the legacy content template associated with this Content resource, unique across all template names for its account. Only lowercase letters, numbers and underscores are allowed" - }, - "legacy_body": { - "type": "string", - "nullable": true, - "description": "The string body field of the legacy content template associated with this Content resource" - }, - "url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "The URL of the resource, relative to `https://content.twilio.com`." - } - } - } - } - }, - "info": { - "title": "Twilio - Content", - "description": "This is the public Twilio REST API.", - "termsOfService": "https://www.twilio.com/legal/tos", - "contact": { - "name": "Twilio Support", - "url": "https://support.twilio.com", - "email": "support@twilio.com" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version": "1.1.0" - }, - "openapi": "3.0.1", - "paths": { - "/v1/Content/{ContentSid}/ApprovalRequests/whatsapp": { - "servers": [ - { - "url": "https://content.twilio.com" - } - ], - "description": "", - "x-twilio": { - "defaultOutputProperties": [ - "sid", - "account_sid", - "whatsapp" - ], - "parent": "/Content/{Sid}", - "mountName": "approval_create", - "pathType": "list" - }, - "post": { - "description": "", - "tags": [ - "Contentv1ApprovalCreate" - ], - "parameters": [ - { - "name": "ContentSid", - "in": "path", - "description": "", - "schema": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^HX[0-9a-fA-F]{32}$" - }, - "required": true - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ContentApprovalRequest" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/content.v1.content.approval_create" - }, - "examples": { - "createApproval": { - "value": { - "name": "tree_fiddy", - "category": "UTILITY", - "content_type": "twilio/location", - "status": "unsubmitted", - "rejection_reason": "", - "allow_category_change": true - } - } - } - } - }, - "headers": { - "Access-Control-Allow-Origin": { - "description": "Specify the origin(s) allowed to access the resource", - "schema": { - "type": "string" - }, - "example": "*" - }, - "Access-Control-Allow-Methods": { - "description": "Specify the HTTP methods allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "POST, OPTIONS" - }, - "Access-Control-Allow-Headers": { - "description": "Specify the headers allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "Content-Type, Authorization" - }, - "Access-Control-Allow-Credentials": { - "description": "Indicates whether the browser should include credentials", - "schema": { - "type": "boolean" - } - }, - "Access-Control-Expose-Headers": { - "description": "Headers exposed to the client", - "schema": { - "type": "string", - "example": "X-Custom-Header1, X-Custom-Header2" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "CreateApprovalCreate" - } - }, - "/v1/Content/{Sid}/ApprovalRequests": { - "servers": [ - { - "url": "https://content.twilio.com" - } - ], - "description": "An Approval Fetch resource represents the approval status of a Content resource.", - "x-twilio": { - "defaultOutputProperties": [ - "sid", - "account_sid", - "whatsapp" - ], - "parent": "/Content/{Sid}", - "mountName": "approval_fetch", - "pathType": "instance" - }, - "get": { - "description": "Fetch a Content resource's approval status by its unique Content Sid", - "tags": [ - "Contentv1ApprovalFetch" - ], - "parameters": [ - { - "name": "Sid", - "in": "path", - "description": "The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch.", - "schema": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^HX[0-9a-fA-F]{32}$" - }, - "required": true - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/content.v1.content.approval_fetch" - }, - "examples": { - "getApproval": { - "value": { - "sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "whatsapp": { - "type": "whatsapp", - "name": "tree_fiddy", - "category": "UTILITY", - "content_type": "twilio/location", - "status": "approved", - "rejection_reason": "", - "allow_category_change": true - }, - "url": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests" - } - } - } - } - }, - "headers": { - "Access-Control-Allow-Origin": { - "description": "Specify the origin(s) allowed to access the resource", - "schema": { - "type": "string" - }, - "example": "*" - }, - "Access-Control-Allow-Methods": { - "description": "Specify the HTTP methods allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "POST, OPTIONS" - }, - "Access-Control-Allow-Headers": { - "description": "Specify the headers allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "Content-Type, Authorization" - }, - "Access-Control-Allow-Credentials": { - "description": "Indicates whether the browser should include credentials", - "schema": { - "type": "boolean" - } - }, - "Access-Control-Expose-Headers": { - "description": "Headers exposed to the client", - "schema": { - "type": "string", - "example": "X-Custom-Header1, X-Custom-Header2" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "FetchApprovalFetch" - } - }, - "/v1/Content/{Sid}": { - "servers": [ - { - "url": "https://content.twilio.com" - } - ], - "description": "A Content resource represents rich messaging content.", - "x-twilio": { - "defaultOutputProperties": [ - "date_created", - "date_updated", - "sid", - "account_sid", - "friendly_name", - "language", - "variables", - "types" - ], - "dependentProperties": { - "approval_create": { - "mapping": { - "content_sid": "sid" - }, - "resource_url": "/v1/Content/{content_sid}/ApprovalRequests/whatsapp" - }, - "approval_fetch": { - "mapping": { - "content_sid": "sid" - }, - "resource_url": "/v1/Content/{content_sid}/ApprovalRequests" - } - }, - "mountName": "contents", - "pathType": "instance" - }, - "get": { - "description": "Fetch a Content resource by its unique Content Sid", - "tags": [ - "Contentv1Content" - ], - "parameters": [ - { - "name": "Sid", - "in": "path", - "description": "The Twilio-provided string that uniquely identifies the Content resource to fetch.", - "schema": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^HX[0-9a-fA-F]{32}$" - }, - "required": true - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/content.v1.content" - }, - "examples": { - "fetch": { - "value": { - "sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "friendly_name": "Some content", - "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" - } - } - } - } - } - }, - "headers": { - "Access-Control-Allow-Origin": { - "description": "Specify the origin(s) allowed to access the resource", - "schema": { - "type": "string" - }, - "example": "*" - }, - "Access-Control-Allow-Methods": { - "description": "Specify the HTTP methods allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "POST, OPTIONS" - }, - "Access-Control-Allow-Headers": { - "description": "Specify the headers allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "Content-Type, Authorization" - }, - "Access-Control-Allow-Credentials": { - "description": "Indicates whether the browser should include credentials", - "schema": { - "type": "boolean" - } - }, - "Access-Control-Expose-Headers": { - "description": "Headers exposed to the client", - "schema": { - "type": "string", - "example": "X-Custom-Header1, X-Custom-Header2" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "FetchContent" - }, - "delete": { - "description": "Deletes a Content resource", - "tags": [ - "Contentv1Content" - ], - "parameters": [ - { - "name": "Sid", - "in": "path", - "description": "The Twilio-provided string that uniquely identifies the Content resource to fetch.", - "schema": { - "type": "string", - "minLength": 34, - "maxLength": 34, - "pattern": "^HX[0-9a-fA-F]{32}$" - }, - "required": true - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "DeleteContent" - } - }, - "/v1/Content": { - "servers": [ - { - "url": "https://content.twilio.com" - } - ], - "description": "A Content resource represents rich messaging content.", - "x-twilio": { - "defaultOutputProperties": [ - "date_created", - "date_updated", - "sid", - "account_sid", - "friendly_name", - "language", - "variables", - "types" - ], - "dependentProperties": { - "approval_create": { - "mapping": { - "content_sid": "sid" - }, - "resource_url": "/v1/Content/{content_sid}/ApprovalRequests/whatsapp" - }, - "approval_fetch": { - "mapping": { - "content_sid": "sid" - }, - "resource_url": "/v1/Content/{content_sid}/ApprovalRequests" - } - }, - "mountName": "contents", - "pathType": "list" - }, - "post": { - "description": "Create a Content resource", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ContentCreateRequest" - } - } - } - }, - "tags": [ - "Contentv1Content" - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/content.v1.content" - }, - "examples": { - "create": { - "value": { - "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" - } - } - } - } - } - }, - "headers": { - "Access-Control-Allow-Origin": { - "description": "Specify the origin(s) allowed to access the resource", - "schema": { - "type": "string" - }, - "example": "*" - }, - "Access-Control-Allow-Methods": { - "description": "Specify the HTTP methods allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "POST, OPTIONS" - }, - "Access-Control-Allow-Headers": { - "description": "Specify the headers allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "Content-Type, Authorization" - }, - "Access-Control-Allow-Credentials": { - "description": "Indicates whether the browser should include credentials", - "schema": { - "type": "boolean" - } - }, - "Access-Control-Expose-Headers": { - "description": "Headers exposed to the client", - "schema": { - "type": "string", - "example": "X-Custom-Header1, X-Custom-Header2" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "CreateContent" - }, - "get": { - "description": "Retrieve a list of Contents belonging to the account used to make the request", - "tags": [ - "Contentv1Content" - ], - "parameters": [ - { - "name": "PageSize", - "in": "query", - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 1000 - } - }, - { - "name": "Page", - "in": "query", - "description": "The page index. This value is simply for client state.", - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "PageToken", - "in": "query", - "description": "The page token. This is provided by the API.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "ListContentResponse", - "properties": { - "contents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/content.v1.content" - } - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "nullable": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "nullable": true, - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - } - }, - "examples": { - "readEmpty": { - "value": { - "contents": [], - "meta": { - "page": 0, - "page_size": 10, - "first_page_url": "https://content.twilio.com/v1/Content?PageSize=10&Page=0", - "previous_page_url": null, - "url": "https://content.twilio.com/v1/Content?PageSize=10&Page=0", - "next_page_url": null, - "key": "contents" - } - } - }, - "readResults": { - "value": { - "contents": [ - { - "sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "friendly_name": "Some content", - "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" - } - }, - { - "sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "friendly_name": "Anotha content", - "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" - } - }, - { - "sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "friendly_name": "Third content", - "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" - } - } - ], - "meta": { - "page": 0, - "page_size": 20, - "first_page_url": "https://content.twilio.com/v1/Content?PageSize=20&Page=0", - "previous_page_url": null, - "url": "https://content.twilio.com/v1/Content?PageSize=20&Page=0", - "next_page_url": null, - "key": "contents" - } - } - } - } - } - }, - "headers": { - "Access-Control-Allow-Origin": { - "description": "Specify the origin(s) allowed to access the resource", - "schema": { - "type": "string" - }, - "example": "*" - }, - "Access-Control-Allow-Methods": { - "description": "Specify the HTTP methods allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "POST, OPTIONS" - }, - "Access-Control-Allow-Headers": { - "description": "Specify the headers allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "Content-Type, Authorization" - }, - "Access-Control-Allow-Credentials": { - "description": "Indicates whether the browser should include credentials", - "schema": { - "type": "boolean" - } - }, - "Access-Control-Expose-Headers": { - "description": "Headers exposed to the client", - "schema": { - "type": "string", - "example": "X-Custom-Header1, X-Custom-Header2" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "ListContent" - } - }, - "/v1/ContentAndApprovals": { - "servers": [ - { - "url": "https://content.twilio.com" - } - ], - "description": "A Content resource represents rich messaging content and its respective approval request status.", - "x-twilio": { - "defaultOutputProperties": [ - "date_created", - "date_updated", - "sid", - "account_sid", - "friendly_name", - "language", - "variables", - "types", - "approval_requests" - ], - "className": "content_and_approvals", - "pathType": "list" - }, - "get": { - "description": "Retrieve a list of Contents with approval statuses belonging to the account used to make the request", - "tags": [ - "Contentv1ContentAndApprovals" - ], - "parameters": [ - { - "name": "PageSize", - "in": "query", - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 1000 - } - }, - { - "name": "Page", - "in": "query", - "description": "The page index. This value is simply for client state.", - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "PageToken", - "in": "query", - "description": "The page token. This is provided by the API.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "ListContentAndApprovalsResponse", - "properties": { - "contents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/content.v1.content_and_approvals" - } - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "nullable": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "nullable": true, - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - } - }, - "examples": { - "readEmpty": { - "value": { - "contents": [], - "meta": { - "page": 0, - "page_size": 10, - "first_page_url": "https://content.twilio.com/v1/ContentAndApprovals?PageSize=10&Page=0", - "previous_page_url": null, - "next_page_url": null, - "url": "https://content.twilio.com/v1/ContentAndApprovals?PageSize=10&Page=0", - "key": "contents" - } - } - }, - "readResults": { - "value": { - "contents": [ - { - "date_created": "2015-07-30T19:00:00Z", - "date_updated": "2015-07-30T19:00:00Z", - "sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "friendly_name": "Some content", - "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" - } - }, - "approval_requests": { - "name": "", - "category": "", - "content_type": "", - "status": "unsubmitted", - "rejection_reason": "", - "allow_category_change": true - } - }, - { - "language": "en", - "date_updated": "2023-01-13T23:33:46Z", - "variables": { - "1": "name", - "2": "typedocument" - }, - "friendly_name": "Media Test", - "account_sid": "AC25c0d4b9093547216c460212e24e77ee", - "sid": "HX5fcd48a417c1cb59da349ad6d5da4607", - "date_created": "2023-01-13T23:33:46Z", - "types": { - "twilio/media": { - "body": "{{1}}, Congratulations {{2}}! For additional assistance, please contact us at hello@twilio.com", - "media": [ - "https://example.com/template" - ] - } - }, - "approval_requests": { - "category": "TRANSACTIONAL", - "status": "approved", - "rejection_reason": "", - "name": "Media Test", - "content_type": "twilio/media", - "allow_category_change": false - } - }, - { - "language": "en", - "date_updated": "2023-01-18T02:46:35Z", - "variables": { - "1": "name", - "2": "type_video", - "3": "small.mp4" - }, - "friendly_name": "Video Highlights", - "account_sid": "AC25c0d4b9093547216c460212e24e77ee", - "sid": "HX15c711fcc6d9ea5268d7ab77938a20ff", - "date_created": "2023-01-18T02:46:35Z", - "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}}" - ] - } - }, - "approval_requests": { - "category": "TRANSACTIONAL", - "status": "rejected", - "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)", - "name": "Video Highlights", - "content_type": "twilio/media", - "allow_category_change": true - } - } - ], - "meta": { - "page": 0, - "page_size": 20, - "first_page_url": "https://content.twilio.com/v1/ContentAndApprovals?PageSize=20&Page=0", - "url": "https://content.twilio.com/v1/ContentAndApprovals?PageSize=20&Page=0", - "previous_page_url": null, - "next_page_url": null, - "key": "contents" - } - } - } - } - } - }, - "headers": { - "Access-Control-Allow-Origin": { - "description": "Specify the origin(s) allowed to access the resource", - "schema": { - "type": "string" - }, - "example": "*" - }, - "Access-Control-Allow-Methods": { - "description": "Specify the HTTP methods allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "POST, OPTIONS" - }, - "Access-Control-Allow-Headers": { - "description": "Specify the headers allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "Content-Type, Authorization" - }, - "Access-Control-Allow-Credentials": { - "description": "Indicates whether the browser should include credentials", - "schema": { - "type": "boolean" - } - }, - "Access-Control-Expose-Headers": { - "description": "Headers exposed to the client", - "schema": { - "type": "string", - "example": "X-Custom-Header1, X-Custom-Header2" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "ListContentAndApprovals" - } - }, - "/v1/LegacyContent": { - "servers": [ - { - "url": "https://content.twilio.com" - } - ], - "description": "A Legacy Content resource represents legacy rich messaging content.", - "x-twilio": { - "defaultOutputProperties": [ - "date_created", - "date_updated", - "sid", - "account_sid", - "friendly_name", - "language", - "variables", - "types", - "legacy_template_name", - "legacy_body" - ], - "mountName": "legacy_contents", - "pathType": "list" - }, - "get": { - "description": "Retrieve a list of Legacy Contents belonging to the account used to make the request", - "tags": [ - "Contentv1LegacyContent" - ], - "parameters": [ - { - "name": "PageSize", - "in": "query", - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 1000 - } - }, - { - "name": "Page", - "in": "query", - "description": "The page index. This value is simply for client state.", - "schema": { - "type": "integer", - "minimum": 0 - } - }, - { - "name": "PageToken", - "in": "query", - "description": "The page token. This is provided by the API.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "ListLegacyContentResponse", - "properties": { - "contents": { - "type": "array", - "items": { - "$ref": "#/components/schemas/content.v1.legacy_content" - } - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "nullable": true, - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "nullable": true, - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - } - }, - "examples": { - "readEmpty": { - "value": { - "contents": [], - "meta": { - "page": 0, - "page_size": 10, - "first_page_url": "https://content.twilio.com/v1/LegacyContent?PageSize=10&Page=0", - "previous_page_url": null, - "url": "https://content.twilio.com/v1/LegacyContent?PageSize=10&Page=0", - "next_page_url": null, - "key": "contents" - } - } - }, - "readResults": { - "value": { - "contents": [ - { - "sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "friendly_name": "Some content", - "language": "en", - "variables": { - "name": "foo" - }, - "legacy_template_name": "legacy_template_1", - "legacy_body": "a body", - "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/LegacyContent", - "date_created": "2015-07-30T19:00:00Z", - "date_updated": "2015-07-30T19:00:00Z" - }, - { - "sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "friendly_name": "Anotha content", - "language": "en", - "variables": { - "name": "foo" - }, - "legacy_template_name": "legacy_template_2", - "legacy_body": "another body", - "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/LegacyContent", - "date_created": "2015-07-30T19:00:00Z", - "date_updated": "2015-07-30T19:00:00Z" - }, - { - "sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "friendly_name": "Third content", - "language": "en", - "variables": { - "name": "foo" - }, - "legacy_template_name": "legacy_template_3", - "legacy_body": "a third body", - "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/LegacyContent", - "date_created": "2015-07-30T19:00:00Z", - "date_updated": "2015-07-30T19:00:00Z" - } - ], - "meta": { - "page": 0, - "page_size": 20, - "first_page_url": "https://content.twilio.com/v1/LegacyContent?PageSize=20&Page=0", - "previous_page_url": null, - "url": "https://content.twilio.com/v1/LegacyContent?PageSize=20&Page=0", - "next_page_url": null, - "key": "contents" - } - } - } - } - } - }, - "headers": { - "Access-Control-Allow-Origin": { - "description": "Specify the origin(s) allowed to access the resource", - "schema": { - "type": "string" - }, - "example": "*" - }, - "Access-Control-Allow-Methods": { - "description": "Specify the HTTP methods allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "POST, OPTIONS" - }, - "Access-Control-Allow-Headers": { - "description": "Specify the headers allowed when accessing the resource", - "schema": { - "type": "string" - }, - "example": "Content-Type, Authorization" - }, - "Access-Control-Allow-Credentials": { - "description": "Indicates whether the browser should include credentials", - "schema": { - "type": "boolean" - } - }, - "Access-Control-Expose-Headers": { - "description": "Headers exposed to the client", - "schema": { - "type": "string", - "example": "X-Custom-Header1, X-Custom-Header2" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "operationId": "ListLegacyContent" - } - } - }, - "servers": [ - { - "url": "https://content.twilio.com" - } - ], - "tags": [ - { - "name": "Contentv1ApprovalCreate" - }, - { - "name": "Contentv1ApprovalFetch" - }, - { - "name": "Contentv1Content" - }, - { - "name": "Contentv1ContentAndApprovals" - }, - { - "name": "Contentv1LegacyContent" - } - ] -} \ No newline at end of file diff --git a/spec/yaml/twilio_content_sdk.yaml b/spec/yaml/twilio_content_sdk.yaml deleted file mode 100644 index 974401ef..00000000 --- a/spec/yaml/twilio_content_sdk.yaml +++ /dev/null @@ -1,1674 +0,0 @@ -components: - securitySchemes: - accountSid_authToken: - scheme: basic - type: http - schemas: - listItems: - type: array - items: - $ref: '#/components/schemas/listItem' - listItem: - type: object - additionalProperties: false - properties: - id: - type: string - item: - type: string - description: - type: string - required: - - id - - item - callToActionActions: - type: array - items: - $ref: '#/components/schemas/callToActionAction' - callToActionActionType: - type: string - enum: - - URL - - PHONE_NUMBER - - COPY_CODE - - VOICE_CALL - callToActionAction: - type: object - additionalProperties: false - properties: - type: - $ref: '#/components/schemas/callToActionActionType' - title: - type: string - url: - type: string - phone: - type: string - code: - type: string - required: - - type - - title - quickReplyActions: - type: array - items: - $ref: '#/components/schemas/quickReplyAction' - quickReplyActionType: - type: string - enum: - - QUICK_REPLY - quickReplyAction: - type: object - additionalProperties: false - properties: - type: - $ref: '#/components/schemas/quickReplyActionType' - title: - type: string - id: - type: string - required: - - type - - title - cardActions: - type: array - items: - $ref: '#/components/schemas/cardAction' - cardActionType: - type: string - enum: - - URL - - PHONE_NUMBER - - QUICK_REPLY - - COPY_CODE - - VOICE_CALL - cardAction: - type: object - additionalProperties: false - properties: - type: - $ref: '#/components/schemas/cardActionType' - title: - type: string - url: - type: string - phone: - type: string - id: - type: string - code: - type: string - required: - - type - - title - carouselActions: - type: array - items: - $ref: '#/components/schemas/carouselAction' - carouselActionType: - type: string - enum: - - URL - - PHONE_NUMBER - - QUICK_REPLY - carouselAction: - type: object - additionalProperties: false - properties: - type: - $ref: '#/components/schemas/carouselActionType' - title: - type: string - url: - type: string - phone: - type: string - id: - type: string - required: - - type - - title - authenticationActions: - type: array - items: - $ref: '#/components/schemas/authenticationAction' - authenticationActionType: - type: string - enum: - - COPY_CODE - authenticationAction: - type: object - additionalProperties: false - properties: - type: - $ref: '#/components/schemas/authenticationActionType' - copy_code_text: - type: string - required: - - type - - copy_code_text - catalogItems: - type: array - items: - $ref: '#/components/schemas/catalogItem' - catalogItem: - type: object - additionalProperties: false - properties: - id: - type: string - section_title: - type: string - name: - type: string - media_url: - type: string - price: - type: number - description: - type: string - carouselCards: - type: array - items: - $ref: '#/components/schemas/carouselCard' - carouselCard: - type: object - additionalProperties: false - properties: - title: - type: string - body: - type: string - media: - type: string - actions: - $ref: '#/components/schemas/carouselActions' - twilioText: - type: object - description: Type containing only plain text-based content - nullable: true - additionalProperties: false - properties: - body: - type: string - required: - - body - twilioMedia: - type: object - description: twilio/media is used to send file attachments, or to send long - text via MMS in the US and Canada. As such, the twilio/media type must contain - at least ONE of text or media content. - nullable: true - additionalProperties: false - properties: - body: - type: string - media: - type: array - items: - type: string - required: - - media - twilioLocation: - type: object - description: twilio/location type contains a location pin and an optional label, - which can be used to enhance delivery notifications or connect recipients - to physical experiences you offer. - nullable: true - additionalProperties: false - properties: - latitude: - type: number - longitude: - type: number - label: - type: string - required: - - latitude - - longitude - twilioListPicker: - type: object - description: twilio/list-picker includes a menu of up to 10 options, which offers - a simple way for users to make a selection. - nullable: true - additionalProperties: false - properties: - body: - type: string - button: - type: string - items: - $ref: '#/components/schemas/listItems' - required: - - body - - button - - items - twilioCallToAction: - type: object - description: twilio/call-to-action buttons let recipients tap to trigger actions - such as launching a website or making a phone call. - nullable: true - additionalProperties: false - properties: - body: - type: string - actions: - $ref: '#/components/schemas/callToActionActions' - twilioQuickReply: - type: object - description: twilio/quick-reply templates let recipients tap, rather than type, - to respond to the message. - nullable: true - additionalProperties: false - properties: - body: - type: string - actions: - $ref: '#/components/schemas/quickReplyActions' - required: - - body - - actions - twilioCard: - type: object - description: twilio/card is a structured template which can be used to send - a series of related information. It must include a title and at least one - additional field. - nullable: true - additionalProperties: false - properties: - title: - type: string - subtitle: - type: string - media: - type: array - items: - type: string - actions: - $ref: '#/components/schemas/cardActions' - required: - - title - whatsappCard: - type: object - description: whatsapp/card is a structured template which can be used to send - a series of related information. It must include a body and at least one additional - field. - nullable: true - additionalProperties: false - properties: - body: - type: string - footer: - type: string - media: - type: array - items: - type: string - header_text: - type: string - actions: - $ref: '#/components/schemas/cardActions' - required: - - body - whatsappAuthentication: - type: object - description: whatsApp/authentication templates let companies deliver WA approved - one-time-password button. - nullable: true - additionalProperties: false - properties: - add_security_recommendation: - type: boolean - code_expiration_minutes: - type: number - actions: - $ref: '#/components/schemas/authenticationActions' - required: - - actions - twilioCatalog: - type: object - description: twilio/catalog type lets recipients view list of catalog products, - ask questions about products, order products. - nullable: true - additionalProperties: false - properties: - title: - type: string - body: - type: string - subtitle: - type: string - id: - type: string - items: - $ref: '#/components/schemas/catalogItems' - dynamic_items: - type: string - required: - - body - twilioCarousel: - type: object - description: twilio/carousel templates allow you to send a single text message - accompanied by a set of up to 10 carousel cards in a horizontally scrollable - view - nullable: true - additionalProperties: false - properties: - body: - type: string - cards: - $ref: '#/components/schemas/carouselCards' - required: - - body - - cards - twilioFlows: - type: object - description: twilio/flows templates allow you to send multiple messages in a - set order with text or select options - nullable: true - additionalProperties: false - properties: - body: - type: string - button_text: - type: string - subtitle: - type: string - media_url: - type: string - pages: - $ref: '#/components/schemas/flowsPages' - type: - type: string - required: - - body - - button_text - - subtitle - - media_url - - pages - - type - flowsPages: - type: array - items: - $ref: '#/components/schemas/flowsPage' - flowsPage: - type: object - additionalProperties: false - properties: - id: - type: string - next_page_id: - type: string - title: - type: string - subtitle: - type: string - layout: - $ref: '#/components/schemas/flowsPageComponents' - required: - - id - - layout - flowsPageComponents: - type: array - items: - $ref: '#/components/schemas/flowsPageComponent' - flowsPageComponent: - type: object - additionalProperties: false - properties: - label: - type: string - type: - type: string - text: - type: string - options: - $ref: '#/components/schemas/flowsPageComponentSelectItems' - required: - - label - - type - flowsPageComponentSelectItems: - type: array - items: - $ref: '#/components/schemas/flowsPageComponentSelectItem' - flowsPageComponentSelectItem: - type: object - additionalProperties: false - properties: - id: - type: string - title: - type: string - required: - - id - - title - ContentApprovalRequest: - type: object - description: Content approval request body - required: - - name - - category - properties: - name: - description: Name of the template. - type: string - category: - description: A WhatsApp recognized template category. - type: string - ContentCreateRequest: - type: object - description: Content creation request body - properties: - friendly_name: - description: User defined name of the content - type: string - variables: - description: Key value pairs of variable name to value - type: object - additionalProperties: - type: string - language: - description: Language code for the content - type: string - types: - $ref: '#/components/schemas/types' - required: - - language - - types - types: - description: Content types - type: object - properties: - twilio/text: - $ref: '#/components/schemas/twilioText' - twilio/media: - $ref: '#/components/schemas/twilioMedia' - twilio/location: - $ref: '#/components/schemas/twilioLocation' - twilio/list-picker: - $ref: '#/components/schemas/twilioListPicker' - twilio/call-to-action: - $ref: '#/components/schemas/twilioCallToAction' - twilio/quick-reply: - $ref: '#/components/schemas/twilioQuickReply' - twilio/card: - $ref: '#/components/schemas/twilioCard' - twilio/catalog: - $ref: '#/components/schemas/twilioCatalog' - twilio/carousel: - $ref: '#/components/schemas/twilioCarousel' - twilio/flows: - $ref: '#/components/schemas/twilioFlows' - whatsapp/card: - $ref: '#/components/schemas/whatsappCard' - whatsapp/authentication: - $ref: '#/components/schemas/whatsappAuthentication' - content.v1.content.approval_create: - type: object - properties: - name: - type: string - nullable: true - category: - type: string - nullable: true - content_type: - type: string - nullable: true - status: - type: string - nullable: true - rejection_reason: - type: string - nullable: true - allow_category_change: - type: boolean - nullable: true - content.v1.content.approval_fetch: - type: object - properties: - sid: - type: string - minLength: 34 - maxLength: 34 - pattern: ^HX[0-9a-fA-F]{32}$ - nullable: true - description: The unique string that that we created to identify the Content - resource. - account_sid: - type: string - minLength: 34 - maxLength: 34 - pattern: ^AC[0-9a-fA-F]{32}$ - nullable: true - description: The SID of the [Account](https://www.twilio.com/docs/usage/api/account) - that created Content resource. - whatsapp: - nullable: true - description: Contains the whatsapp approval information for the Content - resource, with fields such as approval status, rejection reason, and category, - amongst others. - url: - type: string - format: uri - nullable: true - description: The URL of the resource, relative to `https://content.twilio.com`. - content.v1.content: - type: object - properties: - date_created: - type: string - format: date-time - nullable: true - description: The date and time in GMT that the resource was created specified - in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - date_updated: - type: string - format: date-time - nullable: true - description: The date and time in GMT that the resource was last updated - specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - sid: - type: string - minLength: 34 - maxLength: 34 - pattern: ^HX[0-9a-fA-F]{32}$ - nullable: true - description: The unique string that that we created to identify the Content - resource. - account_sid: - type: string - minLength: 34 - maxLength: 34 - pattern: ^AC[0-9a-fA-F]{32}$ - nullable: true - description: The SID of the [Account](https://www.twilio.com/docs/usage/api/account) - that created Content resource. - friendly_name: - type: string - nullable: true - description: A string name used to describe the Content resource. Not visible - to the end recipient. - language: - type: string - nullable: true - description: Two-letter (ISO 639-1) language code (e.g., en) identifying - the language the Content resource is in. - variables: - nullable: true - description: 'Defines the default placeholder values for variables included - in the Content resource. e.g. {"1": "Customer_Name"}.' - types: - nullable: true - description: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) - (e.g. twilio/text) for this Content resource. - url: - type: string - format: uri - nullable: true - description: The URL of the resource, relative to `https://content.twilio.com`. - links: - type: object - format: uri-map - nullable: true - description: A list of links related to the Content resource, such as approval_fetch - and approval_create - content.v1.content_and_approvals: - type: object - properties: - date_created: - type: string - format: date-time - nullable: true - description: The date and time in GMT that the resource was created specified - in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - date_updated: - type: string - format: date-time - nullable: true - description: The date and time in GMT that the resource was last updated - specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - sid: - type: string - minLength: 34 - maxLength: 34 - pattern: ^HX[0-9a-fA-F]{32}$ - nullable: true - description: The unique string that that we created to identify the Content - resource. - account_sid: - type: string - minLength: 34 - maxLength: 34 - pattern: ^AC[0-9a-fA-F]{32}$ - nullable: true - description: The SID of the [Account](https://www.twilio.com/docs/usage/api/account) - that created Content resource. - friendly_name: - type: string - nullable: true - description: A string name used to describe the Content resource. Not visible - to the end recipient. - language: - type: string - nullable: true - description: Two-letter (ISO 639-1) language code (e.g., en) identifying - the language the Content resource is in. - variables: - nullable: true - description: 'Defines the default placeholder values for variables included - in the Content resource. e.g. {"1": "Customer_Name"}.' - types: - nullable: true - description: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) - (e.g. twilio/text) for this Content resource. - approval_requests: - nullable: true - description: The submitted information and approval request status of the - Content resource. - content.v1.legacy_content: - type: object - properties: - date_created: - type: string - format: date-time - nullable: true - description: The date and time in GMT that the resource was created specified - in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - date_updated: - type: string - format: date-time - nullable: true - description: The date and time in GMT that the resource was last updated - specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. - sid: - type: string - minLength: 34 - maxLength: 34 - pattern: ^HX[0-9a-fA-F]{32}$ - nullable: true - description: The unique string that that we created to identify the Content - resource. - account_sid: - type: string - minLength: 34 - maxLength: 34 - pattern: ^AC[0-9a-fA-F]{32}$ - nullable: true - description: The SID of the [Account](https://www.twilio.com/docs/usage/api/account) - that created Content resource. - friendly_name: - type: string - nullable: true - description: A string name used to describe the Content resource. Not visible - to the end recipient. - language: - type: string - nullable: true - description: Two-letter (ISO 639-1) language code (e.g., en) identifying - the language the Content resource is in. - variables: - nullable: true - description: 'Defines the default placeholder values for variables included - in the Content resource. e.g. {"1": "Customer_Name"}.' - types: - nullable: true - description: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) - (e.g. twilio/text) for this Content resource. - legacy_template_name: - type: string - nullable: true - description: The string name of the legacy content template associated with - this Content resource, unique across all template names for its account. Only - lowercase letters, numbers and underscores are allowed - legacy_body: - type: string - nullable: true - description: The string body field of the legacy content template associated - with this Content resource - url: - type: string - format: uri - nullable: true - description: The URL of the resource, relative to `https://content.twilio.com`. -info: - title: Twilio - Content - description: This is the public Twilio REST API. - termsOfService: https://www.twilio.com/legal/tos - contact: - name: Twilio Support - url: https://support.twilio.com - email: support@twilio.com - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 1.1.0 -openapi: 3.0.1 -paths: - /v1/Content/{ContentSid}/ApprovalRequests/whatsapp: - servers: - - url: https://content.twilio.com - description: '' - x-twilio: - defaultOutputProperties: - - sid - - account_sid - - whatsapp - parent: /Content/{Sid} - mountName: approval_create - pathType: list - post: - description: '' - tags: - - Contentv1ApprovalCreate - parameters: - - name: ContentSid - in: path - description: '' - schema: - type: string - minLength: 34 - maxLength: 34 - pattern: ^HX[0-9a-fA-F]{32}$ - required: true - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ContentApprovalRequest' - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/content.v1.content.approval_create' - examples: - createApproval: - value: - name: tree_fiddy - category: UTILITY - content_type: twilio/location - status: unsubmitted - rejection_reason: '' - allow_category_change: true - headers: - Access-Control-Allow-Origin: - description: Specify the origin(s) allowed to access the resource - schema: - type: string - example: '*' - Access-Control-Allow-Methods: - description: Specify the HTTP methods allowed when accessing the resource - schema: - type: string - example: POST, OPTIONS - Access-Control-Allow-Headers: - description: Specify the headers allowed when accessing the resource - schema: - type: string - example: Content-Type, Authorization - Access-Control-Allow-Credentials: - description: Indicates whether the browser should include credentials - schema: - type: boolean - Access-Control-Expose-Headers: - description: Headers exposed to the client - schema: - type: string - example: X-Custom-Header1, X-Custom-Header2 - description: Created - security: - - accountSid_authToken: [] - operationId: CreateApprovalCreate - /v1/Content/{Sid}/ApprovalRequests: - servers: - - url: https://content.twilio.com - description: An Approval Fetch resource represents the approval status of a Content - resource. - x-twilio: - defaultOutputProperties: - - sid - - account_sid - - whatsapp - parent: /Content/{Sid} - mountName: approval_fetch - pathType: instance - get: - description: Fetch a Content resource's approval status by its unique Content - Sid - tags: - - Contentv1ApprovalFetch - parameters: - - name: Sid - in: path - description: The Twilio-provided string that uniquely identifies the Content - resource whose approval information to fetch. - schema: - type: string - minLength: 34 - maxLength: 34 - pattern: ^HX[0-9a-fA-F]{32}$ - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/content.v1.content.approval_fetch' - examples: - getApproval: - value: - sid: HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - whatsapp: - type: whatsapp - name: tree_fiddy - category: UTILITY - content_type: twilio/location - status: approved - rejection_reason: '' - allow_category_change: true - url: https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests - headers: - Access-Control-Allow-Origin: - description: Specify the origin(s) allowed to access the resource - schema: - type: string - example: '*' - Access-Control-Allow-Methods: - description: Specify the HTTP methods allowed when accessing the resource - schema: - type: string - example: POST, OPTIONS - Access-Control-Allow-Headers: - description: Specify the headers allowed when accessing the resource - schema: - type: string - example: Content-Type, Authorization - Access-Control-Allow-Credentials: - description: Indicates whether the browser should include credentials - schema: - type: boolean - Access-Control-Expose-Headers: - description: Headers exposed to the client - schema: - type: string - example: X-Custom-Header1, X-Custom-Header2 - description: OK - security: - - accountSid_authToken: [] - operationId: FetchApprovalFetch - /v1/Content/{Sid}: - servers: - - url: https://content.twilio.com - description: A Content resource represents rich messaging content. - x-twilio: - defaultOutputProperties: - - date_created - - date_updated - - sid - - account_sid - - friendly_name - - language - - variables - - types - dependentProperties: - approval_create: - mapping: - content_sid: sid - resource_url: /v1/Content/{content_sid}/ApprovalRequests/whatsapp - approval_fetch: - mapping: - content_sid: sid - resource_url: /v1/Content/{content_sid}/ApprovalRequests - mountName: contents - pathType: instance - get: - description: Fetch a Content resource by its unique Content Sid - tags: - - Contentv1Content - parameters: - - name: Sid - in: path - description: The Twilio-provided string that uniquely identifies the Content - resource to fetch. - schema: - type: string - minLength: 34 - maxLength: 34 - pattern: ^HX[0-9a-fA-F]{32}$ - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/content.v1.content' - examples: - fetch: - value: - sid: HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - friendly_name: Some content - 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 - headers: - Access-Control-Allow-Origin: - description: Specify the origin(s) allowed to access the resource - schema: - type: string - example: '*' - Access-Control-Allow-Methods: - description: Specify the HTTP methods allowed when accessing the resource - schema: - type: string - example: POST, OPTIONS - Access-Control-Allow-Headers: - description: Specify the headers allowed when accessing the resource - schema: - type: string - example: Content-Type, Authorization - Access-Control-Allow-Credentials: - description: Indicates whether the browser should include credentials - schema: - type: boolean - Access-Control-Expose-Headers: - description: Headers exposed to the client - schema: - type: string - example: X-Custom-Header1, X-Custom-Header2 - description: OK - security: - - accountSid_authToken: [] - operationId: FetchContent - delete: - description: Deletes a Content resource - tags: - - Contentv1Content - parameters: - - name: Sid - in: path - description: The Twilio-provided string that uniquely identifies the Content - resource to fetch. - schema: - type: string - minLength: 34 - maxLength: 34 - pattern: ^HX[0-9a-fA-F]{32}$ - required: true - responses: - '204': - description: The resource was deleted successfully. - security: - - accountSid_authToken: [] - operationId: DeleteContent - /v1/Content: - servers: - - url: https://content.twilio.com - description: A Content resource represents rich messaging content. - x-twilio: - defaultOutputProperties: - - date_created - - date_updated - - sid - - account_sid - - friendly_name - - language - - variables - - types - dependentProperties: - approval_create: - mapping: - content_sid: sid - resource_url: /v1/Content/{content_sid}/ApprovalRequests/whatsapp - approval_fetch: - mapping: - content_sid: sid - resource_url: /v1/Content/{content_sid}/ApprovalRequests - mountName: contents - pathType: list - post: - description: Create a Content resource - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ContentCreateRequest' - tags: - - Contentv1Content - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/content.v1.content' - examples: - create: - value: - 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 - headers: - Access-Control-Allow-Origin: - description: Specify the origin(s) allowed to access the resource - schema: - type: string - example: '*' - Access-Control-Allow-Methods: - description: Specify the HTTP methods allowed when accessing the resource - schema: - type: string - example: POST, OPTIONS - Access-Control-Allow-Headers: - description: Specify the headers allowed when accessing the resource - schema: - type: string - example: Content-Type, Authorization - Access-Control-Allow-Credentials: - description: Indicates whether the browser should include credentials - schema: - type: boolean - Access-Control-Expose-Headers: - description: Headers exposed to the client - schema: - type: string - example: X-Custom-Header1, X-Custom-Header2 - description: Created - security: - - accountSid_authToken: [] - operationId: CreateContent - get: - description: Retrieve a list of Contents belonging to the account used to make - the request - tags: - - Contentv1Content - parameters: - - name: PageSize - in: query - description: How many resources to return in each list page. The default is - 50, and the maximum is 1000. - schema: - type: integer - minimum: 1 - maximum: 1000 - - name: Page - in: query - description: The page index. This value is simply for client state. - schema: - type: integer - minimum: 0 - - name: PageToken - in: query - description: The page token. This is provided by the API. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - title: ListContentResponse - properties: - contents: - type: array - items: - $ref: '#/components/schemas/content.v1.content' - meta: - properties: - first_page_url: - format: uri - type: string - key: - type: string - next_page_url: - format: uri - nullable: true - type: string - page: - type: integer - page_size: - type: integer - previous_page_url: - format: uri - nullable: true - type: string - url: - format: uri - type: string - type: object - examples: - readEmpty: - value: - contents: [] - meta: - page: 0 - page_size: 10 - first_page_url: https://content.twilio.com/v1/Content?PageSize=10&Page=0 - previous_page_url: null - url: https://content.twilio.com/v1/Content?PageSize=10&Page=0 - next_page_url: null - key: contents - readResults: - value: - contents: - - sid: HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - friendly_name: Some content - 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 - - sid: HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - friendly_name: Anotha content - 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 - - sid: HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - friendly_name: Third content - 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 - meta: - page: 0 - page_size: 20 - first_page_url: https://content.twilio.com/v1/Content?PageSize=20&Page=0 - previous_page_url: null - url: https://content.twilio.com/v1/Content?PageSize=20&Page=0 - next_page_url: null - key: contents - headers: - Access-Control-Allow-Origin: - description: Specify the origin(s) allowed to access the resource - schema: - type: string - example: '*' - Access-Control-Allow-Methods: - description: Specify the HTTP methods allowed when accessing the resource - schema: - type: string - example: POST, OPTIONS - Access-Control-Allow-Headers: - description: Specify the headers allowed when accessing the resource - schema: - type: string - example: Content-Type, Authorization - Access-Control-Allow-Credentials: - description: Indicates whether the browser should include credentials - schema: - type: boolean - Access-Control-Expose-Headers: - description: Headers exposed to the client - schema: - type: string - example: X-Custom-Header1, X-Custom-Header2 - description: OK - security: - - accountSid_authToken: [] - operationId: ListContent - /v1/ContentAndApprovals: - servers: - - url: https://content.twilio.com - description: A Content resource represents rich messaging content and its respective - approval request status. - x-twilio: - defaultOutputProperties: - - date_created - - date_updated - - sid - - account_sid - - friendly_name - - language - - variables - - types - - approval_requests - className: content_and_approvals - pathType: list - get: - description: Retrieve a list of Contents with approval statuses belonging to - the account used to make the request - tags: - - Contentv1ContentAndApprovals - parameters: - - name: PageSize - in: query - description: How many resources to return in each list page. The default is - 50, and the maximum is 1000. - schema: - type: integer - minimum: 1 - maximum: 1000 - - name: Page - in: query - description: The page index. This value is simply for client state. - schema: - type: integer - minimum: 0 - - name: PageToken - in: query - description: The page token. This is provided by the API. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - title: ListContentAndApprovalsResponse - properties: - contents: - type: array - items: - $ref: '#/components/schemas/content.v1.content_and_approvals' - meta: - properties: - first_page_url: - format: uri - type: string - key: - type: string - next_page_url: - format: uri - nullable: true - type: string - page: - type: integer - page_size: - type: integer - previous_page_url: - format: uri - nullable: true - type: string - url: - format: uri - type: string - type: object - examples: - readEmpty: - value: - contents: [] - meta: - page: 0 - page_size: 10 - first_page_url: https://content.twilio.com/v1/ContentAndApprovals?PageSize=10&Page=0 - previous_page_url: null - next_page_url: null - url: https://content.twilio.com/v1/ContentAndApprovals?PageSize=10&Page=0 - key: contents - readResults: - value: - contents: - - date_created: '2015-07-30T19:00:00Z' - date_updated: '2015-07-30T19:00:00Z' - sid: HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - friendly_name: Some content - 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 - approval_requests: - name: '' - category: '' - content_type: '' - status: unsubmitted - rejection_reason: '' - allow_category_change: true - - language: en - date_updated: '2023-01-13T23:33:46Z' - variables: - '1': name - '2': typedocument - friendly_name: Media Test - account_sid: AC25c0d4b9093547216c460212e24e77ee - sid: HX5fcd48a417c1cb59da349ad6d5da4607 - date_created: '2023-01-13T23:33:46Z' - types: - twilio/media: - body: '{{1}}, Congratulations {{2}}! For additional assistance, - please contact us at hello@twilio.com' - media: - - https://example.com/template - approval_requests: - category: TRANSACTIONAL - status: approved - rejection_reason: '' - name: Media Test - content_type: twilio/media - allow_category_change: false - - language: en - date_updated: '2023-01-18T02:46:35Z' - variables: - '1': name - '2': type_video - '3': small.mp4 - friendly_name: Video Highlights - account_sid: AC25c0d4b9093547216c460212e24e77ee - sid: HX15c711fcc6d9ea5268d7ab77938a20ff - date_created: '2023-01-18T02:46:35Z' - 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}} - approval_requests: - category: TRANSACTIONAL - status: rejected - 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)' - name: Video Highlights - content_type: twilio/media - allow_category_change: true - meta: - page: 0 - page_size: 20 - first_page_url: https://content.twilio.com/v1/ContentAndApprovals?PageSize=20&Page=0 - url: https://content.twilio.com/v1/ContentAndApprovals?PageSize=20&Page=0 - previous_page_url: null - next_page_url: null - key: contents - headers: - Access-Control-Allow-Origin: - description: Specify the origin(s) allowed to access the resource - schema: - type: string - example: '*' - Access-Control-Allow-Methods: - description: Specify the HTTP methods allowed when accessing the resource - schema: - type: string - example: POST, OPTIONS - Access-Control-Allow-Headers: - description: Specify the headers allowed when accessing the resource - schema: - type: string - example: Content-Type, Authorization - Access-Control-Allow-Credentials: - description: Indicates whether the browser should include credentials - schema: - type: boolean - Access-Control-Expose-Headers: - description: Headers exposed to the client - schema: - type: string - example: X-Custom-Header1, X-Custom-Header2 - description: OK - security: - - accountSid_authToken: [] - operationId: ListContentAndApprovals - /v1/LegacyContent: - servers: - - url: https://content.twilio.com - description: A Legacy Content resource represents legacy rich messaging content. - x-twilio: - defaultOutputProperties: - - date_created - - date_updated - - sid - - account_sid - - friendly_name - - language - - variables - - types - - legacy_template_name - - legacy_body - mountName: legacy_contents - pathType: list - get: - description: Retrieve a list of Legacy Contents belonging to the account used - to make the request - tags: - - Contentv1LegacyContent - parameters: - - name: PageSize - in: query - description: How many resources to return in each list page. The default is - 50, and the maximum is 1000. - schema: - type: integer - minimum: 1 - maximum: 1000 - - name: Page - in: query - description: The page index. This value is simply for client state. - schema: - type: integer - minimum: 0 - - name: PageToken - in: query - description: The page token. This is provided by the API. - schema: - type: string - responses: - '200': - content: - application/json: - schema: - type: object - title: ListLegacyContentResponse - properties: - contents: - type: array - items: - $ref: '#/components/schemas/content.v1.legacy_content' - meta: - properties: - first_page_url: - format: uri - type: string - key: - type: string - next_page_url: - format: uri - nullable: true - type: string - page: - type: integer - page_size: - type: integer - previous_page_url: - format: uri - nullable: true - type: string - url: - format: uri - type: string - type: object - examples: - readEmpty: - value: - contents: [] - meta: - page: 0 - page_size: 10 - first_page_url: https://content.twilio.com/v1/LegacyContent?PageSize=10&Page=0 - previous_page_url: null - url: https://content.twilio.com/v1/LegacyContent?PageSize=10&Page=0 - next_page_url: null - key: contents - readResults: - value: - contents: - - sid: HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - friendly_name: Some content - language: en - variables: - name: foo - legacy_template_name: legacy_template_1 - legacy_body: a body - 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/LegacyContent - date_created: '2015-07-30T19:00:00Z' - date_updated: '2015-07-30T19:00:00Z' - - sid: HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - friendly_name: Anotha content - language: en - variables: - name: foo - legacy_template_name: legacy_template_2 - legacy_body: another body - 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/LegacyContent - date_created: '2015-07-30T19:00:00Z' - date_updated: '2015-07-30T19:00:00Z' - - sid: HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - account_sid: ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - friendly_name: Third content - language: en - variables: - name: foo - legacy_template_name: legacy_template_3 - legacy_body: a third body - 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/LegacyContent - date_created: '2015-07-30T19:00:00Z' - date_updated: '2015-07-30T19:00:00Z' - meta: - page: 0 - page_size: 20 - first_page_url: https://content.twilio.com/v1/LegacyContent?PageSize=20&Page=0 - previous_page_url: null - url: https://content.twilio.com/v1/LegacyContent?PageSize=20&Page=0 - next_page_url: null - key: contents - headers: - Access-Control-Allow-Origin: - description: Specify the origin(s) allowed to access the resource - schema: - type: string - example: '*' - Access-Control-Allow-Methods: - description: Specify the HTTP methods allowed when accessing the resource - schema: - type: string - example: POST, OPTIONS - Access-Control-Allow-Headers: - description: Specify the headers allowed when accessing the resource - schema: - type: string - example: Content-Type, Authorization - Access-Control-Allow-Credentials: - description: Indicates whether the browser should include credentials - schema: - type: boolean - Access-Control-Expose-Headers: - description: Headers exposed to the client - schema: - type: string - example: X-Custom-Header1, X-Custom-Header2 - description: OK - security: - - accountSid_authToken: [] - operationId: ListLegacyContent -servers: -- url: https://content.twilio.com -tags: -- name: Contentv1ApprovalCreate -- name: Contentv1ApprovalFetch -- name: Contentv1Content -- name: Contentv1ContentAndApprovals -- name: Contentv1LegacyContent