{ "components": { "securitySchemes": { "accountSid_authToken": { "scheme": "basic", "type": "http" } }, "schemas": { "chat.v3.channel": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CH[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Channel resource." }, "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Channel resource." }, "service_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) the Channel resource is associated with." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the resource.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "unique_name": { "type": "string", "nullable": true, "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.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "attributes": { "type": "string", "nullable": true, "description": "The JSON string that stores application-specific data. If attributes have not been set, `{}` is returned.", "x-twilio": { "pii": { "handling": "sensitive", "deleteSla": 30 } } }, "type": { "$ref": "#/components/schemas/channel_enum_channel_type" }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format." }, "created_by": { "type": "string", "nullable": true, "description": "The `identity` of the User that created the channel. If the Channel was created by using the API, the value is `system`.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "members_count": { "type": "integer", "default": 0, "description": "The number of Members in the Channel." }, "messages_count": { "type": "integer", "default": 0, "description": "The number of Messages that have been passed in the Channel." }, "messaging_service_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^MG[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Channel resource." } } }, "channel_enum_channel_type": { "type": "string", "enum": [ "public", "private" ], "description": "The visibility of the channel. Can be: `public` or `private`." }, "channel_enum_webhook_enabled_type": { "type": "string", "enum": [ "true", "false" ] } } }, "info": { "title": "Twilio - Chat", "description": "This is the public Twilio REST API.", "termsOfService": "https://www.twilio.com/legal/tos", "contact": { "name": "Twilio Support", "url": "https://support.twilio.com", "email": "support@twilio.com" }, "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0.0", "x-twilio": { "apiStandards": "v0.1" } }, "openapi": "3.0.1", "paths": { "/v3/Services/{ServiceSid}/Channels/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "A Channel resource represents a chat/conversation channel with an ordered list of messages and a participant roster.", "x-twilio": { "defaultOutputProperties": [ "sid", "unique_name", "friendly_name" ], "pathType": "instance" }, "post": { "description": "Update a specific Channel.", "summary": "Update a specific Channel.", "tags": [ "ChatV3Channel" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The unique SID identifier of the Service.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "A 34 character string that uniquely identifies this Channel.", "schema": { "type": "string" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "$ref": "#/components/schemas/channel_enum_webhook_enabled_type" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v3.channel" }, "examples": { "update": { "value": { "sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "friendly_name", "unique_name": "unique_name", "attributes": "{ \"foo\": \"bar\" }", "type": "public", "date_created": "2015-12-16T22:18:37Z", "date_updated": "2015-12-16T22:18:38Z", "created_by": "username", "members_count": 0, "messages_count": 0, "url": "https://chat.twilio.com/v3/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } }, "headers": { "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateChannel", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateChannelRequest", "properties": { "Type": { "$ref": "#/components/schemas/channel_enum_channel_type" }, "MessagingServiceSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^MG[0-9a-fA-F]{32}$", "description": "The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to." } } }, "examples": { "update": { "value": { "Type": "private", "MessagingServiceSid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } } } } } } } }, "/v3/Services/{ServiceSid}/Channels": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "A Channel resource represents a chat/conversation channel with an ordered list of messages and a participant roster.", "x-twilio": { "defaultOutputProperties": [ "sid", "unique_name", "friendly_name" ], "pathType": "list" } } }, "servers": [ { "url": "https://chat.twilio.com" } ], "tags": [ { "name": "ChatV3Channel" }, { "name": "ChatV3Version" } ], "security": [ { "accountSid_authToken": [] } ] }