From 4a8ee370d2e82ddebb780506ad3097e491afdb08 Mon Sep 17 00:00:00 2001 From: Shwetha Radhakrishna Date: Tue, 1 Dec 2020 13:52:36 -0700 Subject: [PATCH] feat: splitting openAPI specs by version (#104) * Splitting API specs by version * Adding comments * Deleting preview.jsons * Updated with right version of api-definitions * Added test for mergeDomains func * Adding back preview.json * Added test for preview Co-authored-by: shwetharadhakrishna --- src/services/twilio-api/api-browser.js | 23 +- ..._accounts.json => twilio_accounts_v1.json} | 0 ...{twilio_api.json => twilio_api_v2010.json} | 0 ...utopilot.json => twilio_autopilot_v1.json} | 0 ...xports.json => twilio_bulkexports_v1.json} | 0 src/services/twilio-api/twilio_chat_v1.json | 3875 +++++++++++++++ .../{twilio_chat.json => twilio_chat_v2.json} | 4275 +---------------- ...ions.json => twilio_conversations_v1.json} | 0 ...ilio_events.json => twilio_events_v1.json} | 0 .../{twilio_fax.json => twilio_fax_v1.json} | 0 .../{twilio_flex.json => twilio_flex_v1.json} | 0 ..._insights.json => twilio_insights_v1.json} | 0 ...tudio.json => twilio_ip_messaging_v1.json} | 3322 +++++++------ ...aging.json => twilio_ip_messaging_v2.json} | 4275 +---------------- ...io_lookups.json => twilio_lookups_v1.json} | 0 ...essaging.json => twilio_messaging_v1.json} | 0 ...io_monitor.json => twilio_monitor_v1.json} | 0 ...ilio_notify.json => twilio_notify_v1.json} | 0 ...io_numbers.json => twilio_numbers_v2.json} | 0 ...io_pricing.json => twilio_pricing_v1.json} | 341 -- .../twilio-api/twilio_pricing_v2.json | 377 ++ ...twilio_proxy.json => twilio_proxy_v1.json} | 0 ...verless.json => twilio_serverless_v1.json} | 0 src/services/twilio-api/twilio_studio_v1.json | 1880 ++++++++ src/services/twilio-api/twilio_studio_v2.json | 1681 +++++++ ..._supersim.json => twilio_supersim_v1.json} | 0 .../{twilio_sync.json => twilio_sync_v1.json} | 0 ...krouter.json => twilio_taskrouter_v1.json} | 0 ..._trunking.json => twilio_trunking_v1.json} | 0 ...ilio_verify.json => twilio_verify_v2.json} | 0 ...twilio_video.json => twilio_video_v1.json} | 0 ...twilio_voice.json => twilio_voice_v1.json} | 0 ..._wireless.json => twilio_wireless_v1.json} | 0 test/services/twilio-api/api-browser.test.js | 21 + 34 files changed, 10126 insertions(+), 9944 deletions(-) rename src/services/twilio-api/{twilio_accounts.json => twilio_accounts_v1.json} (100%) rename src/services/twilio-api/{twilio_api.json => twilio_api_v2010.json} (100%) rename src/services/twilio-api/{twilio_autopilot.json => twilio_autopilot_v1.json} (100%) rename src/services/twilio-api/{twilio_bulkexports.json => twilio_bulkexports_v1.json} (100%) create mode 100644 src/services/twilio-api/twilio_chat_v1.json rename src/services/twilio-api/{twilio_chat.json => twilio_chat_v2.json} (57%) rename src/services/twilio-api/{twilio_conversations.json => twilio_conversations_v1.json} (100%) rename src/services/twilio-api/{twilio_events.json => twilio_events_v1.json} (100%) rename src/services/twilio-api/{twilio_fax.json => twilio_fax_v1.json} (100%) rename src/services/twilio-api/{twilio_flex.json => twilio_flex_v1.json} (100%) rename src/services/twilio-api/{twilio_insights.json => twilio_insights_v1.json} (100%) rename src/services/twilio-api/{twilio_studio.json => twilio_ip_messaging_v1.json} (59%) rename src/services/twilio-api/{twilio_ip_messaging.json => twilio_ip_messaging_v2.json} (56%) rename src/services/twilio-api/{twilio_lookups.json => twilio_lookups_v1.json} (100%) rename src/services/twilio-api/{twilio_messaging.json => twilio_messaging_v1.json} (100%) rename src/services/twilio-api/{twilio_monitor.json => twilio_monitor_v1.json} (100%) rename src/services/twilio-api/{twilio_notify.json => twilio_notify_v1.json} (100%) rename src/services/twilio-api/{twilio_numbers.json => twilio_numbers_v2.json} (100%) rename src/services/twilio-api/{twilio_pricing.json => twilio_pricing_v1.json} (68%) create mode 100644 src/services/twilio-api/twilio_pricing_v2.json rename src/services/twilio-api/{twilio_proxy.json => twilio_proxy_v1.json} (100%) rename src/services/twilio-api/{twilio_serverless.json => twilio_serverless_v1.json} (100%) create mode 100644 src/services/twilio-api/twilio_studio_v1.json create mode 100644 src/services/twilio-api/twilio_studio_v2.json rename src/services/twilio-api/{twilio_supersim.json => twilio_supersim_v1.json} (100%) rename src/services/twilio-api/{twilio_sync.json => twilio_sync_v1.json} (100%) rename src/services/twilio-api/{twilio_taskrouter.json => twilio_taskrouter_v1.json} (100%) rename src/services/twilio-api/{twilio_trunking.json => twilio_trunking_v1.json} (100%) rename src/services/twilio-api/{twilio_verify.json => twilio_verify_v2.json} (100%) rename src/services/twilio-api/{twilio_video.json => twilio_video_v1.json} (100%) rename src/services/twilio-api/{twilio_voice.json => twilio_voice_v1.json} (100%) rename src/services/twilio-api/{twilio_wireless.json => twilio_wireless_v1.json} (100%) diff --git a/src/services/twilio-api/api-browser.js b/src/services/twilio-api/api-browser.js index e1142bcd..390300c8 100644 --- a/src/services/twilio-api/api-browser.js +++ b/src/services/twilio-api/api-browser.js @@ -9,10 +9,31 @@ const OPERATIONS = ['post', 'get', 'delete']; class TwilioApiBrowser { constructor(spec) { spec = spec || this.loadApiSpecFromDisk(); - + spec = this.mergeVersions(spec); this.domains = this.loadDomains(spec); } + mergeVersions(spec) { + // merge the domain_versions into a single domain + const mergedSpec = {}; + for (const domainNameWithVersion in spec) { + if (spec.hasOwnProperty(domainNameWithVersion)) { + const domainName = domainNameWithVersion.split('_')[0]; + if (domainName in mergedSpec) { + const existing = mergedSpec[domainName]; + const current = spec[domainNameWithVersion]; + Object.assign(existing.components.schemas, current.components.schemas); + Object.assign(existing.paths, current.paths); + mergedSpec[domainName] = existing; + } else { + mergedSpec[domainName] = spec[domainNameWithVersion]; + } + } + } + + return mergedSpec; + } + loadApiSpecFromDisk() { if (!apiSpec) { const specPattern = /twilio_(.+)\.json/; diff --git a/src/services/twilio-api/twilio_accounts.json b/src/services/twilio-api/twilio_accounts_v1.json similarity index 100% rename from src/services/twilio-api/twilio_accounts.json rename to src/services/twilio-api/twilio_accounts_v1.json diff --git a/src/services/twilio-api/twilio_api.json b/src/services/twilio-api/twilio_api_v2010.json similarity index 100% rename from src/services/twilio-api/twilio_api.json rename to src/services/twilio-api/twilio_api_v2010.json diff --git a/src/services/twilio-api/twilio_autopilot.json b/src/services/twilio-api/twilio_autopilot_v1.json similarity index 100% rename from src/services/twilio-api/twilio_autopilot.json rename to src/services/twilio-api/twilio_autopilot_v1.json diff --git a/src/services/twilio-api/twilio_bulkexports.json b/src/services/twilio-api/twilio_bulkexports_v1.json similarity index 100% rename from src/services/twilio-api/twilio_bulkexports.json rename to src/services/twilio-api/twilio_bulkexports_v1.json diff --git a/src/services/twilio-api/twilio_chat_v1.json b/src/services/twilio-api/twilio_chat_v1.json new file mode 100644 index 00000000..09bd3f7c --- /dev/null +++ b/src/services/twilio-api/twilio_chat_v1.json @@ -0,0 +1,3875 @@ +{ + "components": { + "schemas": { + "chat.v1.credential": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "friendly_name": { + "type": "string" + }, + "sandbox": { + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CR[0-9a-fA-F]{32}$", + "type": "string" + }, + "type": { + "enum": [ + "gcm", + "apn", + "fcm" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "chat.v1.service": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "consumption_report_interval": { + "type": "integer" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "default_channel_creator_role_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "default_channel_role_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "default_service_role_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "friendly_name": { + "type": "string" + }, + "limits": { + "type": "object" + }, + "links": { + "type": "object" + }, + "notifications": { + "type": "object" + }, + "post_webhook_url": { + "type": "string" + }, + "pre_webhook_url": { + "type": "string" + }, + "reachability_enabled": { + "type": "boolean" + }, + "read_status_enabled": { + "type": "boolean" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "typing_indicator_timeout": { + "type": "integer" + }, + "url": { + "format": "uri", + "type": "string" + }, + "webhook_filters": { + "items": { + "type": "string" + }, + "type": "array" + }, + "webhook_method": { + "type": "string" + }, + "webhooks": { + "type": "object" + } + }, + "type": "object" + }, + "chat.v1.service.channel": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "attributes": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "friendly_name": { + "type": "string" + }, + "links": { + "type": "object" + }, + "members_count": { + "type": "integer" + }, + "messages_count": { + "type": "integer" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "type": { + "enum": [ + "public", + "private" + ], + "type": "string" + }, + "unique_name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "chat.v1.service.channel.invite": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "channel_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "created_by": { + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "identity": { + "type": "string" + }, + "role_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IN[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "chat.v1.service.channel.member": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "channel_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "identity": { + "type": "string" + }, + "last_consumed_message_index": { + "nullable": true, + "type": "integer" + }, + "last_consumption_timestamp": { + "format": "date-time", + "type": "string" + }, + "role_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^MB[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "chat.v1.service.channel.message": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "attributes": { + "type": "string" + }, + "body": { + "type": "string" + }, + "channel_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "from": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + }, + "to": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "was_edited": { + "type": "boolean" + } + }, + "type": "object" + }, + "chat.v1.service.role": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "friendly_name": { + "type": "string" + }, + "permissions": { + "items": { + "type": "string" + }, + "type": "array" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "type": { + "enum": [ + "channel", + "deployment" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "chat.v1.service.user": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "attributes": { + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "friendly_name": { + "type": "string" + }, + "identity": { + "type": "string" + }, + "is_notifiable": { + "type": "boolean" + }, + "is_online": { + "type": "boolean" + }, + "joined_channels_count": { + "type": "integer" + }, + "links": { + "type": "object" + }, + "role_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^US[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "chat.v1.service.user.user_channel": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "channel_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "last_consumed_message_index": { + "nullable": true, + "type": "integer" + }, + "links": { + "type": "object" + }, + "member_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^MB[0-9a-fA-F]{32}$", + "type": "string" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "status": { + "enum": [ + "joined", + "invited", + "not_participating" + ], + "type": "string" + }, + "unread_messages_count": { + "nullable": true, + "type": "integer" + } + }, + "type": "object" + } + }, + "securitySchemes": { + "accountSid_authToken": { + "scheme": "basic", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "support@twilio.com", + "name": "Twilio Support", + "url": "https://support.twilio.com" + }, + "description": "This is the public Twilio REST API.", + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "https://www.twilio.com/legal/tos", + "title": "Twilio - Chat", + "version": "5.12.0" + }, + "openapi": "3.0.1", + "paths": { + "/v1/Credentials": { + "description": "Credentials for push notifications channels", + "get": { + "description": "", + "parameters": [ + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "credentials": { + "items": { + "$ref": "#/components/schemas/chat.v1.credential" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "ApiKey": { + "description": "[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.", + "type": "string" + }, + "Certificate": { + "description": "[APN only] The URL encoded representation of the certificate. For example, \n`-----BEGIN CERTIFICATE-----\nMIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==\n-----END CERTIFICATE-----`", + "type": "string" + }, + "FriendlyName": { + "description": "A descriptive string that you create to describe the new resource. It can be up to 64 characters long.", + "type": "string" + }, + "PrivateKey": { + "description": "[APN only] The URL encoded representation of the private key. For example,\n`-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.\n-----END RSA PRIVATE KEY-----`", + "type": "string" + }, + "Sandbox": { + "description": "[APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.", + "type": "boolean" + }, + "Secret": { + "description": "[FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.", + "type": "string" + }, + "Type": { + "description": "The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`.", + "enum": [ + "gcm", + "apn", + "fcm" + ], + "type": "string" + } + }, + "required": [ + "Type" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.credential" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "type" + ], + "x-path-type": "list" + }, + "/v1/Credentials/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The Twilio-provided string that uniquely identifies the Credential resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CR[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "Credentials for push notifications channels", + "get": { + "description": "", + "parameters": [ + { + "description": "The Twilio-provided string that uniquely identifies the Credential resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CR[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.credential" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The Twilio-provided string that uniquely identifies the Credential resource to update.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CR[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "ApiKey": { + "description": "[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.", + "type": "string" + }, + "Certificate": { + "description": "[APN only] The URL encoded representation of the certificate. For example, \n`-----BEGIN CERTIFICATE-----\nMIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==\n-----END CERTIFICATE-----`", + "type": "string" + }, + "FriendlyName": { + "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.", + "type": "string" + }, + "PrivateKey": { + "description": "[APN only] The URL encoded representation of the private key. For example,\n`-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.\n-----END RSA PRIVATE KEY-----`", + "type": "string" + }, + "Sandbox": { + "description": "[APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.", + "type": "boolean" + }, + "Secret": { + "description": "[FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.credential" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "type" + ], + "x-path-type": "instance" + }, + "/v1/Services": { + "description": "Top level scope for all chat resources", + "get": { + "description": "", + "parameters": [ + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "services": { + "items": { + "$ref": "#/components/schemas/chat.v1.service" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "FriendlyName": { + "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.", + "type": "string" + } + }, + "required": [ + "FriendlyName" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Services/{ServiceSid}/Channels": { + "description": "Channels represent chat rooms", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.", + "in": "query", + "name": "Type", + "schema": { + "items": { + "enum": [ + "public", + "private" + ], + "type": "string" + }, + "type": "array" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "channels": { + "items": { + "$ref": "#/components/schemas/chat.v1.service.channel" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Attributes": { + "description": "A valid JSON string that contains application-specific data.", + "type": "string" + }, + "FriendlyName": { + "description": "A descriptive string that you create to describe the new resource. It can be up to 64 characters long.", + "type": "string" + }, + "Type": { + "description": "The visibility of the channel. Can be: `public` or `private` and defaults to `public`.", + "enum": [ + "public", + "private" + ], + "type": "string" + }, + "UniqueName": { + "description": "An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "unique_name", + "friendly_name" + ], + "x-path-type": "list" + }, + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites": { + "description": "Pending invitations to users to become channel members", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resources to read belong to.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.", + "in": "query", + "name": "Identity", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "invites": { + "items": { + "$ref": "#/components/schemas/chat.v1.service.channel.invite" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Identity": { + "description": "The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more info.", + "type": "string" + }, + "RoleSid": { + "description": "The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member.", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + } + }, + "required": [ + "Identity" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel.invite" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "identity", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to delete belongs to.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Invite resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "Pending invitations to users to become channel members", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to fetch belongs to.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Invite resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel.invite" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "identity", + "date_created" + ], + "x-path-type": "instance" + }, + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members": { + "description": "Users joined to specific channels", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the members to read belong to. Can be the Channel resource's `sid` or `unique_name` value.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.", + "in": "query", + "name": "Identity", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "members": { + "items": { + "$ref": "#/components/schemas/chat.v1.service.channel.member" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new member belongs to. Can be the Channel resource's `sid` or `unique_name`.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Identity": { + "description": "The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/services). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.", + "type": "string" + }, + "RoleSid": { + "description": "The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + } + }, + "required": [ + "Identity" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel.member" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "identity", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Member resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^MB[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "Users joined to specific channels", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to fetch belongs to. Can be the Channel resource's `sid` or `unique_name` value.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Member resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^MB[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel.member" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to update belongs to. Can be the Channel resource's `sid` or `unique_name`.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Member resource to update.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^MB[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "LastConsumedMessageIndex": { + "description": "The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels).", + "nullable": true, + "type": "integer" + }, + "RoleSid": { + "description": "The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel.member" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "identity", + "date_created" + ], + "x-path-type": "instance" + }, + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages": { + "description": "Individual chat messages", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to read belongs to. Can be the Channel's `sid` or `unique_name`.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.", + "in": "query", + "name": "Order", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "messages": { + "items": { + "$ref": "#/components/schemas/chat.v1.service.channel.message" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to. Can be the Channel resource's `sid` or `unique_name`.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Attributes": { + "description": "A valid JSON string that contains application-specific data.", + "type": "string" + }, + "Body": { + "description": "The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.", + "type": "string" + }, + "From": { + "description": "The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`.", + "type": "string" + } + }, + "required": [ + "Body" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel.message" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "from", + "to", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to delete belongs to. Can be the Channel resource's `sid` or `unique_name`.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Message resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "Individual chat messages", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to fetch belongs to. Can be the Channel's `sid` or `unique_name`.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Message resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel.message" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`.", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Message resource to update.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Attributes": { + "description": "A valid JSON string that contains application-specific data.", + "type": "string" + }, + "Body": { + "description": "The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel.message" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "from", + "to", + "date_created" + ], + "x-path-type": "instance" + }, + "/v1/Services/{ServiceSid}/Channels/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Channel resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "Channels represent chat rooms", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Channel resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Channel resource to update.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Attributes": { + "description": "A valid JSON string that contains application-specific data.", + "type": "string" + }, + "FriendlyName": { + "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.", + "type": "string" + }, + "UniqueName": { + "description": "An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.channel" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "unique_name", + "friendly_name" + ], + "x-path-type": "instance" + }, + "/v1/Services/{ServiceSid}/Roles": { + "description": "Roles determining user or member permissions", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "roles": { + "items": { + "$ref": "#/components/schemas/chat.v1.service.role" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "FriendlyName": { + "description": "A descriptive string that you create to describe the new resource. It can be up to 64 characters long.", + "type": "string" + }, + "Permission": { + "description": "A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation.", + "items": { + "type": "string" + }, + "type": "array" + }, + "Type": { + "description": "The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/api/services) roles.", + "enum": [ + "channel", + "deployment" + ], + "type": "string" + } + }, + "required": [ + "FriendlyName", + "Type", + "Permission" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.role" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "type" + ], + "x-path-type": "list" + }, + "/v1/Services/{ServiceSid}/Roles/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Role resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "Roles determining user or member permissions", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Role resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.role" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the Role resource to update.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Permission": { + "description": "A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "Permission" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.role" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "type" + ], + "x-path-type": "instance" + }, + "/v1/Services/{ServiceSid}/Users": { + "description": "Unique chat users within a chat service", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "users": { + "items": { + "$ref": "#/components/schemas/chat.v1.service.user" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Attributes": { + "description": "A valid JSON string that contains application-specific data.", + "type": "string" + }, + "FriendlyName": { + "description": "A descriptive string that you create to describe the new resource. This value is often used for display purposes.", + "type": "string" + }, + "Identity": { + "description": "The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is often a username or email address. See the Identity documentation for more details.", + "type": "string" + }, + "RoleSid": { + "description": "The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User.", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + } + }, + "required": [ + "Identity" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.user" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Services/{ServiceSid}/Users/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the User resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "Unique chat users within a chat service", + "get": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the User resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.user" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The Twilio-provided string that uniquely identifies the User resource to update.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Attributes": { + "description": "A valid JSON string that contains application-specific data.", + "type": "string" + }, + "FriendlyName": { + "description": "A descriptive string that you create to describe the resource. It is often used for display purposes.", + "type": "string" + }, + "RoleSid": { + "description": "The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user.", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service.user" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "date_created" + ], + "x-path-type": "instance" + }, + "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels": { + "description": "TODO: Resource-level docs", + "get": { + "description": "List all Channels for a given User.", + "parameters": [ + { + "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from.", + "in": "path", + "name": "UserSid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "channels": { + "items": { + "$ref": "#/components/schemas/chat.v1.service.user.user_channel" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "channel_sid", + "status" + ], + "x-path-type": "list" + }, + "/v1/Services/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "The Twilio-provided string that uniquely identifies the Service resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "Top level scope for all chat resources", + "get": { + "description": "", + "parameters": [ + { + "description": "The Twilio-provided string that uniquely identifies the Service resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "The Twilio-provided string that uniquely identifies the Service resource to update.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "ConsumptionReportInterval": { + "description": "DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.", + "type": "integer" + }, + "DefaultChannelCreatorRoleSid": { + "description": "The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "DefaultChannelRoleSid": { + "description": "The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "DefaultServiceRoleSid": { + "description": "The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "FriendlyName": { + "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.", + "type": "string" + }, + "Limits.ChannelMembers": { + "description": "The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.", + "type": "integer" + }, + "Limits.UserChannels": { + "description": "The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.", + "type": "integer" + }, + "Notifications.AddedToChannel.Enabled": { + "description": "Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`.", + "type": "boolean" + }, + "Notifications.AddedToChannel.Template": { + "description": "The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.", + "type": "string" + }, + "Notifications.InvitedToChannel.Enabled": { + "description": "Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`.", + "type": "boolean" + }, + "Notifications.InvitedToChannel.Template": { + "description": "The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.", + "type": "string" + }, + "Notifications.NewMessage.Enabled": { + "description": "Whether to send a notification when a new message is added to a channel. Can be: `true` or `false` and the default is `false`.", + "type": "boolean" + }, + "Notifications.NewMessage.Template": { + "description": "The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`.", + "type": "string" + }, + "Notifications.RemovedFromChannel.Enabled": { + "description": "Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`.", + "type": "boolean" + }, + "Notifications.RemovedFromChannel.Template": { + "description": "The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.", + "type": "string" + }, + "PostWebhookUrl": { + "description": "The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.", + "format": "uri", + "type": "string" + }, + "PreWebhookUrl": { + "description": "The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.", + "format": "uri", + "type": "string" + }, + "ReachabilityEnabled": { + "description": "Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`.", + "type": "boolean" + }, + "ReadStatusEnabled": { + "description": "Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`.", + "type": "boolean" + }, + "TypingIndicatorTimeout": { + "description": "How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds.", + "type": "integer" + }, + "WebhookFilters": { + "description": "The list of WebHook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.", + "items": { + "type": "string" + }, + "type": "array" + }, + "WebhookMethod": { + "description": "The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelAdd.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_channel_add.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelAdd.Url": { + "description": "The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnChannelAdded.Method": { + "description": "The URL of the webhook to call in response to the `on_channel_added` event`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelAdded.Url": { + "description": "The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnChannelDestroy.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_channel_destroy.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelDestroy.Url": { + "description": "The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnChannelDestroyed.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelDestroyed.Url": { + "description": "The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnChannelUpdate.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_channel_update.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelUpdate.Url": { + "description": "The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnChannelUpdated.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_channel_updated.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelUpdated.Url": { + "description": "The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMemberAdd.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_member_add.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMemberAdd.Url": { + "description": "The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMemberAdded.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_channel_updated.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMemberAdded.Url": { + "description": "The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMemberRemove.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_member_remove.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMemberRemove.Url": { + "description": "The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMemberRemoved.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_member_removed.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMemberRemoved.Url": { + "description": "The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageRemove.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_message_remove.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageRemove.Url": { + "description": "The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageRemoved.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_message_removed.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageRemoved.Url": { + "description": "The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageSend.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_message_send.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageSend.Url": { + "description": "The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageSent.Method": { + "description": "The URL of the webhook to call in response to the `on_message_sent` event`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageSent.Url": { + "description": "The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageUpdate.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_message_update.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageUpdate.Url": { + "description": "The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method.", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageUpdated.Method": { + "description": "The HTTP method to use when calling the `webhooks.on_message_updated.url`.", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageUpdated.Url": { + "description": "The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method.", + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/chat.v1.service" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://chat.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "date_created" + ], + "x-path-type": "instance" + } + }, + "tags": [ + { + "description": "This product is Generally Available.", + "name": "GA" + } + ] +} \ No newline at end of file diff --git a/src/services/twilio-api/twilio_chat.json b/src/services/twilio-api/twilio_chat_v2.json similarity index 57% rename from src/services/twilio-api/twilio_chat.json rename to src/services/twilio-api/twilio_chat_v2.json index 8ae7be2a..3c5c0493 100644 --- a/src/services/twilio-api/twilio_chat.json +++ b/src/services/twilio-api/twilio_chat_v2.json @@ -1,7 +1,7 @@ { "components": { "schemas": { - "chat.v1.credential": { + "chat.v2.credential": { "properties": { "account_sid": { "maxLength": 34, @@ -44,7 +44,7 @@ }, "type": "object" }, - "chat.v1.service": { + "chat.v2.service": { "properties": { "account_sid": { "maxLength": 34, @@ -90,12 +90,21 @@ "links": { "type": "object" }, + "media": { + "type": "object" + }, "notifications": { "type": "object" }, + "post_webhook_retry_count": { + "type": "integer" + }, "post_webhook_url": { "type": "string" }, + "pre_webhook_retry_count": { + "type": "integer" + }, "pre_webhook_url": { "type": "string" }, @@ -126,14 +135,75 @@ }, "webhook_method": { "type": "string" + } + }, + "type": "object" + }, + "chat.v2.service.binding": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "binding_type": { + "enum": [ + "gcm", + "apn", + "fcm" + ], + "type": "string" + }, + "credential_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CR[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "identity": { + "type": "string" }, - "webhooks": { + "links": { "type": "object" + }, + "message_types": { + "items": { + "type": "string" + }, + "type": "array" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^BS[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" } }, "type": "object" }, - "chat.v1.service.channel": { + "chat.v2.service.channel": { "properties": { "account_sid": { "maxLength": 34, @@ -196,7 +266,54 @@ }, "type": "object" }, - "chat.v1.service.channel.invite": { + "chat.v2.service.channel.channel_webhook": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "channel_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "configuration": { + "type": "object" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^WH[0-9a-fA-F]{32}$", + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "chat.v2.service.channel.invite": { "properties": { "account_sid": { "maxLength": 34, @@ -249,7 +366,7 @@ }, "type": "object" }, - "chat.v1.service.channel.member": { + "chat.v2.service.channel.member": { "properties": { "account_sid": { "maxLength": 34, @@ -257,6 +374,9 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, + "attributes": { + "type": "string" + }, "channel_sid": { "maxLength": 34, "minLength": 34, @@ -307,7 +427,7 @@ }, "type": "object" }, - "chat.v1.service.channel.message": { + "chat.v2.service.channel.message": { "properties": { "account_sid": { "maxLength": 34, @@ -341,6 +461,12 @@ "index": { "type": "integer" }, + "last_updated_by": { + "type": "string" + }, + "media": { + "type": "object" + }, "service_sid": { "maxLength": 34, "minLength": 34, @@ -359,6 +485,9 @@ "pattern": "^CH[0-9a-fA-F]{32}$", "type": "string" }, + "type": { + "type": "string" + }, "url": { "format": "uri", "type": "string" @@ -369,7 +498,7 @@ }, "type": "object" }, - "chat.v1.service.role": { + "chat.v2.service.role": { "properties": { "account_sid": { "maxLength": 34, @@ -420,7 +549,7 @@ }, "type": "object" }, - "chat.v1.service.user": { + "chat.v2.service.user": { "properties": { "account_sid": { "maxLength": 34, @@ -482,7 +611,7 @@ }, "type": "object" }, - "chat.v1.service.user.user_channel": { + "chat.v2.service.user.user_binding": { "properties": { "account_sid": { "maxLength": 34, @@ -490,52 +619,18 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "last_consumed_message_index": { - "nullable": true, - "type": "integer" - }, - "links": { - "type": "object" - }, - "member_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "status": { + "binding_type": { "enum": [ - "joined", - "invited", - "not_participating" + "gcm", + "apn", + "fcm" ], "type": "string" }, - "unread_messages_count": { - "nullable": true, - "type": "integer" - } - }, - "type": "object" - }, - "chat.v2.credential": { - "properties": { - "account_sid": { + "credential_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", + "pattern": "^CR[0-9a-fA-F]{32}$", "type": "string" }, "date_created": { @@ -546,34 +641,44 @@ "format": "date-time", "type": "string" }, - "friendly_name": { + "endpoint": { "type": "string" }, - "sandbox": { + "identity": { "type": "string" }, - "sid": { + "message_types": { + "items": { + "type": "string" + }, + "type": "array" + }, + "service_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, - "type": { - "enum": [ - "gcm", - "apn", - "fcm" - ], + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^BS[0-9a-fA-F]{32}$", "type": "string" }, "url": { "format": "uri", "type": "string" + }, + "user_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^US[0-9a-fA-F]{32}$", + "type": "string" } }, "type": "object" }, - "chat.v2.service": { + "chat.v2.service.user.user_channel": { "properties": { "account_sid": { "maxLength": 34, @@ -581,4032 +686,88 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "consumption_report_interval": { - "type": "integer" - }, - "date_created": { - "format": "date-time", + "channel_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", "type": "string" }, - "date_updated": { - "format": "date-time", - "type": "string" + "last_consumed_message_index": { + "nullable": true, + "type": "integer" }, - "default_channel_creator_role_sid": { + "links": { + "type": "object" + }, + "member_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", + "pattern": "^MB[0-9a-fA-F]{32}$", "type": "string" }, - "default_channel_role_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", + "notification_level": { + "enum": [ + "default", + "muted" + ], "type": "string" }, - "default_service_role_sid": { + "service_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "friendly_name": { + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, - "limits": { - "type": "object" - }, - "links": { - "type": "object" - }, - "media": { - "type": "object" - }, - "notifications": { - "type": "object" - }, - "post_webhook_retry_count": { - "type": "integer" - }, - "post_webhook_url": { - "type": "string" - }, - "pre_webhook_retry_count": { - "type": "integer" - }, - "pre_webhook_url": { - "type": "string" - }, - "reachability_enabled": { - "type": "boolean" - }, - "read_status_enabled": { - "type": "boolean" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "typing_indicator_timeout": { - "type": "integer" - }, - "url": { - "format": "uri", - "type": "string" - }, - "webhook_filters": { - "items": { - "type": "string" - }, - "type": "array" - }, - "webhook_method": { - "type": "string" - } - }, - "type": "object" - }, - "chat.v2.service.binding": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "binding_type": { + "status": { "enum": [ - "gcm", - "apn", - "fcm" + "joined", + "invited", + "not_participating" ], "type": "string" }, - "credential_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "endpoint": { - "type": "string" - }, - "identity": { - "type": "string" - }, - "links": { - "type": "object" - }, - "message_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^BS[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "chat.v2.service.channel": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "attributes": { - "type": "string" - }, - "created_by": { - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "friendly_name": { - "type": "string" - }, - "links": { - "type": "object" - }, - "members_count": { - "type": "integer" - }, - "messages_count": { + "unread_messages_count": { + "nullable": true, "type": "integer" }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "type": { - "enum": [ - "public", - "private" - ], - "type": "string" - }, - "unique_name": { - "type": "string" - }, "url": { "format": "uri", "type": "string" - } - }, - "type": "object" - }, - "chat.v2.service.channel.channel_webhook": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "configuration": { - "type": "object" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" }, - "sid": { + "user_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^WH[0-9a-fA-F]{32}$", - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "format": "uri", + "pattern": "^US[0-9a-fA-F]{32}$", "type": "string" } }, "type": "object" - }, - "chat.v2.service.channel.invite": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "created_by": { - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "identity": { - "type": "string" - }, - "role_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IN[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "chat.v2.service.channel.member": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "attributes": { - "type": "string" - }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "identity": { - "type": "string" - }, - "last_consumed_message_index": { - "nullable": true, - "type": "integer" - }, - "last_consumption_timestamp": { - "format": "date-time", - "type": "string" - }, - "role_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "chat.v2.service.channel.message": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "attributes": { - "type": "string" - }, - "body": { - "type": "string" - }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "from": { - "type": "string" - }, - "index": { - "type": "integer" - }, - "last_updated_by": { - "type": "string" - }, - "media": { - "type": "object" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IM[0-9a-fA-F]{32}$", - "type": "string" - }, - "to": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - }, - "was_edited": { - "type": "boolean" - } - }, - "type": "object" - }, - "chat.v2.service.role": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "friendly_name": { - "type": "string" - }, - "permissions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "type": { - "enum": [ - "channel", - "deployment" - ], - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "chat.v2.service.user": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "attributes": { - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "friendly_name": { - "type": "string" - }, - "identity": { - "type": "string" - }, - "is_notifiable": { - "type": "boolean" - }, - "is_online": { - "type": "boolean" - }, - "joined_channels_count": { - "type": "integer" - }, - "links": { - "type": "object" - }, - "role_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^US[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "chat.v2.service.user.user_binding": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "binding_type": { - "enum": [ - "gcm", - "apn", - "fcm" - ], - "type": "string" - }, - "credential_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "endpoint": { - "type": "string" - }, - "identity": { - "type": "string" - }, - "message_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^BS[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - }, - "user_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^US[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "type": "object" - }, - "chat.v2.service.user.user_channel": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "last_consumed_message_index": { - "nullable": true, - "type": "integer" - }, - "links": { - "type": "object" - }, - "member_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - }, - "notification_level": { - "enum": [ - "default", - "muted" - ], - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "status": { - "enum": [ - "joined", - "invited", - "not_participating" - ], - "type": "string" - }, - "unread_messages_count": { - "nullable": true, - "type": "integer" - }, - "url": { - "format": "uri", - "type": "string" - }, - "user_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^US[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "type": "object" - } - }, - "securitySchemes": { - "accountSid_authToken": { - "scheme": "basic", - "type": "http" - } - } - }, - "info": { - "contact": { - "email": "support@twilio.com", - "name": "Twilio Support", - "url": "https://support.twilio.com" - }, - "description": "This is the public Twilio REST API.", - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "termsOfService": "https://www.twilio.com/legal/tos", - "title": "Twilio - Chat", - "version": "5.12.0" - }, - "openapi": "3.0.1", - "paths": { - "/v1/Credentials": { - "description": "Credentials for push notifications channels", - "get": { - "description": "", - "parameters": [ - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "credentials": { - "items": { - "$ref": "#/components/schemas/chat.v1.credential" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "ApiKey": { - "description": "[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.", - "type": "string" - }, - "Certificate": { - "description": "[APN only] The URL encoded representation of the certificate. For example, \n`-----BEGIN CERTIFICATE-----\nMIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==\n-----END CERTIFICATE-----`", - "type": "string" - }, - "FriendlyName": { - "description": "A descriptive string that you create to describe the new resource. It can be up to 64 characters long.", - "type": "string" - }, - "PrivateKey": { - "description": "[APN only] The URL encoded representation of the private key. For example,\n`-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.\n-----END RSA PRIVATE KEY-----`", - "type": "string" - }, - "Sandbox": { - "description": "[APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.", - "type": "boolean" - }, - "Secret": { - "description": "[FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.", - "type": "string" - }, - "Type": { - "description": "The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`.", - "enum": [ - "gcm", - "apn", - "fcm" - ], - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.credential" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "type" - ], - "x-path-type": "list" - }, - "/v1/Credentials/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "The Twilio-provided string that uniquely identifies the Credential resource to delete.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "Credentials for push notifications channels", - "get": { - "description": "", - "parameters": [ - { - "description": "The Twilio-provided string that uniquely identifies the Credential resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.credential" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The Twilio-provided string that uniquely identifies the Credential resource to update.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "ApiKey": { - "description": "[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.", - "type": "string" - }, - "Certificate": { - "description": "[APN only] The URL encoded representation of the certificate. For example, \n`-----BEGIN CERTIFICATE-----\nMIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==\n-----END CERTIFICATE-----`", - "type": "string" - }, - "FriendlyName": { - "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.", - "type": "string" - }, - "PrivateKey": { - "description": "[APN only] The URL encoded representation of the private key. For example,\n`-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.\n-----END RSA PRIVATE KEY-----`", - "type": "string" - }, - "Sandbox": { - "description": "[APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.", - "type": "boolean" - }, - "Secret": { - "description": "[FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.credential" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "type" - ], - "x-path-type": "instance" - }, - "/v1/Services": { - "description": "Top level scope for all chat resources", - "get": { - "description": "", - "parameters": [ - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "services": { - "items": { - "$ref": "#/components/schemas/chat.v1.service" - }, - "type": "array" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "FriendlyName": { - "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.", - "type": "string" - } - }, - "required": [ - "FriendlyName" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Channels": { - "description": "Channels represent chat rooms", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.", - "in": "query", - "name": "Type", - "schema": { - "items": { - "enum": [ - "public", - "private" - ], - "type": "string" - }, - "type": "array" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "channels": { - "items": { - "$ref": "#/components/schemas/chat.v1.service.channel" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "A valid JSON string that contains application-specific data.", - "type": "string" - }, - "FriendlyName": { - "description": "A descriptive string that you create to describe the new resource. It can be up to 64 characters long.", - "type": "string" - }, - "Type": { - "description": "The visibility of the channel. Can be: `public` or `private` and defaults to `public`.", - "enum": [ - "public", - "private" - ], - "type": "string" - }, - "UniqueName": { - "description": "An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "unique_name", - "friendly_name" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites": { - "description": "Pending invitations to users to become channel members", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resources to read belong to.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.", - "in": "query", - "name": "Identity", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "invites": { - "items": { - "$ref": "#/components/schemas/chat.v1.service.channel.invite" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Identity": { - "description": "The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more info.", - "type": "string" - }, - "RoleSid": { - "description": "The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member.", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "required": [ - "Identity" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel.invite" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "identity", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to delete belongs to.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Invite resource to delete.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IN[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "Pending invitations to users to become channel members", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to fetch belongs to.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Invite resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IN[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel.invite" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "identity", - "date_created" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members": { - "description": "Users joined to specific channels", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the members to read belong to. Can be the Channel resource's `sid` or `unique_name` value.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.", - "in": "query", - "name": "Identity", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "members": { - "items": { - "$ref": "#/components/schemas/chat.v1.service.channel.member" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new member belongs to. Can be the Channel resource's `sid` or `unique_name`.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Identity": { - "description": "The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/services). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.", - "type": "string" - }, - "RoleSid": { - "description": "The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "required": [ - "Identity" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel.member" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "identity", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Member resource to delete.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "Users joined to specific channels", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to fetch belongs to. Can be the Channel resource's `sid` or `unique_name` value.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Member resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel.member" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to update belongs to. Can be the Channel resource's `sid` or `unique_name`.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Member resource to update.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "LastConsumedMessageIndex": { - "description": "The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels).", - "nullable": true, - "type": "integer" - }, - "RoleSid": { - "description": "The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel.member" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "identity", - "date_created" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages": { - "description": "Individual chat messages", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to read belongs to. Can be the Channel's `sid` or `unique_name`.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.", - "in": "query", - "name": "Order", - "schema": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "messages": { - "items": { - "$ref": "#/components/schemas/chat.v1.service.channel.message" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to. Can be the Channel resource's `sid` or `unique_name`.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "A valid JSON string that contains application-specific data.", - "type": "string" - }, - "Body": { - "description": "The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.", - "type": "string" - }, - "From": { - "description": "The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`.", - "type": "string" - } - }, - "required": [ - "Body" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel.message" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "from", - "to", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to delete belongs to. Can be the Channel resource's `sid` or `unique_name`.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Message resource to delete.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IM[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "Individual chat messages", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to fetch belongs to. Can be the Channel's `sid` or `unique_name`.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Message resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IM[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel.message" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message belongs to. Can be the Channel's `sid` or `unique_name`.", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Message resource to update.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IM[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "A valid JSON string that contains application-specific data.", - "type": "string" - }, - "Body": { - "description": "The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel.message" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "from", - "to", - "date_created" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Channels/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Channel resource to delete.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "Channels represent chat rooms", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Channel resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Channel resource to update.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "A valid JSON string that contains application-specific data.", - "type": "string" - }, - "FriendlyName": { - "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.", - "type": "string" - }, - "UniqueName": { - "description": "An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.channel" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "unique_name", - "friendly_name" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Roles": { - "description": "Roles determining user or member permissions", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "roles": { - "items": { - "$ref": "#/components/schemas/chat.v1.service.role" - }, - "type": "array" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "FriendlyName": { - "description": "A descriptive string that you create to describe the new resource. It can be up to 64 characters long.", - "type": "string" - }, - "Permission": { - "description": "A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation.", - "items": { - "type": "string" - }, - "type": "array" - }, - "Type": { - "description": "The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/api/services) roles.", - "enum": [ - "channel", - "deployment" - ], - "type": "string" - } - }, - "required": [ - "FriendlyName", - "Type", - "Permission" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.role" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "type" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Roles/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Role resource to delete.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "Roles determining user or member permissions", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Role resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.role" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the Role resource to update.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Permission": { - "description": "A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "Permission" - ], - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.role" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "type" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Users": { - "description": "Unique chat users within a chat service", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "users": { - "items": { - "$ref": "#/components/schemas/chat.v1.service.user" - }, - "type": "array" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "A valid JSON string that contains application-specific data.", - "type": "string" - }, - "FriendlyName": { - "description": "A descriptive string that you create to describe the new resource. This value is often used for display purposes.", - "type": "string" - }, - "Identity": { - "description": "The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is often a username or email address. See the Identity documentation for more details.", - "type": "string" - }, - "RoleSid": { - "description": "The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User.", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "required": [ - "Identity" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.user" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Users/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to delete the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the User resource to delete.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "Unique chat users within a chat service", - "get": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the User resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.user" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to update the resource from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The Twilio-provided string that uniquely identifies the User resource to update.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "A valid JSON string that contains application-specific data.", - "type": "string" - }, - "FriendlyName": { - "description": "A descriptive string that you create to describe the resource. It is often used for display purposes.", - "type": "string" - }, - "RoleSid": { - "description": "The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user.", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service.user" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "date_created" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels": { - "description": "TODO: Resource-level docs", - "get": { - "description": "List all Channels for a given User.", - "parameters": [ - { - "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from.", - "in": "path", - "name": "UserSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "channels": { - "items": { - "$ref": "#/components/schemas/chat.v1.service.user.user_channel" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "channel_sid", - "status" - ], - "x-path-type": "list" - }, - "/v1/Services/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "The Twilio-provided string that uniquely identifies the Service resource to delete.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "Top level scope for all chat resources", - "get": { - "description": "", - "parameters": [ - { - "description": "The Twilio-provided string that uniquely identifies the Service resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "The Twilio-provided string that uniquely identifies the Service resource to update.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "ConsumptionReportInterval": { - "description": "DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.", - "type": "integer" - }, - "DefaultChannelCreatorRoleSid": { - "description": "The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "DefaultChannelRoleSid": { - "description": "The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "DefaultServiceRoleSid": { - "description": "The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "FriendlyName": { - "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long.", - "type": "string" - }, - "Limits.ChannelMembers": { - "description": "The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.", - "type": "integer" - }, - "Limits.UserChannels": { - "description": "The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.", - "type": "integer" - }, - "Notifications.AddedToChannel.Enabled": { - "description": "Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`.", - "type": "boolean" - }, - "Notifications.AddedToChannel.Template": { - "description": "The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.", - "type": "string" - }, - "Notifications.InvitedToChannel.Enabled": { - "description": "Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`.", - "type": "boolean" - }, - "Notifications.InvitedToChannel.Template": { - "description": "The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.", - "type": "string" - }, - "Notifications.NewMessage.Enabled": { - "description": "Whether to send a notification when a new message is added to a channel. Can be: `true` or `false` and the default is `false`.", - "type": "boolean" - }, - "Notifications.NewMessage.Template": { - "description": "The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`.", - "type": "string" - }, - "Notifications.RemovedFromChannel.Enabled": { - "description": "Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`.", - "type": "boolean" - }, - "Notifications.RemovedFromChannel.Template": { - "description": "The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.", - "type": "string" - }, - "PostWebhookUrl": { - "description": "The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.", - "format": "uri", - "type": "string" - }, - "PreWebhookUrl": { - "description": "The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.", - "format": "uri", - "type": "string" - }, - "ReachabilityEnabled": { - "description": "Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`.", - "type": "boolean" - }, - "ReadStatusEnabled": { - "description": "Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`.", - "type": "boolean" - }, - "TypingIndicatorTimeout": { - "description": "How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds.", - "type": "integer" - }, - "WebhookFilters": { - "description": "The list of WebHook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.", - "items": { - "type": "string" - }, - "type": "array" - }, - "WebhookMethod": { - "description": "The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelAdd.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_channel_add.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelAdd.Url": { - "description": "The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnChannelAdded.Method": { - "description": "The URL of the webhook to call in response to the `on_channel_added` event`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelAdded.Url": { - "description": "The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnChannelDestroy.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_channel_destroy.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelDestroy.Url": { - "description": "The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnChannelDestroyed.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelDestroyed.Url": { - "description": "The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnChannelUpdate.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_channel_update.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelUpdate.Url": { - "description": "The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnChannelUpdated.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_channel_updated.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelUpdated.Url": { - "description": "The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMemberAdd.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_member_add.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMemberAdd.Url": { - "description": "The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMemberAdded.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_channel_updated.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMemberAdded.Url": { - "description": "The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMemberRemove.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_member_remove.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMemberRemove.Url": { - "description": "The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMemberRemoved.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_member_removed.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMemberRemoved.Url": { - "description": "The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageRemove.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_message_remove.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageRemove.Url": { - "description": "The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageRemoved.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_message_removed.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageRemoved.Url": { - "description": "The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageSend.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_message_send.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageSend.Url": { - "description": "The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageSent.Method": { - "description": "The URL of the webhook to call in response to the `on_message_sent` event`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageSent.Url": { - "description": "The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageUpdate.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_message_update.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageUpdate.Url": { - "description": "The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method.", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageUpdated.Method": { - "description": "The HTTP method to use when calling the `webhooks.on_message_updated.url`.", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageUpdated.Url": { - "description": "The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method.", - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/chat.v1.service" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://chat.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "date_created" - ], - "x-path-type": "instance" + } + }, + "securitySchemes": { + "accountSid_authToken": { + "scheme": "basic", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "support@twilio.com", + "name": "Twilio Support", + "url": "https://support.twilio.com" + }, + "description": "This is the public Twilio REST API.", + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, + "termsOfService": "https://www.twilio.com/legal/tos", + "title": "Twilio - Chat", + "version": "5.12.0" + }, + "openapi": "3.0.1", + "paths": { "/v2/Credentials": { "description": "Credentials for push notifications channels", "get": { diff --git a/src/services/twilio-api/twilio_conversations.json b/src/services/twilio-api/twilio_conversations_v1.json similarity index 100% rename from src/services/twilio-api/twilio_conversations.json rename to src/services/twilio-api/twilio_conversations_v1.json diff --git a/src/services/twilio-api/twilio_events.json b/src/services/twilio-api/twilio_events_v1.json similarity index 100% rename from src/services/twilio-api/twilio_events.json rename to src/services/twilio-api/twilio_events_v1.json diff --git a/src/services/twilio-api/twilio_fax.json b/src/services/twilio-api/twilio_fax_v1.json similarity index 100% rename from src/services/twilio-api/twilio_fax.json rename to src/services/twilio-api/twilio_fax_v1.json diff --git a/src/services/twilio-api/twilio_flex.json b/src/services/twilio-api/twilio_flex_v1.json similarity index 100% rename from src/services/twilio-api/twilio_flex.json rename to src/services/twilio-api/twilio_flex_v1.json diff --git a/src/services/twilio-api/twilio_insights.json b/src/services/twilio-api/twilio_insights_v1.json similarity index 100% rename from src/services/twilio-api/twilio_insights.json rename to src/services/twilio-api/twilio_insights_v1.json diff --git a/src/services/twilio-api/twilio_studio.json b/src/services/twilio-api/twilio_ip_messaging_v1.json similarity index 59% rename from src/services/twilio-api/twilio_studio.json rename to src/services/twilio-api/twilio_ip_messaging_v1.json index 564429a7..70e9fbef 100644 --- a/src/services/twilio-api/twilio_studio.json +++ b/src/services/twilio-api/twilio_ip_messaging_v1.json @@ -1,7 +1,7 @@ { "components": { "schemas": { - "studio.v1.flow": { + "ip_messaging.v1.credential": { "properties": { "account_sid": { "maxLength": 34, @@ -20,33 +20,31 @@ "friendly_name": { "type": "string" }, - "links": { - "type": "object" + "sandbox": { + "type": "string" }, "sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^CR[0-9a-fA-F]{32}$", "type": "string" }, - "status": { + "type": { "enum": [ - "draft", - "published" + "gcm", + "apn", + "fcm" ], "type": "string" }, "url": { "format": "uri", "type": "string" - }, - "version": { - "type": "integer" } }, "type": "object" }, - "studio.v1.flow.engagement": { + "ip_messaging.v1.service": { "properties": { "account_sid": { "maxLength": 34, @@ -54,17 +52,8 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "contact_channel_address": { - "type": "string" - }, - "contact_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FC[0-9a-fA-F]{32}$", - "type": "string" - }, - "context": { - "type": "object" + "consumption_report_interval": { + "type": "integer" }, "date_created": { "format": "date-time", @@ -74,66 +63,77 @@ "format": "date-time", "type": "string" }, - "flow_sid": { + "default_channel_creator_role_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" }, - "links": { - "type": "object" - }, - "sid": { + "default_channel_role_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" - }, - "status": { - "enum": [ - "active", - "ended" - ], + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "studio.v1.flow.engagement.engagement_context": { - "properties": { - "account_sid": { + "default_service_role_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "friendly_name": { "type": "string" }, - "context": { + "limits": { "type": "object" }, - "engagement_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "links": { + "type": "object" + }, + "notifications": { + "type": "object" + }, + "post_webhook_url": { + "type": "string" + }, + "pre_webhook_url": { "type": "string" }, - "flow_sid": { + "reachability_enabled": { + "type": "boolean" + }, + "read_status_enabled": { + "type": "boolean" + }, + "sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, + "typing_indicator_timeout": { + "type": "integer" + }, "url": { "format": "uri", "type": "string" + }, + "webhook_filters": { + "items": { + "type": "string" + }, + "type": "array" + }, + "webhook_method": { + "type": "string" + }, + "webhooks": { + "type": "object" } }, "type": "object" }, - "studio.v1.flow.engagement.step": { + "ip_messaging.v1.service.channel": { "properties": { "account_sid": { "maxLength": 34, @@ -141,8 +141,11 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "context": { - "type": "object" + "attributes": { + "type": "string" + }, + "created_by": { + "type": "string" }, "date_created": { "format": "date-time", @@ -152,34 +155,38 @@ "format": "date-time", "type": "string" }, - "engagement_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" - }, - "flow_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "friendly_name": { "type": "string" }, "links": { "type": "object" }, - "name": { + "members_count": { + "type": "integer" + }, + "messages_count": { + "type": "integer" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, "sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", + "pattern": "^CH[0-9a-fA-F]{32}$", "type": "string" }, - "transitioned_from": { + "type": { + "enum": [ + "public", + "private" + ], "type": "string" }, - "transitioned_to": { + "unique_name": { "type": "string" }, "url": { @@ -189,7 +196,7 @@ }, "type": "object" }, - "studio.v1.flow.engagement.step.step_context": { + "ip_messaging.v1.service.channel.invite": { "properties": { "account_sid": { "maxLength": 34, @@ -197,25 +204,42 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "context": { - "type": "object" + "channel_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "created_by": { + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "identity": { + "type": "string" }, - "engagement_sid": { + "role_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" }, - "flow_sid": { + "service_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, - "step_sid": { + "sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", + "pattern": "^IN[0-9a-fA-F]{32}$", "type": "string" }, "url": { @@ -225,7 +249,7 @@ }, "type": "object" }, - "studio.v1.flow.execution": { + "ip_messaging.v1.service.channel.member": { "properties": { "account_sid": { "maxLength": 34, @@ -233,18 +257,12 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "contact_channel_address": { - "type": "string" - }, - "contact_sid": { + "channel_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FC[0-9a-fA-F]{32}$", + "pattern": "^CH[0-9a-fA-F]{32}$", "type": "string" }, - "context": { - "type": "object" - }, "date_created": { "format": "date-time", "type": "string" @@ -253,56 +271,33 @@ "format": "date-time", "type": "string" }, - "flow_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "identity": { "type": "string" }, - "links": { - "type": "object" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" + "last_consumed_message_index": { + "nullable": true, + "type": "integer" }, - "status": { - "enum": [ - "active", - "ended" - ], + "last_consumption_timestamp": { + "format": "date-time", "type": "string" }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "studio.v1.flow.execution.execution_context": { - "properties": { - "account_sid": { + "role_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" }, - "context": { - "type": "object" - }, - "execution_sid": { + "service_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, - "flow_sid": { + "sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^MB[0-9a-fA-F]{32}$", "type": "string" }, "url": { @@ -312,7 +307,7 @@ }, "type": "object" }, - "studio.v1.flow.execution.execution_step": { + "ip_messaging.v1.service.channel.message": { "properties": { "account_sid": { "maxLength": 34, @@ -320,91 +315,61 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "context": { - "type": "object" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "execution_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" - }, - "flow_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "attributes": { "type": "string" }, - "links": { - "type": "object" - }, - "name": { + "body": { "type": "string" }, - "sid": { + "channel_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", + "pattern": "^CH[0-9a-fA-F]{32}$", "type": "string" }, - "transitioned_from": { + "date_created": { + "format": "date-time", "type": "string" }, - "transitioned_to": { + "date_updated": { + "format": "date-time", "type": "string" }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "studio.v1.flow.execution.execution_step.execution_step_context": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", + "from": { "type": "string" }, - "context": { - "type": "object" + "index": { + "type": "integer" }, - "execution_sid": { + "service_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, - "flow_sid": { + "sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IM[0-9a-fA-F]{32}$", "type": "string" }, - "step_sid": { + "to": { "maxLength": 34, "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", + "pattern": "^CH[0-9a-fA-F]{32}$", "type": "string" }, "url": { "format": "uri", "type": "string" + }, + "was_edited": { + "type": "boolean" } }, "type": "object" }, - "studio.v2.flow": { + "ip_messaging.v1.service.role": { "properties": { "account_sid": { "maxLength": 34, @@ -412,9 +377,6 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "commit_message": { - "type": "string" - }, "date_created": { "format": "date-time", "type": "string" @@ -423,58 +385,42 @@ "format": "date-time", "type": "string" }, - "definition": { - "type": "object" + "friendly_name": { + "type": "string" }, - "errors": { + "permissions": { "items": { - "type": "object" + "type": "string" }, "type": "array" }, - "friendly_name": { + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, - "links": { - "type": "object" - }, - "revision": { - "type": "integer" - }, "sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" }, - "status": { + "type": { "enum": [ - "draft", - "published" + "channel", + "deployment" ], "type": "string" }, "url": { "format": "uri", "type": "string" - }, - "valid": { - "type": "boolean" - }, - "warnings": { - "items": { - "type": "object" - }, - "type": "array" - }, - "webhook_url": { - "format": "uri", - "type": "string" } }, "type": "object" }, - "studio.v2.flow.execution": { + "ip_messaging.v1.service.user": { "properties": { "account_sid": { "maxLength": 34, @@ -482,12 +428,9 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "contact_channel_address": { + "attributes": { "type": "string" }, - "context": { - "type": "object" - }, "date_created": { "format": "date-time", "type": "string" @@ -496,56 +439,40 @@ "format": "date-time", "type": "string" }, - "flow_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "friendly_name": { "type": "string" }, - "links": { - "type": "object" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "identity": { "type": "string" }, - "status": { - "enum": [ - "active", - "ended" - ], - "type": "string" + "is_notifiable": { + "type": "boolean" }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "studio.v2.flow.execution.execution_context": { - "properties": { - "account_sid": { + "is_online": { + "type": "boolean" + }, + "joined_channels_count": { + "type": "integer" + }, + "links": { + "type": "object" + }, + "role_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" }, - "context": { - "type": "object" - }, - "execution_sid": { + "service_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, - "flow_sid": { + "sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^US[0-9a-fA-F]{32}$", "type": "string" }, "url": { @@ -555,7 +482,7 @@ }, "type": "object" }, - "studio.v2.flow.execution.execution_step": { + "ip_messaging.v1.service.user.user_channel": { "properties": { "account_sid": { "maxLength": 34, @@ -563,172 +490,42 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "context": { - "type": "object" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "execution_sid": { + "channel_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^CH[0-9a-fA-F]{32}$", "type": "string" }, - "flow_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" + "last_consumed_message_index": { + "nullable": true, + "type": "integer" }, "links": { "type": "object" }, - "name": { - "type": "string" - }, - "sid": { + "member_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", + "pattern": "^MB[0-9a-fA-F]{32}$", "type": "string" }, - "transitioned_from": { + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, - "transitioned_to": { + "status": { + "enum": [ + "joined", + "invited", + "not_participating" + ], "type": "string" }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "studio.v2.flow.execution.execution_step.execution_step_context": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "context": { - "type": "object" - }, - "execution_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" - }, - "flow_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - }, - "step_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "studio.v2.flow.flow_revision": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "commit_message": { - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "definition": { - "type": "object" - }, - "errors": { - "items": { - "type": "object" - }, - "type": "array" - }, - "friendly_name": { - "type": "string" - }, - "revision": { - "type": "integer" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - }, - "status": { - "enum": [ - "draft", - "published" - ], - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - }, - "valid": { - "type": "boolean" - } - }, - "type": "object" - }, - "studio.v2.flow.test_user": { - "properties": { - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - }, - "test_users": { - "items": { - "type": "string" - }, - "type": "array" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "studio.v2.flow_validate": { - "properties": { - "valid": { - "type": "boolean" + "unread_messages_count": { + "nullable": true, + "type": "integer" } }, "type": "object" @@ -753,116 +550,16 @@ "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "termsOfService": "https://www.twilio.com/legal/tos", - "title": "Twilio - Studio", + "title": "Twilio - Ip_messaging", "version": "5.12.0" }, "openapi": "3.0.1", "paths": { - "/v1/Flows": { - "description": "Studio flows", - "get": { - "description": "Retrieve a list of all Flows.", - "parameters": [ - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "flows": { - "items": { - "$ref": "#/components/schemas/studio.v1.flow" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "status", - "version" - ], - "x-path-type": "list" - }, - "/v1/Flows/{FlowSid}/Engagements": { - "description": "[DEPRECATED] Excecutions of Studio flows", + "/v1/Credentials": { + "description": "TODO: Resource-level docs", "get": { - "description": "Retrieve a list of all Engagements for the Flow.", + "description": "", "parameters": [ - { - "description": "The SID of the Flow to read Engagements from.", - "in": "path", - "name": "FlowSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, { "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "in": "query", @@ -880,9 +577,9 @@ "application/json": { "schema": { "properties": { - "engagements": { + "credentials": { "items": { - "$ref": "#/components/schemas/studio.v1.flow.engagement" + "$ref": "#/components/schemas/ip_messaging.v1.credential" }, "type": "array" }, @@ -934,42 +631,48 @@ ] }, "post": { - "description": "Triggers a new Engagement for the Flow", - "parameters": [ - { - "description": "The SID of the Flow.", - "in": "path", - "name": "FlowSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], + "description": "", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "properties": { - "From": { - "description": "The Twilio phone number to send messages or initiate calls from during the Flow Engagement. Available as variable `{{flow.channel.address}}`", + "ApiKey": { + "description": "", + "type": "string" + }, + "Certificate": { + "description": "", + "type": "string" + }, + "FriendlyName": { + "description": "", + "type": "string" + }, + "PrivateKey": { + "description": "", "type": "string" }, - "Parameters": { - "description": "A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string.", - "type": "object" + "Sandbox": { + "description": "", + "type": "boolean" + }, + "Secret": { + "description": "", + "type": "string" }, - "To": { - "description": "The Contact phone number to start a Studio Flow Engagement, available as variable `{{contact.channel.address}}`.", + "Type": { + "description": "", + "enum": [ + "gcm", + "apn", + "fcm" + ], "type": "string" } }, "required": [ - "To", - "From" + "Type" ], "type": "object" } @@ -981,7 +684,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v1.flow.engagement" + "$ref": "#/components/schemas/ip_messaging.v1.credential" } } }, @@ -999,43 +702,60 @@ }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ "sid", - "contact_sid", - "status", - "date_created" + "friendly_name", + "type" ], "x-path-type": "list" }, - "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Context": { - "description": "[DEPRECATED] JSON context for engagements", - "get": { - "description": "Retrieve the most recent context for an Engagement.", + "/v1/Credentials/{Sid}": { + "delete": { + "description": "", "parameters": [ { - "description": "The SID of the Flow.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^CR[0-9a-fA-F]{32}$", "type": "string" } - }, + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ { - "description": "The SID of the Engagement.", + "description": "", "in": "path", - "name": "EngagementSid", + "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^CR[0-9a-fA-F]{32}$", "type": "string" } } @@ -1045,7 +765,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v1.flow.engagement.engagement_context" + "$ref": "#/components/schemas/ip_messaging.v1.credential" } } }, @@ -1061,45 +781,95 @@ "GA" ] }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "context" - ], - "x-path-type": "instance" - }, - "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps": { - "description": "Steps within a Studio flow", - "get": { - "description": "Retrieve a list of all Steps for an Engagement.", + "post": { + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Step to read.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^CR[0-9a-fA-F]{32}$", "type": "string" } - }, - { - "description": "The SID of the Engagement with the Step to read.", - "in": "path", - "name": "EngagementSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "ApiKey": { + "description": "", + "type": "string" + }, + "Certificate": { + "description": "", + "type": "string" + }, + "FriendlyName": { + "description": "", + "type": "string" + }, + "PrivateKey": { + "description": "", + "type": "string" + }, + "Sandbox": { + "description": "", + "type": "boolean" + }, + "Secret": { + "description": "", + "type": "string" + } + }, + "type": "object" + } } - }, + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ip_messaging.v1.credential" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://ip-messaging.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "type" + ], + "x-path-type": "instance" + }, + "/v1/Services": { + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ { "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "in": "query", @@ -1147,9 +917,9 @@ }, "type": "object" }, - "steps": { + "services": { "items": { - "$ref": "#/components/schemas/studio.v1.flow.engagement.step" + "$ref": "#/components/schemas/ip_messaging.v1.service" }, "type": "array" } @@ -1170,71 +940,36 @@ "GA" ] }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "name", - "transitioned_from", - "transitioned_to" - ], - "x-path-type": "list" - }, - "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{Sid}": { - "description": "Steps within a Studio flow", - "get": { - "description": "Retrieve a Step.", - "parameters": [ - { - "description": "The SID of the Flow with the Step to fetch.", - "in": "path", - "name": "FlowSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the Engagement with the Step to fetch.", - "in": "path", - "name": "EngagementSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the Step resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", - "type": "string" + "post": { + "description": "", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "FriendlyName": { + "description": "", + "type": "string" + } + }, + "required": [ + "FriendlyName" + ], + "type": "object" + } } } - ], + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v1.flow.engagement.step" + "$ref": "#/components/schemas/ip_messaging.v1.service" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -1248,56 +983,56 @@ }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ "sid", - "name", - "transitioned_from", - "transitioned_to" + "friendly_name", + "date_created" ], - "x-path-type": "instance" + "x-path-type": "list" }, - "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{StepSid}/Context": { - "description": "JSON context for individual steps", + "/v1/Services/{ServiceSid}/Channels": { + "description": "TODO: Resource-level docs", "get": { - "description": "Retrieve the context for an Engagement Step.", + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Step to fetch.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Engagement with the Step to fetch.", - "in": "path", - "name": "EngagementSid", - "required": true, + "description": "", + "in": "query", + "name": "Type", "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" + "items": { + "enum": [ + "public", + "private" + ], + "type": "string" + }, + "type": "array" } }, { - "description": "The SID of the Step to fetch", - "in": "path", - "name": "StepSid", - "required": true, + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", - "type": "string" + "maximum": 1000, + "minimum": 1, + "type": "integer" } } ], @@ -1306,7 +1041,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v1.flow.engagement.step.step_context" + "properties": { + "channels": { + "items": { + "$ref": "#/components/schemas/ip_messaging.v1.service.channel" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" } } }, @@ -1322,98 +1095,63 @@ "GA" ] }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "context" - ], - "x-path-type": "instance" - }, - "/v1/Flows/{FlowSid}/Engagements/{Sid}": { - "delete": { - "description": "Delete this Engagement and all Steps relating to it.", + "post": { + "description": "", "parameters": [ { - "description": "The SID of the Flow to delete Engagements from.", - "in": "path", - "name": "FlowSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the Engagement resource to delete.", + "description": "", "in": "path", - "name": "Sid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } } ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "[DEPRECATED] Excecutions of Studio flows", - "get": { - "description": "Retrieve an Engagement", - "parameters": [ - { - "description": "The SID of the Flow.", - "in": "path", - "name": "FlowSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the Engagement resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Attributes": { + "description": "", + "type": "string" + }, + "FriendlyName": { + "description": "", + "type": "string" + }, + "Type": { + "description": "", + "enum": [ + "public", + "private" + ], + "type": "string" + }, + "UniqueName": { + "description": "", + "type": "string" + } + }, + "type": "object" + } } } - ], + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v1.flow.engagement" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -1427,50 +1165,51 @@ }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ "sid", - "contact_sid", - "status", - "date_created" + "unique_name", + "friendly_name" ], - "x-path-type": "instance" + "x-path-type": "list" }, - "/v1/Flows/{FlowSid}/Executions": { - "description": "Executions of Studio flows", + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites": { + "description": "TODO: Resource-level docs", "get": { - "description": "Retrieve a list of all Executions for the Flow.", + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Execution resources to read.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.", - "in": "query", - "name": "DateCreatedFrom", + "description": "", + "in": "path", + "name": "ChannelSid", + "required": true, "schema": { - "format": "date-time", "type": "string" } }, { - "description": "Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.", + "description": "", "in": "query", - "name": "DateCreatedTo", + "name": "Identity", "schema": { - "format": "date-time", - "type": "string" + "items": { + "type": "string" + }, + "type": "array" } }, { @@ -1490,9 +1229,9 @@ "application/json": { "schema": { "properties": { - "executions": { + "invites": { "items": { - "$ref": "#/components/schemas/studio.v1.flow.execution" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.invite" }, "type": "array" }, @@ -1544,17 +1283,26 @@ ] }, "post": { - "description": "Triggers a new Execution for the Flow", + "description": "", "parameters": [ { - "description": "The SID of the Excecution's Flow.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { "type": "string" } } @@ -1564,22 +1312,20 @@ "application/x-www-form-urlencoded": { "schema": { "properties": { - "From": { - "description": "The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`.", + "Identity": { + "description": "", "type": "string" }, - "Parameters": { - "description": "JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\"name\":\"Zeke\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \"Zeke\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string.", - "type": "object" - }, - "To": { - "description": "The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`.", + "RoleSid": { + "description": "", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" } }, "required": [ - "To", - "From" + "Identity" ], "type": "object" } @@ -1591,7 +1337,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v1.flow.execution" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.invite" } } }, @@ -1609,43 +1355,102 @@ }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ "sid", - "contact_sid", - "status", + "identity", "date_created" ], "x-path-type": "list" }, - "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Context": { - "description": "JSON context for executions", + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "TODO: Resource-level docs", "get": { - "description": "Retrieve the most recent context for an Execution.", + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Execution context to fetch.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { "type": "string" } }, { - "description": "The SID of the Execution context to fetch.", + "description": "", "in": "path", - "name": "ExecutionSid", + "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^IN[0-9a-fA-F]{32}$", "type": "string" } } @@ -1655,7 +1460,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v1.flow.execution.execution_context" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.invite" } } }, @@ -1673,43 +1478,53 @@ }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ - "context" + "sid", + "identity", + "date_created" ], "x-path-type": "instance" }, - "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps": { - "description": "Individual steps within an execution", + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members": { + "description": "TODO: Resource-level docs", "get": { - "description": "Retrieve a list of all Steps for an Execution.", + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Steps to read.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Execution with the Steps to read.", + "description": "", "in": "path", - "name": "ExecutionSid", + "name": "ChannelSid", "required": true, "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", "type": "string" } }, + { + "description": "", + "in": "query", + "name": "Identity", + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, { "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "in": "query", @@ -1727,6 +1542,12 @@ "application/json": { "schema": { "properties": { + "members": { + "items": { + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.member" + }, + "type": "array" + }, "meta": { "properties": { "first_page_url": { @@ -1756,12 +1577,6 @@ } }, "type": "object" - }, - "steps": { - "items": { - "$ref": "#/components/schemas/studio.v1.flow.execution.execution_step" - }, - "type": "array" } }, "type": "object" @@ -1780,70 +1595,66 @@ "GA" ] }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "name", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}": { - "description": "Individual steps within an execution", - "get": { - "description": "Retrieve a Step.", + "post": { + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Step to fetch.", - "in": "path", - "name": "FlowSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the Execution resource with the Step to fetch.", + "description": "", "in": "path", - "name": "ExecutionSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the ExecutionStep resource to fetch.", + "description": "", "in": "path", - "name": "Sid", + "name": "ChannelSid", "required": true, "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", "type": "string" } } ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Identity": { + "description": "", + "type": "string" + }, + "RoleSid": { + "description": "", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + } + }, + "required": [ + "Identity" + ], + "type": "object" + } + } + } + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v1.flow.execution.execution_step" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.member" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -1857,68 +1668,57 @@ }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ "sid", - "name", + "identity", "date_created" ], - "x-path-type": "instance" + "x-path-type": "list" }, - "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context": { - "description": "JSON context for an individual step within an execution", - "get": { - "description": "Retrieve the context for an Execution Step.", + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}": { + "delete": { + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Step to fetch.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Execution resource with the Step to fetch.", + "description": "", "in": "path", - "name": "ExecutionSid", + "name": "ChannelSid", "required": true, "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Step to fetch.", + "description": "", "in": "path", - "name": "StepSid", + "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", + "pattern": "^MB[0-9a-fA-F]{32}$", "type": "string" } } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/studio.v1.flow.execution.execution_step.execution_step_context" - } - } - }, - "description": "OK" + "204": { + "description": "The resource was deleted successfully." } }, "security": [ @@ -1930,84 +1730,40 @@ "GA" ] }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "context" - ], - "x-path-type": "instance" - }, - "/v1/Flows/{FlowSid}/Executions/{Sid}": { - "delete": { - "description": "Delete the Execution and all Steps relating to it.", + "description": "TODO: Resource-level docs", + "get": { + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Execution resources to delete.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Execution resource to delete.", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "Executions of Studio flows", - "get": { - "description": "Retrieve an Execution", - "parameters": [ - { - "description": "The SID of the Flow with the Execution resource to fetch", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ChannelSid", "required": true, "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Execution resource to fetch.", + "description": "", "in": "path", "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^MB[0-9a-fA-F]{32}$", "type": "string" } } @@ -2017,7 +1773,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v1.flow.execution" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.member" } } }, @@ -2034,29 +1790,38 @@ ] }, "post": { - "description": "Update the status of an Execution to `ended`.", + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Execution resources to update.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Execution resource to update.", + "description": "", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "", "in": "path", "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^MB[0-9a-fA-F]{32}$", "type": "string" } } @@ -2066,18 +1831,19 @@ "application/x-www-form-urlencoded": { "schema": { "properties": { - "Status": { - "description": "The status of the Execution. Can only be `ended`.", - "enum": [ - "active", - "ended" - ], + "LastConsumedMessageIndex": { + "description": "", + "nullable": true, + "type": "integer" + }, + "RoleSid": { + "description": "", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" } }, - "required": [ - "Status" - ], "type": "object" } } @@ -2088,7 +1854,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v1.flow.execution" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.member" } } }, @@ -2106,104 +1872,57 @@ }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ "sid", - "contact_sid", - "status", + "identity", "date_created" ], "x-path-type": "instance" }, - "/v1/Flows/{Sid}": { - "delete": { - "description": "Delete a specific Flow.", + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages": { + "description": "TODO: Resource-level docs", + "get": { + "description": "", "parameters": [ { - "description": "The SID of the Flow resource to delete.", + "description": "", "in": "path", - "name": "Sid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "Studio flows", - "get": { - "description": "Retrieve a specific Flow.", - "parameters": [ + }, { - "description": "The SID of the Flow resource to fetch.", + "description": "", "in": "path", - "name": "Sid", + "name": "ChannelSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^CH[0-9a-fA-F]{32}$", "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/studio.v1.flow" - } - } - }, - "description": "OK" - } - }, - "security": [ + }, { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "status", - "version" - ], - "x-path-type": "instance" - }, - "/v2/Flows": { - "description": "Studio flows", - "get": { - "description": "Retrieve a list of all Flows.", - "parameters": [ + "description": "", + "in": "query", + "name": "Order", + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, { "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "in": "query", @@ -2221,9 +1940,9 @@ "application/json": { "schema": { "properties": { - "flows": { + "messages": { "items": { - "$ref": "#/components/schemas/studio.v2.flow" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.message" }, "type": "array" }, @@ -2271,41 +1990,57 @@ } ], "tags": [ - "Beta" + "GA" ] }, "post": { - "description": "Create a Flow.", + "description": "", + "parameters": [ + { + "description": "", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "properties": { - "CommitMessage": { - "description": "Description on change made in the revision.", + "Attributes": { + "description": "", "type": "string" }, - "Definition": { - "description": "JSON representation of flow definition.", - "type": "object" - }, - "FriendlyName": { - "description": "The string that you assigned to describe the Flow.", + "Body": { + "description": "", "type": "string" }, - "Status": { - "description": "The status of the Flow. Can be: `draft` or `published`.", - "enum": [ - "draft", - "published" - ], + "From": { + "description": "", "type": "string" } }, "required": [ - "FriendlyName", - "Status", - "Definition" + "Body" ], "type": "object" } @@ -2317,7 +2052,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.message" } } }, @@ -2326,61 +2061,197 @@ }, "security": [ { - "accountSid_authToken": [] + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://ip-messaging.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "from", + "to", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}": { + "delete": { + "description": "", + "parameters": [ + { + "description": "", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ + { + "description": "", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.message" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "ChannelSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IM[0-9a-fA-F]{32}$", + "type": "string" + } } ], - "tags": [ - "Beta" - ] - }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "status", - "revision" - ], - "x-path-type": "list" - }, - "/v2/Flows/Validate": { - "description": "TODO: Resource-level docs", - "post": { - "description": "", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "properties": { - "CommitMessage": { + "Attributes": { "description": "", "type": "string" }, - "Definition": { + "Body": { "description": "", - "type": "object" - }, - "FriendlyName": { - "description": "", - "type": "string" - }, - "Status": { - "description": "", - "enum": [ - "draft", - "published" - ], "type": "string" } }, - "required": [ - "FriendlyName", - "Status", - "Definition" - ], "type": "object" } } @@ -2391,7 +2262,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow_validate" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel.message" } } }, @@ -2404,113 +2275,51 @@ } ], "tags": [ - "Beta" + "GA" ] }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ - "valid" + "sid", + "from", + "to", + "date_created" ], - "x-path-type": "list" + "x-path-type": "instance" }, - "/v2/Flows/{FlowSid}/Executions": { - "description": "Executions of Studio flows", - "get": { - "description": "Retrieve a list of all Executions for the Flow.", + "/v1/Services/{ServiceSid}/Channels/{Sid}": { + "delete": { + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Execution resources to read.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.", - "in": "query", - "name": "DateCreatedFrom", - "schema": { - "format": "date-time", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.", - "in": "query", - "name": "DateCreatedTo", + "description": "", + "in": "path", + "name": "Sid", + "required": true, "schema": { - "format": "date-time", "type": "string" } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "executions": { - "items": { - "$ref": "#/components/schemas/studio.v2.flow.execution" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" + "204": { + "description": "The resource was deleted successfully." } }, "security": [ @@ -2519,62 +2328,45 @@ } ], "tags": [ - "Beta" + "GA" ] }, - "post": { - "description": "Triggers a new Execution for the Flow", + "description": "TODO: Resource-level docs", + "get": { + "description": "", "parameters": [ { - "description": "The SID of the Excecution's Flow.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "From": { - "description": "The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`.", - "type": "string" - }, - "Parameters": { - "description": "JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\"name\":\"Zeke\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \"Zeke\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string.", - "type": "object" - }, - "To": { - "description": "The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`.", - "type": "string" - } - }, - "required": [ - "To", - "From" - ], - "type": "object" - } + }, + { + "description": "", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow.execution" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel" } } }, - "description": "Created" + "description": "OK" } }, "security": [ @@ -2583,57 +2375,63 @@ } ], "tags": [ - "Beta" + "GA" ] }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "status", - "date_created" - ], - "x-path-type": "list" - }, - "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context": { - "description": "JSON context for executions", - "get": { - "description": "Retrieve the most recent context for an Execution.", + "post": { + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Execution context to fetch.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Execution context to fetch.", + "description": "", "in": "path", - "name": "ExecutionSid", + "name": "Sid", "required": true, "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", "type": "string" } } ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Attributes": { + "description": "", + "type": "string" + }, + "FriendlyName": { + "description": "", + "type": "string" + }, + "UniqueName": { + "description": "", + "type": "string" + } + }, + "type": "object" + } + } + } + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow.execution.execution_context" + "$ref": "#/components/schemas/ip_messaging.v1.service.channel" } } }, @@ -2646,45 +2444,35 @@ } ], "tags": [ - "Beta" + "GA" ] }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ - "context" + "sid", + "unique_name", + "friendly_name" ], "x-path-type": "instance" }, - "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps": { - "description": "Individual steps within an execution", + "/v1/Services/{ServiceSid}/Roles": { + "description": "TODO: Resource-level docs", "get": { - "description": "Retrieve a list of all Steps for an Execution.", + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Steps to read.", - "in": "path", - "name": "FlowSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the Execution with the Steps to read.", + "description": "", "in": "path", - "name": "ExecutionSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, @@ -2735,18 +2523,90 @@ }, "type": "object" }, - "steps": { + "roles": { "items": { - "$ref": "#/components/schemas/studio.v2.flow.execution.execution_step" + "$ref": "#/components/schemas/ip_messaging.v1.service.role" }, "type": "array" } }, - "type": "object" + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "", + "in": "path", + "name": "ServiceSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "FriendlyName": { + "description": "", + "type": "string" + }, + "Permission": { + "description": "", + "items": { + "type": "string" + }, + "type": "array" + }, + "Type": { + "description": "", + "enum": [ + "channel", + "deployment" + ], + "type": "string" + } + }, + "required": [ + "FriendlyName", + "Type", + "Permission" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ip_messaging.v1.service.role" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -2755,73 +2615,53 @@ } ], "tags": [ - "Beta" + "GA" ] }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ "sid", - "name", - "date_created" + "friendly_name", + "type" ], "x-path-type": "list" }, - "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}": { - "description": "Individual steps within an execution", - "get": { - "description": "Retrieve a Step.", + "/v1/Services/{ServiceSid}/Roles/{Sid}": { + "delete": { + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Step to fetch.", - "in": "path", - "name": "FlowSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the Execution resource with the Step to fetch.", + "description": "", "in": "path", - "name": "ExecutionSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the ExecutionStep resource to fetch.", + "description": "", "in": "path", "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" } } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/studio.v2.flow.execution.execution_step" - } - } - }, - "description": "OK" + "204": { + "description": "The resource was deleted successfully." } }, "security": [ @@ -2830,59 +2670,34 @@ } ], "tags": [ - "Beta" + "GA" ] }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "name", - "date_created" - ], - "x-path-type": "instance" - }, - "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context": { - "description": "JSON context for an individual step within an execution", + "description": "TODO: Resource-level docs", "get": { - "description": "Retrieve the context for an Execution Step.", + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Step to fetch.", - "in": "path", - "name": "FlowSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the Execution resource with the Step to fetch.", + "description": "", "in": "path", - "name": "ExecutionSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Step to fetch.", + "description": "", "in": "path", - "name": "StepSid", + "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FT[0-9a-fA-F]{32}$", + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" } } @@ -2892,7 +2707,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow.execution.execution_step.execution_step_context" + "$ref": "#/components/schemas/ip_messaging.v1.service.role" } } }, @@ -2905,51 +2720,68 @@ } ], "tags": [ - "Beta" + "GA" ] }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "context" - ], - "x-path-type": "instance" - }, - "/v2/Flows/{FlowSid}/Executions/{Sid}": { - "delete": { - "description": "Delete the Execution and all Steps relating to it.", + "post": { + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Execution resources to delete.", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Execution resource to delete.", + "description": "", "in": "path", "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" } } ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Permission": { + "description": "", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "Permission" + ], + "type": "object" + } + } + } + }, "responses": { - "204": { - "description": "The resource was deleted successfully." + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ip_messaging.v1.service.role" + } + } + }, + "description": "OK" } }, "security": [ @@ -2958,35 +2790,46 @@ } ], "tags": [ - "Beta" + "GA" ] }, - "description": "Executions of Studio flows", + "servers": [ + { + "url": "https://ip-messaging.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "type" + ], + "x-path-type": "instance" + }, + "/v1/Services/{ServiceSid}/Users": { + "description": "TODO: Resource-level docs", "get": { - "description": "Retrieve an Execution", + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Execution resource to fetch", + "description": "", "in": "path", - "name": "FlowSid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } }, { - "description": "The SID of the Execution resource to fetch.", - "in": "path", - "name": "Sid", - "required": true, + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", - "type": "string" + "maximum": 1000, + "minimum": 1, + "type": "integer" } } ], @@ -2995,7 +2838,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow.execution" + "properties": { + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "users": { + "items": { + "$ref": "#/components/schemas/ip_messaging.v1.service.user" + }, + "type": "array" + } + }, + "type": "object" } } }, @@ -3008,33 +2889,21 @@ } ], "tags": [ - "Beta" + "GA" ] }, "post": { - "description": "Update the status of an Execution to `ended`.", + "description": "", "parameters": [ { - "description": "The SID of the Flow with the Execution resources to update.", - "in": "path", - "name": "FlowSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "The SID of the Execution resource to update.", + "description": "", "in": "path", - "name": "Sid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FN[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } } @@ -3044,17 +2913,28 @@ "application/x-www-form-urlencoded": { "schema": { "properties": { - "Status": { - "description": "The status of the Execution. Can only be `ended`.", - "enum": [ - "active", - "ended" - ], + "Attributes": { + "description": "", + "type": "string" + }, + "FriendlyName": { + "description": "", + "type": "string" + }, + "Identity": { + "description": "", + "type": "string" + }, + "RoleSid": { + "description": "", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" } }, "required": [ - "Status" + "Identity" ], "type": "object" } @@ -3062,15 +2942,15 @@ } }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow.execution" + "$ref": "#/components/schemas/ip_messaging.v1.service.user" } } }, - "description": "OK" + "description": "Created" } }, "security": [ @@ -3079,34 +2959,43 @@ } ], "tags": [ - "Beta" + "GA" ] }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ "sid", - "status", + "friendly_name", "date_created" ], - "x-path-type": "instance" + "x-path-type": "list" }, - "/v2/Flows/{Sid}": { + "/v1/Services/{ServiceSid}/Users/{Sid}": { "delete": { - "description": "Delete a specific Flow.", + "description": "", "parameters": [ { - "description": "The SID of the Flow resource to delete.", + "description": "", "in": "path", - "name": "Sid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "Sid", + "required": true, + "schema": { "type": "string" } } @@ -3122,22 +3011,31 @@ } ], "tags": [ - "Beta" + "GA" ] }, - "description": "Studio flows", + "description": "TODO: Resource-level docs", "get": { - "description": "Retrieve a specific Flow.", + "description": "", "parameters": [ { - "description": "The SID of the Flow resource to fetch.", + "description": "", "in": "path", - "name": "Sid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "Sid", + "required": true, + "schema": { "type": "string" } } @@ -3147,7 +3045,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow" + "$ref": "#/components/schemas/ip_messaging.v1.service.user" } } }, @@ -3160,21 +3058,30 @@ } ], "tags": [ - "Beta" + "GA" ] }, "post": { - "description": "Update a Flow.", + "description": "", "parameters": [ { - "description": "The SID of the Flow resource to fetch.", + "description": "", "in": "path", - "name": "Sid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "Sid", + "required": true, + "schema": { "type": "string" } } @@ -3184,30 +3091,22 @@ "application/x-www-form-urlencoded": { "schema": { "properties": { - "CommitMessage": { - "description": "Description on change made in the revision.", + "Attributes": { + "description": "", "type": "string" }, - "Definition": { - "description": "JSON representation of flow definition.", - "type": "object" - }, "FriendlyName": { - "description": "The string that you assigned to describe the Flow.", + "description": "", "type": "string" }, - "Status": { - "description": "The status of the Flow. Can be: `draft` or `published`.", - "enum": [ - "draft", - "published" - ], + "RoleSid": { + "description": "", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", "type": "string" } }, - "required": [ - "Status" - ], "type": "object" } } @@ -3218,7 +3117,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow" + "$ref": "#/components/schemas/ip_messaging.v1.service.user" } } }, @@ -3231,36 +3130,44 @@ } ], "tags": [ - "Beta" + "GA" ] }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ "sid", "friendly_name", - "status", - "revision" + "date_created" ], "x-path-type": "instance" }, - "/v2/Flows/{Sid}/Revisions": { - "description": "Studio flows revisions", + "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels": { + "description": "TODO: Resource-level docs", "get": { - "description": "Retrieve a list of all Flows revisions.", + "description": "", "parameters": [ { - "description": "The SID of the Flow resource to fetch.", + "description": "", "in": "path", - "name": "Sid", + "name": "ServiceSid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "", + "in": "path", + "name": "UserSid", + "required": true, + "schema": { "type": "string" } }, @@ -3281,6 +3188,12 @@ "application/json": { "schema": { "properties": { + "channels": { + "items": { + "$ref": "#/components/schemas/ip_messaging.v1.service.user.user_channel" + }, + "type": "array" + }, "meta": { "properties": { "first_page_url": { @@ -3310,12 +3223,6 @@ } }, "type": "object" - }, - "revisions": { - "items": { - "$ref": "#/components/schemas/studio.v2.flow.flow_revision" - }, - "type": "array" } }, "type": "object" @@ -3331,59 +3238,40 @@ } ], "tags": [ - "Beta" + "GA" ] }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ - "sid", - "friendly_name", - "status", - "revision" + "channel_sid", + "status" ], "x-path-type": "list" }, - "/v2/Flows/{Sid}/Revisions/{Revision}": { - "description": "Studio flows revisions", - "get": { - "description": "Retrieve a specific Flow revision.", + "/v1/Services/{Sid}": { + "delete": { + "description": "", "parameters": [ { - "description": "The SID of the Flow resource to fetch.", + "description": "", "in": "path", "name": "Sid", "required": true, "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "Specific Revision number or can be `LatestPublished` and `LatestRevision`.", - "in": "path", - "name": "Revision", - "required": true, - "schema": { + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/studio.v2.flow.flow_revision" - } - } - }, - "description": "OK" + "204": { + "description": "The resource was deleted successfully." } }, "security": [ @@ -3392,23 +3280,9 @@ } ], "tags": [ - "Beta" + "GA" ] }, - "servers": [ - { - "url": "https://studio.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "status", - "revision" - ], - "x-path-type": "instance" - }, - "/v2/Flows/{Sid}/TestUsers": { "description": "TODO: Resource-level docs", "get": { "description": "", @@ -3421,7 +3295,7 @@ "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } } @@ -3431,7 +3305,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow.test_user" + "$ref": "#/components/schemas/ip_messaging.v1.service" } } }, @@ -3444,7 +3318,7 @@ } ], "tags": [ - "Beta" + "GA" ] }, "post": { @@ -3458,7 +3332,7 @@ "schema": { "maxLength": 34, "minLength": 34, - "pattern": "^FW[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" } } @@ -3468,17 +3342,491 @@ "application/x-www-form-urlencoded": { "schema": { "properties": { - "TestUsers": { + "ConsumptionReportInterval": { + "description": "", + "type": "integer" + }, + "DefaultChannelCreatorRoleSid": { + "description": "", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "DefaultChannelRoleSid": { + "description": "", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "DefaultServiceRoleSid": { + "description": "", + "maxLength": 34, + "minLength": 34, + "pattern": "^RL[0-9a-fA-F]{32}$", + "type": "string" + }, + "FriendlyName": { + "description": "", + "type": "string" + }, + "Limits.ChannelMembers": { + "description": "", + "type": "integer" + }, + "Limits.UserChannels": { + "description": "", + "type": "integer" + }, + "Notifications.AddedToChannel.Enabled": { + "description": "", + "type": "boolean" + }, + "Notifications.AddedToChannel.Template": { + "description": "", + "type": "string" + }, + "Notifications.InvitedToChannel.Enabled": { + "description": "", + "type": "boolean" + }, + "Notifications.InvitedToChannel.Template": { + "description": "", + "type": "string" + }, + "Notifications.NewMessage.Enabled": { + "description": "", + "type": "boolean" + }, + "Notifications.NewMessage.Template": { + "description": "", + "type": "string" + }, + "Notifications.RemovedFromChannel.Enabled": { + "description": "", + "type": "boolean" + }, + "Notifications.RemovedFromChannel.Template": { + "description": "", + "type": "string" + }, + "PostWebhookUrl": { + "description": "", + "format": "uri", + "type": "string" + }, + "PreWebhookUrl": { + "description": "", + "format": "uri", + "type": "string" + }, + "ReachabilityEnabled": { + "description": "", + "type": "boolean" + }, + "ReadStatusEnabled": { + "description": "", + "type": "boolean" + }, + "TypingIndicatorTimeout": { + "description": "", + "type": "integer" + }, + "WebhookFilters": { "description": "", "items": { "type": "string" }, "type": "array" + }, + "WebhookMethod": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelAdd.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelAdd.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnChannelAdded.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelAdded.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnChannelDestroy.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelDestroy.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnChannelDestroyed.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelDestroyed.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnChannelUpdate.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelUpdate.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnChannelUpdated.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnChannelUpdated.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMemberAdd.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMemberAdd.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMemberAdded.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMemberAdded.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMemberRemove.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMemberRemove.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMemberRemoved.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMemberRemoved.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageRemove.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageRemove.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageRemoved.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageRemoved.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageSend.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageSend.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageSent.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageSent.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageUpdate.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageUpdate.Url": { + "description": "", + "format": "uri", + "type": "string" + }, + "Webhooks.OnMessageUpdated.Method": { + "description": "", + "enum": [ + "head", + "get", + "post", + "patch", + "put", + "delete", + "HEAD", + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], + "type": "string" + }, + "Webhooks.OnMessageUpdated.Url": { + "description": "", + "format": "uri", + "type": "string" } }, - "required": [ - "TestUsers" - ], "type": "object" } } @@ -3489,7 +3837,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/studio.v2.flow.test_user" + "$ref": "#/components/schemas/ip_messaging.v1.service" } } }, @@ -3502,16 +3850,18 @@ } ], "tags": [ - "Beta" + "GA" ] }, "servers": [ { - "url": "https://studio.twilio.com" + "url": "https://ip-messaging.twilio.com" } ], "x-default-output-properties": [ - "test_users" + "sid", + "friendly_name", + "date_created" ], "x-path-type": "instance" } @@ -3520,10 +3870,6 @@ { "description": "This product is Generally Available.", "name": "GA" - }, - { - "description": "PLEASE NOTE that this is a Beta product that is subject to change. Use it with caution.", - "name": "Beta" } ] } \ No newline at end of file diff --git a/src/services/twilio-api/twilio_ip_messaging.json b/src/services/twilio-api/twilio_ip_messaging_v2.json similarity index 56% rename from src/services/twilio-api/twilio_ip_messaging.json rename to src/services/twilio-api/twilio_ip_messaging_v2.json index a72416e1..e5919c27 100644 --- a/src/services/twilio-api/twilio_ip_messaging.json +++ b/src/services/twilio-api/twilio_ip_messaging_v2.json @@ -1,7 +1,7 @@ { "components": { "schemas": { - "ip_messaging.v1.credential": { + "ip_messaging.v2.credential": { "properties": { "account_sid": { "maxLength": 34, @@ -44,7 +44,7 @@ }, "type": "object" }, - "ip_messaging.v1.service": { + "ip_messaging.v2.service": { "properties": { "account_sid": { "maxLength": 34, @@ -90,12 +90,21 @@ "links": { "type": "object" }, + "media": { + "type": "object" + }, "notifications": { "type": "object" }, + "post_webhook_retry_count": { + "type": "integer" + }, "post_webhook_url": { "type": "string" }, + "pre_webhook_retry_count": { + "type": "integer" + }, "pre_webhook_url": { "type": "string" }, @@ -126,14 +135,75 @@ }, "webhook_method": { "type": "string" + } + }, + "type": "object" + }, + "ip_messaging.v2.service.binding": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "binding_type": { + "enum": [ + "gcm", + "apn", + "fcm" + ], + "type": "string" + }, + "credential_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CR[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "identity": { + "type": "string" }, - "webhooks": { + "links": { "type": "object" + }, + "message_types": { + "items": { + "type": "string" + }, + "type": "array" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^BS[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" } }, "type": "object" }, - "ip_messaging.v1.service.channel": { + "ip_messaging.v2.service.channel": { "properties": { "account_sid": { "maxLength": 34, @@ -196,7 +266,54 @@ }, "type": "object" }, - "ip_messaging.v1.service.channel.invite": { + "ip_messaging.v2.service.channel.channel_webhook": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "channel_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", + "type": "string" + }, + "configuration": { + "type": "object" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "service_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^IS[0-9a-fA-F]{32}$", + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^WH[0-9a-fA-F]{32}$", + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "ip_messaging.v2.service.channel.invite": { "properties": { "account_sid": { "maxLength": 34, @@ -249,7 +366,7 @@ }, "type": "object" }, - "ip_messaging.v1.service.channel.member": { + "ip_messaging.v2.service.channel.member": { "properties": { "account_sid": { "maxLength": 34, @@ -257,6 +374,9 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, + "attributes": { + "type": "string" + }, "channel_sid": { "maxLength": 34, "minLength": 34, @@ -307,7 +427,7 @@ }, "type": "object" }, - "ip_messaging.v1.service.channel.message": { + "ip_messaging.v2.service.channel.message": { "properties": { "account_sid": { "maxLength": 34, @@ -341,6 +461,12 @@ "index": { "type": "integer" }, + "last_updated_by": { + "type": "string" + }, + "media": { + "type": "object" + }, "service_sid": { "maxLength": 34, "minLength": 34, @@ -359,6 +485,9 @@ "pattern": "^CH[0-9a-fA-F]{32}$", "type": "string" }, + "type": { + "type": "string" + }, "url": { "format": "uri", "type": "string" @@ -369,7 +498,7 @@ }, "type": "object" }, - "ip_messaging.v1.service.role": { + "ip_messaging.v2.service.role": { "properties": { "account_sid": { "maxLength": 34, @@ -420,7 +549,7 @@ }, "type": "object" }, - "ip_messaging.v1.service.user": { + "ip_messaging.v2.service.user": { "properties": { "account_sid": { "maxLength": 34, @@ -482,7 +611,7 @@ }, "type": "object" }, - "ip_messaging.v1.service.user.user_channel": { + "ip_messaging.v2.service.user.user_binding": { "properties": { "account_sid": { "maxLength": 34, @@ -490,52 +619,18 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "last_consumed_message_index": { - "nullable": true, - "type": "integer" - }, - "links": { - "type": "object" - }, - "member_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "status": { + "binding_type": { "enum": [ - "joined", - "invited", - "not_participating" + "gcm", + "apn", + "fcm" ], "type": "string" }, - "unread_messages_count": { - "nullable": true, - "type": "integer" - } - }, - "type": "object" - }, - "ip_messaging.v2.credential": { - "properties": { - "account_sid": { + "credential_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", + "pattern": "^CR[0-9a-fA-F]{32}$", "type": "string" }, "date_created": { @@ -546,34 +641,44 @@ "format": "date-time", "type": "string" }, - "friendly_name": { + "endpoint": { "type": "string" }, - "sandbox": { + "identity": { "type": "string" }, - "sid": { + "message_types": { + "items": { + "type": "string" + }, + "type": "array" + }, + "service_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, - "type": { - "enum": [ - "gcm", - "apn", - "fcm" - ], + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^BS[0-9a-fA-F]{32}$", "type": "string" }, "url": { "format": "uri", "type": "string" + }, + "user_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^US[0-9a-fA-F]{32}$", + "type": "string" } }, "type": "object" }, - "ip_messaging.v2.service": { + "ip_messaging.v2.service.user.user_channel": { "properties": { "account_sid": { "maxLength": 34, @@ -581,4032 +686,88 @@ "pattern": "^AC[0-9a-fA-F]{32}$", "type": "string" }, - "consumption_report_interval": { - "type": "integer" - }, - "date_created": { - "format": "date-time", + "channel_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^CH[0-9a-fA-F]{32}$", "type": "string" }, - "date_updated": { - "format": "date-time", - "type": "string" + "last_consumed_message_index": { + "nullable": true, + "type": "integer" }, - "default_channel_creator_role_sid": { + "links": { + "type": "object" + }, + "member_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", + "pattern": "^MB[0-9a-fA-F]{32}$", "type": "string" }, - "default_channel_role_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", + "notification_level": { + "enum": [ + "default", + "muted" + ], "type": "string" }, - "default_service_role_sid": { + "service_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "friendly_name": { + "pattern": "^IS[0-9a-fA-F]{32}$", "type": "string" }, - "limits": { - "type": "object" - }, - "links": { - "type": "object" - }, - "media": { - "type": "object" - }, - "notifications": { - "type": "object" - }, - "post_webhook_retry_count": { - "type": "integer" - }, - "post_webhook_url": { - "type": "string" - }, - "pre_webhook_retry_count": { - "type": "integer" - }, - "pre_webhook_url": { - "type": "string" - }, - "reachability_enabled": { - "type": "boolean" - }, - "read_status_enabled": { - "type": "boolean" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "typing_indicator_timeout": { - "type": "integer" - }, - "url": { - "format": "uri", - "type": "string" - }, - "webhook_filters": { - "items": { - "type": "string" - }, - "type": "array" - }, - "webhook_method": { - "type": "string" - } - }, - "type": "object" - }, - "ip_messaging.v2.service.binding": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "binding_type": { + "status": { "enum": [ - "gcm", - "apn", - "fcm" + "joined", + "invited", + "not_participating" ], "type": "string" }, - "credential_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "endpoint": { - "type": "string" - }, - "identity": { - "type": "string" - }, - "links": { - "type": "object" - }, - "message_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^BS[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "ip_messaging.v2.service.channel": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "attributes": { - "type": "string" - }, - "created_by": { - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "friendly_name": { - "type": "string" - }, - "links": { - "type": "object" - }, - "members_count": { - "type": "integer" - }, - "messages_count": { + "unread_messages_count": { + "nullable": true, "type": "integer" }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "type": { - "enum": [ - "public", - "private" - ], - "type": "string" - }, - "unique_name": { - "type": "string" - }, "url": { "format": "uri", "type": "string" - } - }, - "type": "object" - }, - "ip_messaging.v2.service.channel.channel_webhook": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "configuration": { - "type": "object" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" }, - "sid": { + "user_sid": { "maxLength": 34, "minLength": 34, - "pattern": "^WH[0-9a-fA-F]{32}$", - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "format": "uri", + "pattern": "^US[0-9a-fA-F]{32}$", "type": "string" } }, "type": "object" - }, - "ip_messaging.v2.service.channel.invite": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "created_by": { - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "identity": { - "type": "string" - }, - "role_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IN[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "ip_messaging.v2.service.channel.member": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "attributes": { - "type": "string" - }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "identity": { - "type": "string" - }, - "last_consumed_message_index": { - "nullable": true, - "type": "integer" - }, - "last_consumption_timestamp": { - "format": "date-time", - "type": "string" - }, - "role_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "ip_messaging.v2.service.channel.message": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "attributes": { - "type": "string" - }, - "body": { - "type": "string" - }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "from": { - "type": "string" - }, - "index": { - "type": "integer" - }, - "last_updated_by": { - "type": "string" - }, - "media": { - "type": "object" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IM[0-9a-fA-F]{32}$", - "type": "string" - }, - "to": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "type": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - }, - "was_edited": { - "type": "boolean" - } - }, - "type": "object" - }, - "ip_messaging.v2.service.role": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "friendly_name": { - "type": "string" - }, - "permissions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "type": { - "enum": [ - "channel", - "deployment" - ], - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "ip_messaging.v2.service.user": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "attributes": { - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "friendly_name": { - "type": "string" - }, - "identity": { - "type": "string" - }, - "is_notifiable": { - "type": "boolean" - }, - "is_online": { - "type": "boolean" - }, - "joined_channels_count": { - "type": "integer" - }, - "links": { - "type": "object" - }, - "role_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^US[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "ip_messaging.v2.service.user.user_binding": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "binding_type": { - "enum": [ - "gcm", - "apn", - "fcm" - ], - "type": "string" - }, - "credential_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", - "type": "string" - }, - "date_created": { - "format": "date-time", - "type": "string" - }, - "date_updated": { - "format": "date-time", - "type": "string" - }, - "endpoint": { - "type": "string" - }, - "identity": { - "type": "string" - }, - "message_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^BS[0-9a-fA-F]{32}$", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - }, - "user_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^US[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "type": "object" - }, - "ip_messaging.v2.service.user.user_channel": { - "properties": { - "account_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^AC[0-9a-fA-F]{32}$", - "type": "string" - }, - "channel_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - }, - "last_consumed_message_index": { - "nullable": true, - "type": "integer" - }, - "links": { - "type": "object" - }, - "member_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - }, - "notification_level": { - "enum": [ - "default", - "muted" - ], - "type": "string" - }, - "service_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - }, - "status": { - "enum": [ - "joined", - "invited", - "not_participating" - ], - "type": "string" - }, - "unread_messages_count": { - "nullable": true, - "type": "integer" - }, - "url": { - "format": "uri", - "type": "string" - }, - "user_sid": { - "maxLength": 34, - "minLength": 34, - "pattern": "^US[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "type": "object" - } - }, - "securitySchemes": { - "accountSid_authToken": { - "scheme": "basic", - "type": "http" - } - } - }, - "info": { - "contact": { - "email": "support@twilio.com", - "name": "Twilio Support", - "url": "https://support.twilio.com" - }, - "description": "This is the public Twilio REST API.", - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "termsOfService": "https://www.twilio.com/legal/tos", - "title": "Twilio - Ip_messaging", - "version": "5.12.0" - }, - "openapi": "3.0.1", - "paths": { - "/v1/Credentials": { - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "credentials": { - "items": { - "$ref": "#/components/schemas/ip_messaging.v1.credential" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "ApiKey": { - "description": "", - "type": "string" - }, - "Certificate": { - "description": "", - "type": "string" - }, - "FriendlyName": { - "description": "", - "type": "string" - }, - "PrivateKey": { - "description": "", - "type": "string" - }, - "Sandbox": { - "description": "", - "type": "boolean" - }, - "Secret": { - "description": "", - "type": "string" - }, - "Type": { - "description": "", - "enum": [ - "gcm", - "apn", - "fcm" - ], - "type": "string" - } - }, - "required": [ - "Type" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.credential" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "type" - ], - "x-path-type": "list" - }, - "/v1/Credentials/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.credential" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CR[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "ApiKey": { - "description": "", - "type": "string" - }, - "Certificate": { - "description": "", - "type": "string" - }, - "FriendlyName": { - "description": "", - "type": "string" - }, - "PrivateKey": { - "description": "", - "type": "string" - }, - "Sandbox": { - "description": "", - "type": "boolean" - }, - "Secret": { - "description": "", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.credential" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "type" - ], - "x-path-type": "instance" - }, - "/v1/Services": { - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "services": { - "items": { - "$ref": "#/components/schemas/ip_messaging.v1.service" - }, - "type": "array" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "FriendlyName": { - "description": "", - "type": "string" - } - }, - "required": [ - "FriendlyName" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Channels": { - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "query", - "name": "Type", - "schema": { - "items": { - "enum": [ - "public", - "private" - ], - "type": "string" - }, - "type": "array" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "channels": { - "items": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "", - "type": "string" - }, - "FriendlyName": { - "description": "", - "type": "string" - }, - "Type": { - "description": "", - "enum": [ - "public", - "private" - ], - "type": "string" - }, - "UniqueName": { - "description": "", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "unique_name", - "friendly_name" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites": { - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "", - "in": "query", - "name": "Identity", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "invites": { - "items": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.invite" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Identity": { - "description": "", - "type": "string" - }, - "RoleSid": { - "description": "", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "required": [ - "Identity" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.invite" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "identity", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IN[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IN[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.invite" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "identity", - "date_created" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members": { - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "", - "in": "query", - "name": "Identity", - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "members": { - "items": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.member" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Identity": { - "description": "", - "type": "string" - }, - "RoleSid": { - "description": "", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "required": [ - "Identity" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.member" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "identity", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.member" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^MB[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "LastConsumedMessageIndex": { - "description": "", - "nullable": true, - "type": "integer" - }, - "RoleSid": { - "description": "", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.member" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "identity", - "date_created" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages": { - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "query", - "name": "Order", - "schema": { - "enum": [ - "asc", - "desc" - ], - "type": "string" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "messages": { - "items": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.message" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "", - "type": "string" - }, - "Body": { - "description": "", - "type": "string" - }, - "From": { - "description": "", - "type": "string" - } - }, - "required": [ - "Body" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.message" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "from", - "to", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IM[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IM[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.message" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "ChannelSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^CH[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IM[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "", - "type": "string" - }, - "Body": { - "description": "", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel.message" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "from", - "to", - "date_created" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Channels/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "", - "type": "string" - }, - "FriendlyName": { - "description": "", - "type": "string" - }, - "UniqueName": { - "description": "", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.channel" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "unique_name", - "friendly_name" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Roles": { - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "roles": { - "items": { - "$ref": "#/components/schemas/ip_messaging.v1.service.role" - }, - "type": "array" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "FriendlyName": { - "description": "", - "type": "string" - }, - "Permission": { - "description": "", - "items": { - "type": "string" - }, - "type": "array" - }, - "Type": { - "description": "", - "enum": [ - "channel", - "deployment" - ], - "type": "string" - } - }, - "required": [ - "FriendlyName", - "Type", - "Permission" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.role" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "type" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Roles/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.role" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Permission": { - "description": "", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "Permission" - ], - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.role" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "type" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Users": { - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "users": { - "items": { - "$ref": "#/components/schemas/ip_messaging.v1.service.user" - }, - "type": "array" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "", - "type": "string" - }, - "FriendlyName": { - "description": "", - "type": "string" - }, - "Identity": { - "description": "", - "type": "string" - }, - "RoleSid": { - "description": "", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "required": [ - "Identity" - ], - "type": "object" - } - } - } - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.user" - } - } - }, - "description": "Created" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "date_created" - ], - "x-path-type": "list" - }, - "/v1/Services/{ServiceSid}/Users/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.user" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "Attributes": { - "description": "", - "type": "string" - }, - "FriendlyName": { - "description": "", - "type": "string" - }, - "RoleSid": { - "description": "", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service.user" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "date_created" - ], - "x-path-type": "instance" - }, - "/v1/Services/{ServiceSid}/Users/{UserSid}/Channels": { - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "ServiceSid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - }, - { - "description": "", - "in": "path", - "name": "UserSid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "channels": { - "items": { - "$ref": "#/components/schemas/ip_messaging.v1.service.user.user_channel" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "channel_sid", - "status" - ], - "x-path-type": "list" - }, - "/v1/Services/{Sid}": { - "delete": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The resource was deleted successfully." - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "description": "TODO: Resource-level docs", - "get": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "post": { - "description": "", - "parameters": [ - { - "description": "", - "in": "path", - "name": "Sid", - "required": true, - "schema": { - "maxLength": 34, - "minLength": 34, - "pattern": "^IS[0-9a-fA-F]{32}$", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "properties": { - "ConsumptionReportInterval": { - "description": "", - "type": "integer" - }, - "DefaultChannelCreatorRoleSid": { - "description": "", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "DefaultChannelRoleSid": { - "description": "", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "DefaultServiceRoleSid": { - "description": "", - "maxLength": 34, - "minLength": 34, - "pattern": "^RL[0-9a-fA-F]{32}$", - "type": "string" - }, - "FriendlyName": { - "description": "", - "type": "string" - }, - "Limits.ChannelMembers": { - "description": "", - "type": "integer" - }, - "Limits.UserChannels": { - "description": "", - "type": "integer" - }, - "Notifications.AddedToChannel.Enabled": { - "description": "", - "type": "boolean" - }, - "Notifications.AddedToChannel.Template": { - "description": "", - "type": "string" - }, - "Notifications.InvitedToChannel.Enabled": { - "description": "", - "type": "boolean" - }, - "Notifications.InvitedToChannel.Template": { - "description": "", - "type": "string" - }, - "Notifications.NewMessage.Enabled": { - "description": "", - "type": "boolean" - }, - "Notifications.NewMessage.Template": { - "description": "", - "type": "string" - }, - "Notifications.RemovedFromChannel.Enabled": { - "description": "", - "type": "boolean" - }, - "Notifications.RemovedFromChannel.Template": { - "description": "", - "type": "string" - }, - "PostWebhookUrl": { - "description": "", - "format": "uri", - "type": "string" - }, - "PreWebhookUrl": { - "description": "", - "format": "uri", - "type": "string" - }, - "ReachabilityEnabled": { - "description": "", - "type": "boolean" - }, - "ReadStatusEnabled": { - "description": "", - "type": "boolean" - }, - "TypingIndicatorTimeout": { - "description": "", - "type": "integer" - }, - "WebhookFilters": { - "description": "", - "items": { - "type": "string" - }, - "type": "array" - }, - "WebhookMethod": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelAdd.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelAdd.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnChannelAdded.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelAdded.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnChannelDestroy.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelDestroy.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnChannelDestroyed.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelDestroyed.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnChannelUpdate.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelUpdate.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnChannelUpdated.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnChannelUpdated.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMemberAdd.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMemberAdd.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMemberAdded.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMemberAdded.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMemberRemove.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMemberRemove.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMemberRemoved.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMemberRemoved.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageRemove.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageRemove.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageRemoved.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageRemoved.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageSend.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageSend.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageSent.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageSent.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageUpdate.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageUpdate.Url": { - "description": "", - "format": "uri", - "type": "string" - }, - "Webhooks.OnMessageUpdated.Method": { - "description": "", - "enum": [ - "head", - "get", - "post", - "patch", - "put", - "delete", - "HEAD", - "GET", - "POST", - "PATCH", - "PUT", - "DELETE" - ], - "type": "string" - }, - "Webhooks.OnMessageUpdated.Url": { - "description": "", - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ip_messaging.v1.service" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://ip-messaging.twilio.com" - } - ], - "x-default-output-properties": [ - "sid", - "friendly_name", - "date_created" - ], - "x-path-type": "instance" + } + }, + "securitySchemes": { + "accountSid_authToken": { + "scheme": "basic", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "support@twilio.com", + "name": "Twilio Support", + "url": "https://support.twilio.com" + }, + "description": "This is the public Twilio REST API.", + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, + "termsOfService": "https://www.twilio.com/legal/tos", + "title": "Twilio - Ip_messaging", + "version": "5.12.0" + }, + "openapi": "3.0.1", + "paths": { "/v2/Credentials": { "description": "TODO: Resource-level docs", "get": { diff --git a/src/services/twilio-api/twilio_lookups.json b/src/services/twilio-api/twilio_lookups_v1.json similarity index 100% rename from src/services/twilio-api/twilio_lookups.json rename to src/services/twilio-api/twilio_lookups_v1.json diff --git a/src/services/twilio-api/twilio_messaging.json b/src/services/twilio-api/twilio_messaging_v1.json similarity index 100% rename from src/services/twilio-api/twilio_messaging.json rename to src/services/twilio-api/twilio_messaging_v1.json diff --git a/src/services/twilio-api/twilio_monitor.json b/src/services/twilio-api/twilio_monitor_v1.json similarity index 100% rename from src/services/twilio-api/twilio_monitor.json rename to src/services/twilio-api/twilio_monitor_v1.json diff --git a/src/services/twilio-api/twilio_notify.json b/src/services/twilio-api/twilio_notify_v1.json similarity index 100% rename from src/services/twilio-api/twilio_notify.json rename to src/services/twilio-api/twilio_notify_v1.json diff --git a/src/services/twilio-api/twilio_numbers.json b/src/services/twilio-api/twilio_numbers_v2.json similarity index 100% rename from src/services/twilio-api/twilio_numbers.json rename to src/services/twilio-api/twilio_numbers_v2.json diff --git a/src/services/twilio-api/twilio_pricing.json b/src/services/twilio-api/twilio_pricing_v1.json similarity index 68% rename from src/services/twilio-api/twilio_pricing.json rename to src/services/twilio-api/twilio_pricing_v1.json index a2755e5a..180048a9 100644 --- a/src/services/twilio-api/twilio_pricing.json +++ b/src/services/twilio-api/twilio_pricing_v1.json @@ -298,158 +298,6 @@ } }, "type": "object" - }, - "pricing.v2.voice": { - "properties": { - "links": { - "type": "object" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "pricing.v2.voice.voice_country": { - "properties": { - "country": { - "type": "string" - }, - "iso_country": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "pricing.v2.voice.voice_country|instance": { - "properties": { - "country": { - "type": "string" - }, - "inbound_call_prices": { - "items": { - "properties": { - "base_price": { - "type": "number" - }, - "current_price": { - "type": "number" - }, - "number_type": { - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "iso_country": { - "type": "string" - }, - "outbound_prefix_prices": { - "items": { - "properties": { - "base_price": { - "type": "number" - }, - "current_price": { - "type": "number" - }, - "destination_prefixes": { - "items": { - "type": "string" - }, - "type": "array" - }, - "friendly_name": { - "type": "string" - }, - "origination_prefixes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "type": "array" - }, - "price_unit": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - }, - "pricing.v2.voice.voice_number": { - "properties": { - "country": { - "type": "string" - }, - "destination_number": { - "type": "string" - }, - "inbound_call_price": { - "properties": { - "base_price": { - "type": "number" - }, - "current_price": { - "type": "number" - }, - "number_type": { - "type": "string" - } - }, - "type": "object" - }, - "iso_country": { - "type": "string" - }, - "origination_number": { - "type": "string" - }, - "outbound_call_prices": { - "items": { - "properties": { - "base_price": { - "type": "number" - }, - "current_price": { - "type": "number" - }, - "origination_prefixes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "type": "array" - }, - "price_unit": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" } }, "securitySchemes": { @@ -927,195 +775,6 @@ "price_unit" ], "x-path-type": "instance" - }, - "/v2/Voice/Countries": { - "description": "Voice pricing by country", - "get": { - "description": "", - "parameters": [ - { - "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", - "in": "query", - "name": "PageSize", - "schema": { - "maximum": 1000, - "minimum": 1, - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "properties": { - "countries": { - "items": { - "$ref": "#/components/schemas/pricing.v2.voice.voice_country" - }, - "type": "array" - }, - "meta": { - "properties": { - "first_page_url": { - "format": "uri", - "type": "string" - }, - "key": { - "type": "string" - }, - "next_page_url": { - "format": "uri", - "type": "string" - }, - "page": { - "type": "integer" - }, - "page_size": { - "type": "integer" - }, - "previous_page_url": { - "format": "uri", - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://pricing.twilio.com" - } - ], - "x-default-output-properties": [ - "country", - "price_unit" - ], - "x-path-type": "list" - }, - "/v2/Voice/Countries/{IsoCountry}": { - "description": "Voice pricing by country", - "get": { - "description": "Fetch a specific Country.", - "parameters": [ - { - "description": "The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch.", - "in": "path", - "name": "IsoCountry", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pricing.v2.voice.voice_country|instance" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://pricing.twilio.com" - } - ], - "x-default-output-properties": [ - "country", - "price_unit" - ], - "x-path-type": "instance" - }, - "/v2/Voice/Numbers/{DestinationNumber}": { - "description": "Voice pricing for a specific phone number", - "get": { - "description": "Fetch pricing information for a specific destination and, optionally, origination phone number.", - "parameters": [ - { - "description": "The destination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.", - "in": "path", - "name": "DestinationNumber", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.", - "in": "query", - "name": "OriginationNumber", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pricing.v2.voice.voice_number" - } - } - }, - "description": "OK" - } - }, - "security": [ - { - "accountSid_authToken": [] - } - ], - "tags": [ - "GA" - ] - }, - "servers": [ - { - "url": "https://pricing.twilio.com" - } - ], - "x-default-output-properties": [ - "country", - "inbound_call_price", - "price_unit" - ], - "x-path-type": "instance" } }, "tags": [ diff --git a/src/services/twilio-api/twilio_pricing_v2.json b/src/services/twilio-api/twilio_pricing_v2.json new file mode 100644 index 00000000..e30ad1f6 --- /dev/null +++ b/src/services/twilio-api/twilio_pricing_v2.json @@ -0,0 +1,377 @@ +{ + "components": { + "schemas": { + "pricing.v2.voice": { + "properties": { + "links": { + "type": "object" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "pricing.v2.voice.voice_country": { + "properties": { + "country": { + "type": "string" + }, + "iso_country": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "pricing.v2.voice.voice_country|instance": { + "properties": { + "country": { + "type": "string" + }, + "inbound_call_prices": { + "items": { + "properties": { + "base_price": { + "type": "number" + }, + "current_price": { + "type": "number" + }, + "number_type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "iso_country": { + "type": "string" + }, + "outbound_prefix_prices": { + "items": { + "properties": { + "base_price": { + "type": "number" + }, + "current_price": { + "type": "number" + }, + "destination_prefixes": { + "items": { + "type": "string" + }, + "type": "array" + }, + "friendly_name": { + "type": "string" + }, + "origination_prefixes": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "price_unit": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "pricing.v2.voice.voice_number": { + "properties": { + "country": { + "type": "string" + }, + "destination_number": { + "type": "string" + }, + "inbound_call_price": { + "properties": { + "base_price": { + "type": "number" + }, + "current_price": { + "type": "number" + }, + "number_type": { + "type": "string" + } + }, + "type": "object" + }, + "iso_country": { + "type": "string" + }, + "origination_number": { + "type": "string" + }, + "outbound_call_prices": { + "items": { + "properties": { + "base_price": { + "type": "number" + }, + "current_price": { + "type": "number" + }, + "origination_prefixes": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "price_unit": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "securitySchemes": { + "accountSid_authToken": { + "scheme": "basic", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "support@twilio.com", + "name": "Twilio Support", + "url": "https://support.twilio.com" + }, + "description": "This is the public Twilio REST API.", + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "https://www.twilio.com/legal/tos", + "title": "Twilio - Pricing", + "version": "5.12.0" + }, + "openapi": "3.0.1", + "paths": { + "/v2/Voice/Countries": { + "description": "Voice pricing by country", + "get": { + "description": "", + "parameters": [ + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "countries": { + "items": { + "$ref": "#/components/schemas/pricing.v2.voice.voice_country" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://pricing.twilio.com" + } + ], + "x-default-output-properties": [ + "country", + "price_unit" + ], + "x-path-type": "list" + }, + "/v2/Voice/Countries/{IsoCountry}": { + "description": "Voice pricing by country", + "get": { + "description": "Fetch a specific Country.", + "parameters": [ + { + "description": "The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch.", + "in": "path", + "name": "IsoCountry", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pricing.v2.voice.voice_country|instance" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://pricing.twilio.com" + } + ], + "x-default-output-properties": [ + "country", + "price_unit" + ], + "x-path-type": "instance" + }, + "/v2/Voice/Numbers/{DestinationNumber}": { + "description": "Voice pricing for a specific phone number", + "get": { + "description": "Fetch pricing information for a specific destination and, optionally, origination phone number.", + "parameters": [ + { + "description": "The destination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.", + "in": "path", + "name": "DestinationNumber", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.", + "in": "query", + "name": "OriginationNumber", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pricing.v2.voice.voice_number" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://pricing.twilio.com" + } + ], + "x-default-output-properties": [ + "country", + "inbound_call_price", + "price_unit" + ], + "x-path-type": "instance" + } + }, + "tags": [ + { + "description": "This product is Generally Available.", + "name": "GA" + } + ] +} \ No newline at end of file diff --git a/src/services/twilio-api/twilio_proxy.json b/src/services/twilio-api/twilio_proxy_v1.json similarity index 100% rename from src/services/twilio-api/twilio_proxy.json rename to src/services/twilio-api/twilio_proxy_v1.json diff --git a/src/services/twilio-api/twilio_serverless.json b/src/services/twilio-api/twilio_serverless_v1.json similarity index 100% rename from src/services/twilio-api/twilio_serverless.json rename to src/services/twilio-api/twilio_serverless_v1.json diff --git a/src/services/twilio-api/twilio_studio_v1.json b/src/services/twilio-api/twilio_studio_v1.json new file mode 100644 index 00000000..d0886428 --- /dev/null +++ b/src/services/twilio-api/twilio_studio_v1.json @@ -0,0 +1,1880 @@ +{ + "components": { + "schemas": { + "studio.v1.flow": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "friendly_name": { + "type": "string" + }, + "links": { + "type": "object" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "status": { + "enum": [ + "draft", + "published" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "version": { + "type": "integer" + } + }, + "type": "object" + }, + "studio.v1.flow.engagement": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "contact_channel_address": { + "type": "string" + }, + "contact_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "links": { + "type": "object" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "status": { + "enum": [ + "active", + "ended" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v1.flow.engagement.engagement_context": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "engagement_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v1.flow.engagement.step": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "engagement_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "links": { + "type": "object" + }, + "name": { + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + }, + "transitioned_from": { + "type": "string" + }, + "transitioned_to": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v1.flow.engagement.step.step_context": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "engagement_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "step_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v1.flow.execution": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "contact_channel_address": { + "type": "string" + }, + "contact_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "links": { + "type": "object" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "status": { + "enum": [ + "active", + "ended" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v1.flow.execution.execution_context": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "execution_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v1.flow.execution.execution_step": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "execution_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "links": { + "type": "object" + }, + "name": { + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + }, + "transitioned_from": { + "type": "string" + }, + "transitioned_to": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v1.flow.execution.execution_step.execution_step_context": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "execution_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "step_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "securitySchemes": { + "accountSid_authToken": { + "scheme": "basic", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "support@twilio.com", + "name": "Twilio Support", + "url": "https://support.twilio.com" + }, + "description": "This is the public Twilio REST API.", + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "https://www.twilio.com/legal/tos", + "title": "Twilio - Studio", + "version": "5.12.0" + }, + "openapi": "3.0.1", + "paths": { + "/v1/Flows": { + "description": "Studio flows", + "get": { + "description": "Retrieve a list of all Flows.", + "parameters": [ + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "flows": { + "items": { + "$ref": "#/components/schemas/studio.v1.flow" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "status", + "version" + ], + "x-path-type": "list" + }, + "/v1/Flows/{FlowSid}/Engagements": { + "description": "[DEPRECATED] Excecutions of Studio flows", + "get": { + "description": "Retrieve a list of all Engagements for the Flow.", + "parameters": [ + { + "description": "The SID of the Flow to read Engagements from.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "engagements": { + "items": { + "$ref": "#/components/schemas/studio.v1.flow.engagement" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "Triggers a new Engagement for the Flow", + "parameters": [ + { + "description": "The SID of the Flow.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "From": { + "description": "The Twilio phone number to send messages or initiate calls from during the Flow Engagement. Available as variable `{{flow.channel.address}}`", + "type": "string" + }, + "Parameters": { + "description": "A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string.", + "type": "object" + }, + "To": { + "description": "The Contact phone number to start a Studio Flow Engagement, available as variable `{{contact.channel.address}}`.", + "type": "string" + } + }, + "required": [ + "To", + "From" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.engagement" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "contact_sid", + "status", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Context": { + "description": "[DEPRECATED] JSON context for engagements", + "get": { + "description": "Retrieve the most recent context for an Engagement.", + "parameters": [ + { + "description": "The SID of the Flow.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Engagement.", + "in": "path", + "name": "EngagementSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.engagement.engagement_context" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "context" + ], + "x-path-type": "instance" + }, + "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps": { + "description": "Steps within a Studio flow", + "get": { + "description": "Retrieve a list of all Steps for an Engagement.", + "parameters": [ + { + "description": "The SID of the Flow with the Step to read.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Engagement with the Step to read.", + "in": "path", + "name": "EngagementSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "steps": { + "items": { + "$ref": "#/components/schemas/studio.v1.flow.engagement.step" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "name", + "transitioned_from", + "transitioned_to" + ], + "x-path-type": "list" + }, + "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{Sid}": { + "description": "Steps within a Studio flow", + "get": { + "description": "Retrieve a Step.", + "parameters": [ + { + "description": "The SID of the Flow with the Step to fetch.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Engagement with the Step to fetch.", + "in": "path", + "name": "EngagementSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Step resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.engagement.step" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "name", + "transitioned_from", + "transitioned_to" + ], + "x-path-type": "instance" + }, + "/v1/Flows/{FlowSid}/Engagements/{EngagementSid}/Steps/{StepSid}/Context": { + "description": "JSON context for individual steps", + "get": { + "description": "Retrieve the context for an Engagement Step.", + "parameters": [ + { + "description": "The SID of the Flow with the Step to fetch.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Engagement with the Step to fetch.", + "in": "path", + "name": "EngagementSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Step to fetch", + "in": "path", + "name": "StepSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.engagement.step.step_context" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "context" + ], + "x-path-type": "instance" + }, + "/v1/Flows/{FlowSid}/Engagements/{Sid}": { + "delete": { + "description": "Delete this Engagement and all Steps relating to it.", + "parameters": [ + { + "description": "The SID of the Flow to delete Engagements from.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Engagement resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "[DEPRECATED] Excecutions of Studio flows", + "get": { + "description": "Retrieve an Engagement", + "parameters": [ + { + "description": "The SID of the Flow.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Engagement resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.engagement" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "contact_sid", + "status", + "date_created" + ], + "x-path-type": "instance" + }, + "/v1/Flows/{FlowSid}/Executions": { + "description": "Executions of Studio flows", + "get": { + "description": "Retrieve a list of all Executions for the Flow.", + "parameters": [ + { + "description": "The SID of the Flow with the Execution resources to read.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.", + "in": "query", + "name": "DateCreatedFrom", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.", + "in": "query", + "name": "DateCreatedTo", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "executions": { + "items": { + "$ref": "#/components/schemas/studio.v1.flow.execution" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "Triggers a new Execution for the Flow", + "parameters": [ + { + "description": "The SID of the Excecution's Flow.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "From": { + "description": "The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`.", + "type": "string" + }, + "Parameters": { + "description": "JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\"name\":\"Zeke\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \"Zeke\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string.", + "type": "object" + }, + "To": { + "description": "The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`.", + "type": "string" + } + }, + "required": [ + "To", + "From" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.execution" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "contact_sid", + "status", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Context": { + "description": "JSON context for executions", + "get": { + "description": "Retrieve the most recent context for an Execution.", + "parameters": [ + { + "description": "The SID of the Flow with the Execution context to fetch.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution context to fetch.", + "in": "path", + "name": "ExecutionSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.execution.execution_context" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "context" + ], + "x-path-type": "instance" + }, + "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps": { + "description": "Individual steps within an execution", + "get": { + "description": "Retrieve a list of all Steps for an Execution.", + "parameters": [ + { + "description": "The SID of the Flow with the Steps to read.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution with the Steps to read.", + "in": "path", + "name": "ExecutionSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "steps": { + "items": { + "$ref": "#/components/schemas/studio.v1.flow.execution.execution_step" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "name", + "date_created" + ], + "x-path-type": "list" + }, + "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}": { + "description": "Individual steps within an execution", + "get": { + "description": "Retrieve a Step.", + "parameters": [ + { + "description": "The SID of the Flow with the Step to fetch.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution resource with the Step to fetch.", + "in": "path", + "name": "ExecutionSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the ExecutionStep resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.execution.execution_step" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "name", + "date_created" + ], + "x-path-type": "instance" + }, + "/v1/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context": { + "description": "JSON context for an individual step within an execution", + "get": { + "description": "Retrieve the context for an Execution Step.", + "parameters": [ + { + "description": "The SID of the Flow with the Step to fetch.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution resource with the Step to fetch.", + "in": "path", + "name": "ExecutionSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Step to fetch.", + "in": "path", + "name": "StepSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.execution.execution_step.execution_step_context" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "context" + ], + "x-path-type": "instance" + }, + "/v1/Flows/{FlowSid}/Executions/{Sid}": { + "delete": { + "description": "Delete the Execution and all Steps relating to it.", + "parameters": [ + { + "description": "The SID of the Flow with the Execution resources to delete.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "Executions of Studio flows", + "get": { + "description": "Retrieve an Execution", + "parameters": [ + { + "description": "The SID of the Flow with the Execution resource to fetch", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.execution" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "post": { + "description": "Update the status of an Execution to `ended`.", + "parameters": [ + { + "description": "The SID of the Flow with the Execution resources to update.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution resource to update.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Status": { + "description": "The status of the Execution. Can only be `ended`.", + "enum": [ + "active", + "ended" + ], + "type": "string" + } + }, + "required": [ + "Status" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow.execution" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "contact_sid", + "status", + "date_created" + ], + "x-path-type": "instance" + }, + "/v1/Flows/{Sid}": { + "delete": { + "description": "Delete a specific Flow.", + "parameters": [ + { + "description": "The SID of the Flow resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "description": "Studio flows", + "get": { + "description": "Retrieve a specific Flow.", + "parameters": [ + { + "description": "The SID of the Flow resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v1.flow" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "GA" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "status", + "version" + ], + "x-path-type": "instance" + } + }, + "tags": [ + { + "description": "This product is Generally Available.", + "name": "GA" + } + ] +} \ No newline at end of file diff --git a/src/services/twilio-api/twilio_studio_v2.json b/src/services/twilio-api/twilio_studio_v2.json new file mode 100644 index 00000000..7911cffe --- /dev/null +++ b/src/services/twilio-api/twilio_studio_v2.json @@ -0,0 +1,1681 @@ +{ + "components": { + "schemas": { + "studio.v2.flow": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "commit_message": { + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "definition": { + "type": "object" + }, + "errors": { + "items": { + "type": "object" + }, + "type": "array" + }, + "friendly_name": { + "type": "string" + }, + "links": { + "type": "object" + }, + "revision": { + "type": "integer" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "status": { + "enum": [ + "draft", + "published" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "valid": { + "type": "boolean" + }, + "warnings": { + "items": { + "type": "object" + }, + "type": "array" + }, + "webhook_url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v2.flow.execution": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "contact_channel_address": { + "type": "string" + }, + "context": { + "type": "object" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "links": { + "type": "object" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "status": { + "enum": [ + "active", + "ended" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v2.flow.execution.execution_context": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "execution_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v2.flow.execution.execution_step": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "execution_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "links": { + "type": "object" + }, + "name": { + "type": "string" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + }, + "transitioned_from": { + "type": "string" + }, + "transitioned_to": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v2.flow.execution.execution_step.execution_step_context": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "context": { + "type": "object" + }, + "execution_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + }, + "flow_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "step_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v2.flow.flow_revision": { + "properties": { + "account_sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^AC[0-9a-fA-F]{32}$", + "type": "string" + }, + "commit_message": { + "type": "string" + }, + "date_created": { + "format": "date-time", + "type": "string" + }, + "date_updated": { + "format": "date-time", + "type": "string" + }, + "definition": { + "type": "object" + }, + "errors": { + "items": { + "type": "object" + }, + "type": "array" + }, + "friendly_name": { + "type": "string" + }, + "revision": { + "type": "integer" + }, + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "status": { + "enum": [ + "draft", + "published" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "valid": { + "type": "boolean" + } + }, + "type": "object" + }, + "studio.v2.flow.test_user": { + "properties": { + "sid": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + }, + "test_users": { + "items": { + "type": "string" + }, + "type": "array" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "studio.v2.flow_validate": { + "properties": { + "valid": { + "type": "boolean" + } + }, + "type": "object" + } + }, + "securitySchemes": { + "accountSid_authToken": { + "scheme": "basic", + "type": "http" + } + } + }, + "info": { + "contact": { + "email": "support@twilio.com", + "name": "Twilio Support", + "url": "https://support.twilio.com" + }, + "description": "This is the public Twilio REST API.", + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "https://www.twilio.com/legal/tos", + "title": "Twilio - Studio", + "version": "5.12.0" + }, + "openapi": "3.0.1", + "paths": { + "/v2/Flows": { + "description": "Studio flows", + "get": { + "description": "Retrieve a list of all Flows.", + "parameters": [ + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "flows": { + "items": { + "$ref": "#/components/schemas/studio.v2.flow" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "post": { + "description": "Create a Flow.", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "CommitMessage": { + "description": "Description on change made in the revision.", + "type": "string" + }, + "Definition": { + "description": "JSON representation of flow definition.", + "type": "object" + }, + "FriendlyName": { + "description": "The string that you assigned to describe the Flow.", + "type": "string" + }, + "Status": { + "description": "The status of the Flow. Can be: `draft` or `published`.", + "enum": [ + "draft", + "published" + ], + "type": "string" + } + }, + "required": [ + "FriendlyName", + "Status", + "Definition" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "status", + "revision" + ], + "x-path-type": "list" + }, + "/v2/Flows/Validate": { + "description": "TODO: Resource-level docs", + "post": { + "description": "", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "CommitMessage": { + "description": "", + "type": "string" + }, + "Definition": { + "description": "", + "type": "object" + }, + "FriendlyName": { + "description": "", + "type": "string" + }, + "Status": { + "description": "", + "enum": [ + "draft", + "published" + ], + "type": "string" + } + }, + "required": [ + "FriendlyName", + "Status", + "Definition" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow_validate" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "valid" + ], + "x-path-type": "list" + }, + "/v2/Flows/{FlowSid}/Executions": { + "description": "Executions of Studio flows", + "get": { + "description": "Retrieve a list of all Executions for the Flow.", + "parameters": [ + { + "description": "The SID of the Flow with the Execution resources to read.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.", + "in": "query", + "name": "DateCreatedFrom", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.", + "in": "query", + "name": "DateCreatedTo", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "executions": { + "items": { + "$ref": "#/components/schemas/studio.v2.flow.execution" + }, + "type": "array" + }, + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "post": { + "description": "Triggers a new Execution for the Flow", + "parameters": [ + { + "description": "The SID of the Excecution's Flow.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "From": { + "description": "The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`.", + "type": "string" + }, + "Parameters": { + "description": "JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\"name\":\"Zeke\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \"Zeke\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string.", + "type": "object" + }, + "To": { + "description": "The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`.", + "type": "string" + } + }, + "required": [ + "To", + "From" + ], + "type": "object" + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow.execution" + } + } + }, + "description": "Created" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "status", + "date_created" + ], + "x-path-type": "list" + }, + "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context": { + "description": "JSON context for executions", + "get": { + "description": "Retrieve the most recent context for an Execution.", + "parameters": [ + { + "description": "The SID of the Flow with the Execution context to fetch.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution context to fetch.", + "in": "path", + "name": "ExecutionSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow.execution.execution_context" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "context" + ], + "x-path-type": "instance" + }, + "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps": { + "description": "Individual steps within an execution", + "get": { + "description": "Retrieve a list of all Steps for an Execution.", + "parameters": [ + { + "description": "The SID of the Flow with the Steps to read.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution with the Steps to read.", + "in": "path", + "name": "ExecutionSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "steps": { + "items": { + "$ref": "#/components/schemas/studio.v2.flow.execution.execution_step" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "name", + "date_created" + ], + "x-path-type": "list" + }, + "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid}": { + "description": "Individual steps within an execution", + "get": { + "description": "Retrieve a Step.", + "parameters": [ + { + "description": "The SID of the Flow with the Step to fetch.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution resource with the Step to fetch.", + "in": "path", + "name": "ExecutionSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the ExecutionStep resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow.execution.execution_step" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "name", + "date_created" + ], + "x-path-type": "instance" + }, + "/v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context": { + "description": "JSON context for an individual step within an execution", + "get": { + "description": "Retrieve the context for an Execution Step.", + "parameters": [ + { + "description": "The SID of the Flow with the Step to fetch.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution resource with the Step to fetch.", + "in": "path", + "name": "ExecutionSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Step to fetch.", + "in": "path", + "name": "StepSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FT[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow.execution.execution_step.execution_step_context" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "context" + ], + "x-path-type": "instance" + }, + "/v2/Flows/{FlowSid}/Executions/{Sid}": { + "delete": { + "description": "Delete the Execution and all Steps relating to it.", + "parameters": [ + { + "description": "The SID of the Flow with the Execution resources to delete.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "description": "Executions of Studio flows", + "get": { + "description": "Retrieve an Execution", + "parameters": [ + { + "description": "The SID of the Flow with the Execution resource to fetch", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow.execution" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "post": { + "description": "Update the status of an Execution to `ended`.", + "parameters": [ + { + "description": "The SID of the Flow with the Execution resources to update.", + "in": "path", + "name": "FlowSid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "The SID of the Execution resource to update.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FN[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "Status": { + "description": "The status of the Execution. Can only be `ended`.", + "enum": [ + "active", + "ended" + ], + "type": "string" + } + }, + "required": [ + "Status" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow.execution" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "status", + "date_created" + ], + "x-path-type": "instance" + }, + "/v2/Flows/{Sid}": { + "delete": { + "description": "Delete a specific Flow.", + "parameters": [ + { + "description": "The SID of the Flow resource to delete.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully." + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "description": "Studio flows", + "get": { + "description": "Retrieve a specific Flow.", + "parameters": [ + { + "description": "The SID of the Flow resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "post": { + "description": "Update a Flow.", + "parameters": [ + { + "description": "The SID of the Flow resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "CommitMessage": { + "description": "Description on change made in the revision.", + "type": "string" + }, + "Definition": { + "description": "JSON representation of flow definition.", + "type": "object" + }, + "FriendlyName": { + "description": "The string that you assigned to describe the Flow.", + "type": "string" + }, + "Status": { + "description": "The status of the Flow. Can be: `draft` or `published`.", + "enum": [ + "draft", + "published" + ], + "type": "string" + } + }, + "required": [ + "Status" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "status", + "revision" + ], + "x-path-type": "instance" + }, + "/v2/Flows/{Sid}/Revisions": { + "description": "Studio flows revisions", + "get": { + "description": "Retrieve a list of all Flows revisions.", + "parameters": [ + { + "description": "The SID of the Flow resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", + "in": "query", + "name": "PageSize", + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "properties": { + "meta": { + "properties": { + "first_page_url": { + "format": "uri", + "type": "string" + }, + "key": { + "type": "string" + }, + "next_page_url": { + "format": "uri", + "type": "string" + }, + "page": { + "type": "integer" + }, + "page_size": { + "type": "integer" + }, + "previous_page_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "revisions": { + "items": { + "$ref": "#/components/schemas/studio.v2.flow.flow_revision" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "status", + "revision" + ], + "x-path-type": "list" + }, + "/v2/Flows/{Sid}/Revisions/{Revision}": { + "description": "Studio flows revisions", + "get": { + "description": "Retrieve a specific Flow revision.", + "parameters": [ + { + "description": "The SID of the Flow resource to fetch.", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + }, + { + "description": "Specific Revision number or can be `LatestPublished` and `LatestRevision`.", + "in": "path", + "name": "Revision", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow.flow_revision" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "sid", + "friendly_name", + "status", + "revision" + ], + "x-path-type": "instance" + }, + "/v2/Flows/{Sid}/TestUsers": { + "description": "TODO: Resource-level docs", + "get": { + "description": "", + "parameters": [ + { + "description": "", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow.test_user" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "post": { + "description": "", + "parameters": [ + { + "description": "", + "in": "path", + "name": "Sid", + "required": true, + "schema": { + "maxLength": 34, + "minLength": 34, + "pattern": "^FW[0-9a-fA-F]{32}$", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "properties": { + "TestUsers": { + "description": "", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "TestUsers" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/studio.v2.flow.test_user" + } + } + }, + "description": "OK" + } + }, + "security": [ + { + "accountSid_authToken": [] + } + ], + "tags": [ + "Beta" + ] + }, + "servers": [ + { + "url": "https://studio.twilio.com" + } + ], + "x-default-output-properties": [ + "test_users" + ], + "x-path-type": "instance" + } + }, + "tags": [ + { + "description": "PLEASE NOTE that this is a Beta product that is subject to change. Use it with caution.", + "name": "Beta" + } + ] +} \ No newline at end of file diff --git a/src/services/twilio-api/twilio_supersim.json b/src/services/twilio-api/twilio_supersim_v1.json similarity index 100% rename from src/services/twilio-api/twilio_supersim.json rename to src/services/twilio-api/twilio_supersim_v1.json diff --git a/src/services/twilio-api/twilio_sync.json b/src/services/twilio-api/twilio_sync_v1.json similarity index 100% rename from src/services/twilio-api/twilio_sync.json rename to src/services/twilio-api/twilio_sync_v1.json diff --git a/src/services/twilio-api/twilio_taskrouter.json b/src/services/twilio-api/twilio_taskrouter_v1.json similarity index 100% rename from src/services/twilio-api/twilio_taskrouter.json rename to src/services/twilio-api/twilio_taskrouter_v1.json diff --git a/src/services/twilio-api/twilio_trunking.json b/src/services/twilio-api/twilio_trunking_v1.json similarity index 100% rename from src/services/twilio-api/twilio_trunking.json rename to src/services/twilio-api/twilio_trunking_v1.json diff --git a/src/services/twilio-api/twilio_verify.json b/src/services/twilio-api/twilio_verify_v2.json similarity index 100% rename from src/services/twilio-api/twilio_verify.json rename to src/services/twilio-api/twilio_verify_v2.json diff --git a/src/services/twilio-api/twilio_video.json b/src/services/twilio-api/twilio_video_v1.json similarity index 100% rename from src/services/twilio-api/twilio_video.json rename to src/services/twilio-api/twilio_video_v1.json diff --git a/src/services/twilio-api/twilio_voice.json b/src/services/twilio-api/twilio_voice_v1.json similarity index 100% rename from src/services/twilio-api/twilio_voice.json rename to src/services/twilio-api/twilio_voice_v1.json diff --git a/src/services/twilio-api/twilio_wireless.json b/src/services/twilio-api/twilio_wireless_v1.json similarity index 100% rename from src/services/twilio-api/twilio_wireless.json rename to src/services/twilio-api/twilio_wireless_v1.json diff --git a/test/services/twilio-api/api-browser.test.js b/test/services/twilio-api/api-browser.test.js index eb4b5204..3924afd5 100644 --- a/test/services/twilio-api/api-browser.test.js +++ b/test/services/twilio-api/api-browser.test.js @@ -12,6 +12,27 @@ describe('services', () => { expect(browser.domains.api.paths['/2010-04-01/Accounts/{AccountSid}/Calls/{Sid}.json'].operations.get).to.exist; }); + test.it('loads JSONs split by version', () => { + const browser = new TwilioApiBrowser(); + const spec = browser.loadApiSpecFromDisk(); + expect(spec).to.not.have.property('studio'); + expect(spec).to.have.property('studio_v1'); + expect(spec).to.have.property('studio_v2'); + expect(spec).to.have.property('api_v2010'); + expect(spec).to.have.property('preview'); + expect(browser.domains.studio.paths['/v1/Flows'].operations.get).to.exist; + expect(browser.domains.studio.paths['/v2/Flows'].operations.get).to.exist; + }); + + test.it('merges the domains into one', () => { + const browser = new TwilioApiBrowser(); + let spec = browser.loadApiSpecFromDisk(); + expect(spec).to.have.property('studio_v1'); + spec = browser.mergeVersions(spec); + expect(spec).to.not.have.property('studio_v1'); + expect(spec).to.have.property('studio'); + }); + test.it('loads a specific api spec', () => { const browser = new TwilioApiBrowser({ api: {