{ "components": { "schemas": { "chat.v2.service.binding": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^BS[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Binding 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 Binding 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 Binding resource is associated with." }, "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." }, "endpoint": { "type": "string", "nullable": true, "description": "The unique endpoint identifier for the Binding. The format of this value depends on the `binding_type`.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "identity": { "type": "string", "nullable": true, "description": "The application-defined string that uniquely identifies the resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "credential_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CR[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Credential](https://www.twilio.com/docs/chat/rest/credential-resource) for the binding. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info." }, "binding_type": { "type": "string", "$ref": "#/components/schemas/binding_enum_binding_type", "nullable": true, "description": "The push technology to use for the Binding. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info." }, "message_types": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "The [Programmable Chat message types](https://www.twilio.com/docs/chat/push-notification-configuration#push-types) the binding is subscribed to." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Binding resource." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The absolute URLs of the Binding's [User](https://www.twilio.com/docs/chat/rest/user-resource)." } } }, "binding_enum_binding_type": { "type": "string", "enum": [ "gcm", "apn", "fcm" ] }, "chat.v2.service.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": { "type": "string", "$ref": "#/components/schemas/channel_enum_channel_type", "nullable": true, "description": "The visibility of the channel. Can be: `public` or `private`." }, "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", "nullable": true, "description": "The number of Members in the Channel." }, "messages_count": { "type": "integer", "nullable": true, "description": "The number of Messages that have been passed in the Channel." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Channel resource." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The absolute URLs of the [Members](https://www.twilio.com/docs/chat/rest/member-resource), [Messages](https://www.twilio.com/docs/chat/rest/message-resource), [Invites](https://www.twilio.com/docs/chat/rest/invite-resource), Webhooks and, if it exists, the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) for the Channel." } } }, "channel_enum_channel_type": { "type": "string", "enum": [ "public", "private" ] }, "channel_enum_webhook_enabled_type": { "type": "string", "enum": [ "true", "false" ] }, "chat.v2.service.channel.channel_webhook": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WH[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Channel Webhook 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 Webhook 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 Webhook resource is associated with." }, "channel_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CH[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource belongs to." }, "type": { "type": "string", "nullable": true, "description": "The type of webhook. Can be: `webhook`, `studio`, or `trigger`." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Channel Webhook resource." }, "configuration": { "nullable": true, "description": "The JSON string that describes how the channel webhook is configured. The configuration object contains the `url`, `method`, `filters`, and `retry_count` values that are configured by the create and update actions." }, "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." } } }, "channel_webhook_enum_type": { "type": "string", "enum": [ "webhook", "trigger", "studio" ] }, "channel_webhook_enum_method": { "type": "string", "enum": [ "GET", "POST" ] }, "chat.v2.credential": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CR[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Credential 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 Credential resource." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the resource.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "type": { "type": "string", "$ref": "#/components/schemas/credential_enum_push_service", "nullable": true, "description": "The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`." }, "sandbox": { "type": "string", "nullable": true, "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." }, "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." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Credential resource." } } }, "credential_enum_push_service": { "type": "string", "enum": [ "gcm", "apn", "fcm" ] }, "chat.v2.service.channel.invite": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IN[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Invite 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 Invite resource." }, "channel_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CH[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource belongs to." }, "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 Invite resource is associated with." }, "identity": { "type": "string", "nullable": true, "description": "The application-defined string that uniquely identifies the resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "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." }, "role_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the resource." }, "created_by": { "type": "string", "nullable": true, "description": "The `identity` of the User that created the invite." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Invite resource." } } }, "chat.v2.service.channel.member": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^MB[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Member 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 Member resource." }, "channel_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CH[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource belongs to." }, "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 Member resource is associated with." }, "identity": { "type": "string", "nullable": true, "description": "The application-defined string that uniquely identifies the resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "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." }, "role_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the member." }, "last_consumed_message_index": { "type": "integer", "nullable": true, "description": "The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read." }, "last_consumption_timestamp": { "type": "string", "format": "date-time", "nullable": true, "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels)." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Member resource." }, "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 } } } } }, "member_enum_webhook_enabled_type": { "type": "string", "enum": [ "true", "false" ] }, "chat.v2.service.channel.message": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IM[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Message 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 Message resource." }, "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 } } }, "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 Message resource is associated with." }, "to": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CH[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) that the message was sent to." }, "channel_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CH[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource belongs to." }, "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." }, "last_updated_by": { "type": "string", "nullable": true, "description": "The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "was_edited": { "type": "boolean", "nullable": true, "description": "Whether the message has been edited since it was created." }, "from": { "type": "string", "nullable": true, "description": "The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author. The default value is `system`.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "body": { "type": "string", "nullable": true, "description": "The content of the message.", "x-twilio": { "pii": { "handling": "sensitive", "deleteSla": 30 } } }, "index": { "type": "integer", "nullable": true, "description": "The index of the message within the [Channel](https://www.twilio.com/docs/chat/channels). Indices may skip numbers, but will always be in order of when the message was received." }, "type": { "type": "string", "nullable": true, "description": "The Message type. Can be: `text` or `media`." }, "media": { "nullable": true, "description": "An object that describes the Message's media, if the message contains media. The object contains these fields: `content_type` with the MIME type of the media, `filename` with the name of the media, `sid` with the SID of the Media resource, and `size` with the media object's file size in bytes. If the Message has no media, this value is `null`.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Message resource." } } }, "message_enum_order_type": { "type": "string", "enum": [ "asc", "desc" ] }, "message_enum_webhook_enabled_type": { "type": "string", "enum": [ "true", "false" ] }, "chat.v2.service.role": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Role 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 Role 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 Role 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 } } }, "type": { "type": "string", "$ref": "#/components/schemas/role_enum_role_type", "nullable": true, "description": "The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/rest/service-resource) roles." }, "permissions": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "An array of the permissions the role has been granted." }, "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." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Role resource." } } }, "role_enum_role_type": { "type": "string", "enum": [ "channel", "deployment" ] }, "chat.v2.service": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the Service 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 Service resource." }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the resource.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "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." }, "default_service_role_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "nullable": true, "description": "The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles." }, "default_channel_role_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "nullable": true, "description": "The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles." }, "default_channel_creator_role_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "nullable": true, "description": "The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles." }, "read_status_enabled": { "type": "boolean", "nullable": true, "description": "Whether the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature is enabled. The default is `true`." }, "reachability_enabled": { "type": "boolean", "nullable": true, "description": "Whether the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) is enabled for this Service instance. The default is `false`." }, "typing_indicator_timeout": { "type": "integer", "nullable": true, "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." }, "consumption_report_interval": { "type": "integer", "nullable": true, "description": "DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints." }, "limits": { "nullable": true, "description": "An object that describes the limits of the service instance. The `limits` object contains `channel_members` to describe the members/channel limit and `user_channels` to describe the channels/user limit. `channel_members` can be 1,000 or less, with a default of 250. `user_channels` can be 1,000 or less, with a default value of 100." }, "pre_webhook_url": { "type": "string", "nullable": true, "description": "The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details." }, "post_webhook_url": { "type": "string", "nullable": true, "description": "The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details." }, "webhook_method": { "type": "string", "nullable": true, "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." }, "webhook_filters": { "type": "array", "items": { "type": "string" }, "nullable": true, "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." }, "pre_webhook_retry_count": { "type": "integer", "nullable": true, "description": "The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried." }, "post_webhook_retry_count": { "type": "integer", "nullable": true, "description": "The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried." }, "notifications": { "nullable": true, "description": "The notification configuration for the Service instance. See [Push Notification Configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info." }, "media": { "nullable": true, "description": "An object that describes the properties of media that the service supports. The object contains the `size_limit_mb` property, which describes the size of the largest media file in MB; and the `compatibility_message` property, which contains the message text to send when a media message does not have any text." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the Service resource." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The absolute URLs of the Service's [Channels](https://www.twilio.com/docs/chat/channels), [Roles](https://www.twilio.com/docs/chat/rest/role-resource), [Bindings](https://www.twilio.com/docs/chat/rest/binding-resource), and [Users](https://www.twilio.com/docs/chat/rest/user-resource)." } } }, "chat.v2.service.user": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^US[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the User 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 User 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 User resource is associated with." }, "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 } } }, "friendly_name": { "type": "string", "nullable": true, "description": "The string that you assigned to describe the resource.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "role_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the user." }, "identity": { "type": "string", "nullable": true, "description": "The application-defined string that uniquely identifies the resource's User within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). This value is often a username or an email address, and is case-sensitive. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "is_online": { "type": "boolean", "nullable": true, "description": "Whether the User is actively connected to the Service instance and online. This value is only returned by Fetch actions that return a single resource and `null` is always returned by a Read action. This value is `null` if the Service's `reachability_enabled` is `false`, if the User has never been online for the Service instance, even if the Service's `reachability_enabled` is `true`." }, "is_notifiable": { "type": "boolean", "nullable": true, "description": "Whether the User has a potentially valid Push Notification registration (APN or GCM) for the Service instance. If at least one registration exists, `true`; otherwise `false`. This value is only returned by Fetch actions that return a single resource and `null` is always returned by a Read action. This value is `null` if the Service's `reachability_enabled` is `false`, and if the User has never had a notification registration, even if the Service's `reachability_enabled` is `true`." }, "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." }, "joined_channels_count": { "type": "integer", "nullable": true, "description": "The number of Channels the User is a Member of." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The absolute URLs of the [Channel](https://www.twilio.com/docs/chat/channels) and [Binding](https://www.twilio.com/docs/chat/rest/binding-resource) resources related to the user." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the User resource." } } }, "user_enum_webhook_enabled_type": { "type": "string", "enum": [ "true", "false" ] }, "chat.v2.service.user.user_binding": { "type": "object", "properties": { "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^BS[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique string that we created to identify the User Binding 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 User Binding 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 User Binding resource is associated with." }, "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." }, "endpoint": { "type": "string", "nullable": true, "description": "The unique endpoint identifier for the User Binding. The format of the value depends on the `binding_type`.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "identity": { "type": "string", "nullable": true, "description": "The application-defined string that uniquely identifies the resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.", "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, "user_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^US[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resource. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info." }, "credential_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CR[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Credential](https://www.twilio.com/docs/chat/rest/credential-resource) for the binding. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info." }, "binding_type": { "type": "string", "$ref": "#/components/schemas/user_binding_enum_binding_type", "nullable": true, "description": "The push technology to use for the User Binding. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info." }, "message_types": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "The [Programmable Chat message types](https://www.twilio.com/docs/chat/push-notification-configuration#push-types) the binding is subscribed to." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the User Binding resource." } } }, "user_binding_enum_binding_type": { "type": "string", "enum": [ "gcm", "apn", "fcm" ] }, "chat.v2.service.user.user_channel": { "type": "object", "properties": { "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 User 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 User Channel resource is associated with." }, "channel_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CH[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the User Channel resource belongs to." }, "user_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^US[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) the User Channel belongs to." }, "member_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^MB[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of a [Member](https://www.twilio.com/docs/chat/rest/member-resource) that represents the User on the Channel." }, "status": { "type": "string", "$ref": "#/components/schemas/user_channel_enum_channel_status", "nullable": true, "description": "The status of the User on the Channel. Can be: `joined`, `invited`, or `not_participating`." }, "last_consumed_message_index": { "type": "integer", "nullable": true, "description": "The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read." }, "unread_messages_count": { "type": "integer", "nullable": true, "description": "The number of unread Messages in the Channel for the User. Note that retrieving messages on a client endpoint does not mean that messages are consumed or read. See [Consumption Horizon feature](https://www.twilio.com/docs/chat/consumption-horizon) to learn how to mark messages as consumed." }, "links": { "type": "object", "format": "uri-map", "nullable": true, "description": "The absolute URLs of the [Members](https://www.twilio.com/docs/chat/rest/member-resource), [Messages](https://www.twilio.com/docs/chat/rest/message-resource) , [Invites](https://www.twilio.com/docs/chat/rest/invite-resource) and, if it exists, the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) for the Channel." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the User Channel resource." }, "notification_level": { "type": "string", "$ref": "#/components/schemas/user_channel_enum_notification_level", "nullable": true, "description": "The push notification level of the User for the Channel. Can be: `default` or `muted`." } } }, "user_channel_enum_channel_status": { "type": "string", "enum": [ "joined", "invited", "not_participating" ] }, "user_channel_enum_notification_level": { "type": "string", "enum": [ "default", "muted" ] }, "user_channel_enum_webhook_enabled_type": { "type": "string", "enum": [ "true", "false" ] } }, "securitySchemes": { "accountSid_authToken": { "type": "http", "scheme": "basic" } } }, "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.56.0" }, "openapi": "3.0.1", "paths": { "/v2/Services/{ServiceSid}/Bindings": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Push notification subscription for users", "x-twilio": { "defaultOutputProperties": [ "sid", "endpoint", "identity" ], "pathType": "list", "parent": "/Services/{Sid}" }, "get": { "description": "", "tags": [ "ChatV2Binding" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Binding resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "BindingType", "in": "query", "description": "The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.", "schema": { "type": "array", "items": { "type": "string", "$ref": "#/components/schemas/binding_enum_binding_type" } } }, { "name": "Identity", "in": "query", "description": "The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.", "schema": { "type": "array", "items": { "type": "string" } }, "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "bindings": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service.binding" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListBindingResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListBinding", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Bindings/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Push notification subscription for users", "x-twilio": { "defaultOutputProperties": [ "sid", "endpoint", "identity" ], "pathType": "instance", "parent": "/Services/{Sid}" }, "get": { "description": "", "tags": [ "ChatV2Binding" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Binding resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Binding resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^BS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.binding" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchBinding", "x-maturity": [ "GA" ] }, "delete": { "description": "", "tags": [ "ChatV2Binding" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Binding resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Binding resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^BS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteBinding", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Channels/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Channels represent chat rooms", "x-twilio": { "defaultOutputProperties": [ "sid", "unique_name", "friendly_name" ], "pathType": "instance", "dependentProperties": { "members": { "mapping": { "service_sid": "service_sid", "channel_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Channels/{channel_sid}/Members" }, "messages": { "mapping": { "service_sid": "service_sid", "channel_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Channels/{channel_sid}/Messages" }, "invites": { "mapping": { "service_sid": "service_sid", "channel_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Channels/{channel_sid}/Invites" }, "webhooks": { "mapping": { "service_sid": "service_sid", "channel_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Channels/{channel_sid}/Webhooks" } }, "parent": "/Services/{Sid}" }, "get": { "description": "", "tags": [ "ChatV2Channel" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Channel resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Channel resource to fetch. This value can be either the `sid` or the `unique_name` of the Channel resource to fetch.", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchChannel", "x-maturity": [ "GA" ] }, "delete": { "description": "", "tags": [ "ChatV2Channel" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Channel resource to delete. This value can be either the `sid` or the `unique_name` of the Channel resource to delete.", "schema": { "type": "string" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/channel_enum_webhook_enabled_type" } } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteChannel", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2Channel" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Channel resource in.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Channel resource to update. This value can be either the `sid` or the `unique_name` of the Channel resource to update.", "schema": { "type": "string" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/channel_enum_webhook_enabled_type" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateChannel", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateChannelRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the resource. It can be up to 256 characters long." }, "UniqueName": { "type": "string", "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 256 characters or less in length and unique within the Service." }, "Attributes": { "type": "string", "description": "A valid JSON string that contains application-specific data." }, "DateCreated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source." }, "DateUpdated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated." }, "CreatedBy": { "type": "string", "description": "The `identity` of the User that created the channel. Default is: `system`." } } } } } }, "x-twilio": { "addContentTypeIfEmptyForm": true } } }, "/v2/Services/{ServiceSid}/Channels": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Channels represent chat rooms", "x-twilio": { "defaultOutputProperties": [ "sid", "unique_name", "friendly_name" ], "pathType": "list", "dependentProperties": { "members": { "mapping": { "service_sid": "service_sid", "channel_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Channels/{channel_sid}/Members" }, "messages": { "mapping": { "service_sid": "service_sid", "channel_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Channels/{channel_sid}/Messages" }, "invites": { "mapping": { "service_sid": "service_sid", "channel_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Channels/{channel_sid}/Invites" }, "webhooks": { "mapping": { "service_sid": "service_sid", "channel_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Channels/{channel_sid}/Webhooks" } }, "parent": "/Services/{Sid}" }, "post": { "description": "", "tags": [ "ChatV2Channel" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Channel resource under.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/channel_enum_webhook_enabled_type" } } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateChannel", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateChannelRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the new resource. It can be up to 64 characters long." }, "UniqueName": { "type": "string", "description": "An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service." }, "Attributes": { "type": "string", "description": "A valid JSON string that contains application-specific data." }, "Type": { "type": "string", "$ref": "#/components/schemas/channel_enum_channel_type", "description": "The visibility of the channel. Can be: `public` or `private` and defaults to `public`." }, "DateCreated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source." }, "DateUpdated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used in cases where a Channel is being recreated from a backup/separate source and where a Message was previously updated." }, "CreatedBy": { "type": "string", "description": "The `identity` of the User that created the channel. Default is: `system`." } } } } } }, "x-twilio": { "addContentTypeIfEmptyForm": true } }, "get": { "description": "", "tags": [ "ChatV2Channel" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Channel resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Type", "in": "query", "description": "The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.", "schema": { "type": "array", "items": { "type": "string", "$ref": "#/components/schemas/channel_enum_channel_type" } } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channels": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service.channel" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListChannelResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListChannel", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Webhooks for specific channels", "x-twilio": { "defaultOutputProperties": [ "sid", "configuration" ], "pathType": "list", "parent": "/Services/{ServiceSid}/Channels/{Sid}" }, "get": { "description": "", "tags": [ "ChatV2Webhook" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to read the resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "webhooks": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service.channel.channel_webhook" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListChannelWebhookResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListChannelWebhook", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2Webhook" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to create the Webhook resource under.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Channel Webhook resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.channel_webhook" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateChannelWebhook", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateChannelWebhookRequest", "properties": { "Type": { "type": "string", "$ref": "#/components/schemas/channel_webhook_enum_type", "description": "The type of webhook. Can be: `webhook`, `studio`, or `trigger`." }, "Configuration.Url": { "type": "string", "description": "The URL of the webhook to call using the `configuration.method`." }, "Configuration.Method": { "type": "string", "$ref": "#/components/schemas/channel_webhook_enum_method", "description": "The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`." }, "Configuration.Filters": { "type": "array", "items": { "type": "string" }, "description": "The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger)." }, "Configuration.Triggers": { "type": "array", "items": { "type": "string" }, "description": "A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`." }, "Configuration.FlowSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^FW[0-9a-fA-F]{32}$", "description": "The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`." }, "Configuration.RetryCount": { "type": "integer", "description": "The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0." } }, "required": [ "Type" ] } } } } } }, "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Webhooks/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Webhooks for specific channels", "x-twilio": { "defaultOutputProperties": [ "sid", "configuration" ], "pathType": "instance", "parent": "/Services/{ServiceSid}/Channels/{Sid}" }, "get": { "description": "", "tags": [ "ChatV2Webhook" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to fetch the Webhook resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Channel Webhook resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WH[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.channel_webhook" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchChannelWebhook", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2Webhook" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel that has the Webhook resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Channel Webhook resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WH[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.channel_webhook" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateChannelWebhook", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateChannelWebhookRequest", "properties": { "Configuration.Url": { "type": "string", "description": "The URL of the webhook to call using the `configuration.method`." }, "Configuration.Method": { "type": "string", "$ref": "#/components/schemas/channel_webhook_enum_method", "description": "The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`." }, "Configuration.Filters": { "type": "array", "items": { "type": "string" }, "description": "The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger)." }, "Configuration.Triggers": { "type": "array", "items": { "type": "string" }, "description": "A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`." }, "Configuration.FlowSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^FW[0-9a-fA-F]{32}$", "description": "The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`." }, "Configuration.RetryCount": { "type": "integer", "description": "The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0." } } } } } }, "x-twilio": { "addContentTypeIfEmptyForm": true } }, "delete": { "description": "", "tags": [ "ChatV2Webhook" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to delete the Webhook resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Channel Webhook resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Channel Webhook resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^WH[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteChannelWebhook", "x-maturity": [ "GA" ] } }, "/v2/Credentials": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Credentials for push notifications channels", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "type" ], "pathType": "list" }, "get": { "description": "", "tags": [ "ChatV2Credential" ], "parameters": [ { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "credentials": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.credential" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListCredentialResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListCredential", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2Credential" ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.credential" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateCredential", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateCredentialRequest", "properties": { "Type": { "type": "string", "$ref": "#/components/schemas/credential_enum_push_service", "description": "The type of push-notification service the credential is for. Can be: `gcm`, `fcm`, or `apn`." }, "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the new resource. It can be up to 64 characters long." }, "Certificate": { "type": "string", "description": "[APN only] The URL encoded representation of the certificate. For example, \n`-----BEGIN CERTIFICATE-----\nMIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A==\n-----END CERTIFICATE-----`" }, "PrivateKey": { "type": "string", "description": "[APN only] The URL encoded representation of the private key. For example,\n`-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG...\n-----END RSA PRIVATE KEY-----`" }, "Sandbox": { "type": "boolean", "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." }, "ApiKey": { "type": "string", "description": "[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential." }, "Secret": { "type": "string", "description": "[FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging." } }, "required": [ "Type" ] } } } } } }, "/v2/Credentials/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Credentials for push notifications channels", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "type" ], "pathType": "instance" }, "get": { "description": "", "tags": [ "ChatV2Credential" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The SID of the Credential resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CR[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.credential" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchCredential", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2Credential" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The SID of the Credential resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CR[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.credential" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateCredential", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateCredentialRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the resource. It can be up to 64 characters long." }, "Certificate": { "type": "string", "description": "[APN only] The URL encoded representation of the certificate. For example, \n`-----BEGIN CERTIFICATE-----\nMIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A==\n-----END CERTIFICATE-----`" }, "PrivateKey": { "type": "string", "description": "[APN only] The URL encoded representation of the private key. For example,\n`-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG...\n-----END RSA PRIVATE KEY-----`" }, "Sandbox": { "type": "boolean", "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." }, "ApiKey": { "type": "string", "description": "[GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential." }, "Secret": { "type": "string", "description": "[FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging." } } } } } }, "x-twilio": { "addContentTypeIfEmptyForm": true } }, "delete": { "description": "", "tags": [ "ChatV2Credential" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The SID of the Credential resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^CR[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteCredential", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Pending invitations to users to become channel members", "x-twilio": { "defaultOutputProperties": [ "sid", "identity", "date_created" ], "pathType": "instance", "parent": "/Services/{ServiceSid}/Channels/{Sid}" }, "get": { "description": "", "tags": [ "ChatV2Invite" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Invite resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Invite resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IN[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.invite" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchInvite", "x-maturity": [ "GA" ] }, "delete": { "description": "", "tags": [ "ChatV2Invite" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Invite resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Invite resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IN[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteInvite", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Invites": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Pending invitations to users to become channel members", "x-twilio": { "defaultOutputProperties": [ "sid", "identity", "date_created" ], "pathType": "list", "parent": "/Services/{ServiceSid}/Channels/{Sid}" }, "post": { "description": "", "tags": [ "ChatV2Invite" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Invite resource under.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Invite resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.invite" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateInvite", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateInviteRequest", "properties": { "Identity": { "type": "string", "description": "The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info." }, "RoleSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "description": "The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member." } }, "required": [ "Identity" ] } } } } }, "get": { "description": "", "tags": [ "ChatV2Invite" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Invite resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Invite resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Identity", "in": "query", "description": "The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.", "schema": { "type": "array", "items": { "type": "string" } }, "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "invites": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service.channel.invite" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListInviteResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListInvite", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Users joined to specific channels", "x-twilio": { "defaultOutputProperties": [ "sid", "identity", "date_created" ], "pathType": "instance", "parent": "/Services/{ServiceSid}/Channels/{Sid}" }, "get": { "description": "", "tags": [ "ChatV2Member" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Member resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Member resource to fetch. This value can be either the Member's `sid` or its `identity` value.", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.member" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchMember", "x-maturity": [ "GA" ] }, "delete": { "description": "", "tags": [ "ChatV2Member" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Member resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Member resource to delete. This value can be either the Member's `sid` or its `identity` value.", "schema": { "type": "string" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/member_enum_webhook_enabled_type" } } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteMember", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2Member" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Member resource in.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Member resource to update. This value can be either the Member's `sid` or its `identity` value.", "schema": { "type": "string" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/member_enum_webhook_enabled_type" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.member" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateMember", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateMemberRequest", "properties": { "RoleSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "description": "The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource)." }, "LastConsumedMessageIndex": { "type": "integer", "nullable": true, "description": "The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels)." }, "LastConsumptionTimestamp": { "type": "string", "format": "date-time", "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels)." }, "DateCreated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source." }, "DateUpdated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated." }, "Attributes": { "type": "string", "description": "A valid JSON string that contains application-specific data." } } } } } }, "x-twilio": { "addContentTypeIfEmptyForm": true } } }, "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Users joined to specific channels", "x-twilio": { "defaultOutputProperties": [ "sid", "identity", "date_created" ], "pathType": "list", "parent": "/Services/{ServiceSid}/Channels/{Sid}" }, "post": { "description": "", "tags": [ "ChatV2Member" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Member resource under.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Member resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/member_enum_webhook_enabled_type" } } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.member" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateMember", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateMemberRequest", "properties": { "Identity": { "type": "string", "description": "The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info." }, "RoleSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "description": "The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource)." }, "LastConsumedMessageIndex": { "type": "integer", "nullable": true, "description": "The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source." }, "LastConsumptionTimestamp": { "type": "string", "format": "date-time", "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels)." }, "DateCreated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source." }, "DateUpdated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated." }, "Attributes": { "type": "string", "description": "A valid JSON string that contains application-specific data." } }, "required": [ "Identity" ] } } } } }, "get": { "description": "", "tags": [ "ChatV2Member" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Member resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Member resources to read belong to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Identity", "in": "query", "description": "The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.", "schema": { "type": "array", "items": { "type": "string" } }, "x-twilio": { "pii": { "handling": "standard", "deleteSla": 30 } } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "members": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service.channel.member" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListMemberResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListMember", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Individual chat messages", "x-twilio": { "defaultOutputProperties": [ "sid", "from", "to", "date_created" ], "pathType": "instance", "parent": "/Services/{ServiceSid}/Channels/{Sid}" }, "get": { "description": "", "tags": [ "ChatV2Message" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Message resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to fetch belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Message resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IM[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.message" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchMessage", "x-maturity": [ "GA" ] }, "delete": { "description": "", "tags": [ "ChatV2Message" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Message resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to delete belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Message resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IM[0-9a-fA-F]{32}$" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/message_enum_webhook_enabled_type" } } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteMessage", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2Message" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Message resource in.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to update belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Message resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IM[0-9a-fA-F]{32}$" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/message_enum_webhook_enabled_type" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.message" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateMessage", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateMessageRequest", "properties": { "Body": { "type": "string", "description": "The message to send to the channel. Can 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." }, "Attributes": { "type": "string", "description": "A valid JSON string that contains application-specific data." }, "DateCreated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source." }, "DateUpdated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated." }, "LastUpdatedBy": { "type": "string", "description": "The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable." }, "From": { "type": "string", "description": "The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author." } } } } } }, "x-twilio": { "addContentTypeIfEmptyForm": true } } }, "/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Messages": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Individual chat messages", "x-twilio": { "defaultOutputProperties": [ "sid", "from", "to", "date_created" ], "pathType": "list", "parent": "/Services/{ServiceSid}/Channels/{Sid}" }, "post": { "description": "", "tags": [ "ChatV2Message" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Message resource under.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Message resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/message_enum_webhook_enabled_type" } } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.channel.message" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateMessage", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateMessageRequest", "properties": { "From": { "type": "string", "description": "The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`." }, "Attributes": { "type": "string", "description": "A valid JSON string that contains application-specific data." }, "DateCreated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source." }, "DateUpdated": { "type": "string", "format": "date-time", "description": "The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated." }, "LastUpdatedBy": { "type": "string", "description": "The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable." }, "Body": { "type": "string", "description": "The message to send to the channel. Can 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." }, "MediaSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^ME[0-9a-fA-F]{32}$", "description": "The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message." } } } } } }, "x-twilio": { "addContentTypeIfEmptyForm": true } }, "get": { "description": "", "tags": [ "ChatV2Message" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Message resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the Message resource to read belongs to. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true }, { "name": "Order", "in": "query", "description": "The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.", "schema": { "type": "string", "$ref": "#/components/schemas/message_enum_order_type" } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "messages": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service.channel.message" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListMessageResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListMessage", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Roles/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Roles determining user or member permissions", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "type" ], "pathType": "instance", "parent": "/Services/{Sid}" }, "get": { "description": "", "tags": [ "ChatV2Role" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the Role resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Role resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.role" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchRole", "x-maturity": [ "GA" ] }, "delete": { "description": "", "tags": [ "ChatV2Role" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Role resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Role resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteRole", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2Role" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the Role resource in.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the Role resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.role" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateRole", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateRoleRequest", "properties": { "Permission": { "type": "array", "items": { "type": "string" }, "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. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`." } }, "required": [ "Permission" ] } } } } } }, "/v2/Services/{ServiceSid}/Roles": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Roles determining user or member permissions", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "type" ], "pathType": "list", "parent": "/Services/{Sid}" }, "post": { "description": "", "tags": [ "ChatV2Role" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Role resource under.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.role" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateRole", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateRoleRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the new resource. It can be up to 64 characters long." }, "Type": { "type": "string", "$ref": "#/components/schemas/role_enum_role_type", "description": "The type of role. Can be: `channel` for [Channel](https://www.twilio.com/docs/chat/channels) roles or `deployment` for [Service](https://www.twilio.com/docs/chat/rest/service-resource) roles." }, "Permission": { "type": "array", "items": { "type": "string" }, "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`." } }, "required": [ "FriendlyName", "Type", "Permission" ] } } } } }, "get": { "description": "", "tags": [ "ChatV2Role" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the Role resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "roles": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service.role" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListRoleResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListRole", "x-maturity": [ "GA" ] } }, "/v2/Services/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Top level scope for all chat resources", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created" ], "pathType": "instance", "dependentProperties": { "channels": { "mapping": { "service_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Channels" }, "roles": { "mapping": { "service_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Roles" }, "users": { "mapping": { "service_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Users" }, "bindings": { "mapping": { "service_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Bindings" } } }, "get": { "description": "", "tags": [ "ChatV2Service" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The SID of the Service resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchService", "x-maturity": [ "GA" ] }, "delete": { "description": "", "tags": [ "ChatV2Service" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The SID of the Service resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteService", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2Service" ], "parameters": [ { "name": "Sid", "in": "path", "description": "The SID of the Service resource to update.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateService", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateServiceRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the resource." }, "DefaultServiceRoleSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "description": "The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles." }, "DefaultChannelRoleSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "description": "The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles." }, "DefaultChannelCreatorRoleSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "description": "The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles." }, "ReadStatusEnabled": { "type": "boolean", "description": "Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`." }, "ReachabilityEnabled": { "type": "boolean", "description": "Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`." }, "TypingIndicatorTimeout": { "type": "integer", "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." }, "ConsumptionReportInterval": { "type": "integer", "description": "DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints." }, "Notifications.NewMessage.Enabled": { "type": "boolean", "description": "Whether to send a notification when a new message is added to a channel. The default is `false`." }, "Notifications.NewMessage.Template": { "type": "string", "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`." }, "Notifications.NewMessage.Sound": { "type": "string", "description": "The name of the sound to play when a new message is added to a channel and `notifications.new_message.enabled` is `true`." }, "Notifications.NewMessage.BadgeCountEnabled": { "type": "boolean", "description": "Whether the new message badge is enabled. The default is `false`." }, "Notifications.AddedToChannel.Enabled": { "type": "boolean", "description": "Whether to send a notification when a member is added to a channel. The default is `false`." }, "Notifications.AddedToChannel.Template": { "type": "string", "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`." }, "Notifications.AddedToChannel.Sound": { "type": "string", "description": "The name of the sound to play when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`." }, "Notifications.RemovedFromChannel.Enabled": { "type": "boolean", "description": "Whether to send a notification to a user when they are removed from a channel. The default is `false`." }, "Notifications.RemovedFromChannel.Template": { "type": "string", "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`." }, "Notifications.RemovedFromChannel.Sound": { "type": "string", "description": "The name of the sound to play to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`." }, "Notifications.InvitedToChannel.Enabled": { "type": "boolean", "description": "Whether to send a notification when a user is invited to a channel. The default is `false`." }, "Notifications.InvitedToChannel.Template": { "type": "string", "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`." }, "Notifications.InvitedToChannel.Sound": { "type": "string", "description": "The name of the sound to play when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`." }, "PreWebhookUrl": { "type": "string", "format": "uri", "description": "The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details." }, "PostWebhookUrl": { "type": "string", "format": "uri", "description": "The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details." }, "WebhookMethod": { "type": "string", "format": "http-method", "enum": [ "GET", "POST" ], "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." }, "WebhookFilters": { "type": "array", "items": { "type": "string" }, "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." }, "Limits.ChannelMembers": { "type": "integer", "description": "The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000." }, "Limits.UserChannels": { "type": "integer", "description": "The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000." }, "Media.CompatibilityMessage": { "type": "string", "description": "The message to send when a media message has no text. Can be used as placeholder message." }, "PreWebhookRetryCount": { "type": "integer", "description": "The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried." }, "PostWebhookRetryCount": { "type": "integer", "description": "The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried." }, "Notifications.LogEnabled": { "type": "boolean", "description": "Whether to log notifications. The default is `false`." } } } } } }, "x-twilio": { "addContentTypeIfEmptyForm": true } } }, "/v2/Services": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Top level scope for all chat resources", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created" ], "pathType": "list", "dependentProperties": { "channels": { "mapping": { "service_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Channels" }, "roles": { "mapping": { "service_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Roles" }, "users": { "mapping": { "service_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Users" }, "bindings": { "mapping": { "service_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Bindings" } } }, "post": { "description": "", "tags": [ "ChatV2Service" ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateService", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateServiceRequest", "properties": { "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the new resource." } }, "required": [ "FriendlyName" ] } } } } }, "get": { "description": "", "tags": [ "ChatV2Service" ], "parameters": [ { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "services": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListServiceResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListService", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Users/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Unique chat users within a chat service", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "identity", "date_created" ], "pathType": "instance", "dependentProperties": { "user_channels": { "mapping": { "service_sid": "service_sid", "user_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Users/{user_sid}/Channels" }, "user_bindings": { "mapping": { "service_sid": "service_sid", "user_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Users/{user_sid}/Bindings" } }, "parent": "/Services/{Sid}" }, "get": { "description": "", "tags": [ "ChatV2User" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch.", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.user" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchUser", "x-maturity": [ "GA" ] }, "delete": { "description": "", "tags": [ "ChatV2User" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete.", "schema": { "type": "string" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteUser", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2User" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the User resource in.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update.", "schema": { "type": "string" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/user_enum_webhook_enabled_type" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.user" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateUser", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateUserRequest", "properties": { "RoleSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "description": "The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User." }, "Attributes": { "type": "string", "description": "A valid JSON string that contains application-specific data." }, "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the resource. It is often used for display purposes." } } } } } }, "x-twilio": { "addContentTypeIfEmptyForm": true } } }, "/v2/Services/{ServiceSid}/Users": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "Unique chat users within a chat service", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "identity", "date_created" ], "pathType": "list", "dependentProperties": { "user_channels": { "mapping": { "service_sid": "service_sid", "user_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Users/{user_sid}/Channels" }, "user_bindings": { "mapping": { "service_sid": "service_sid", "user_sid": "sid" }, "resource_url": "/v2/Services/{service_sid}/Users/{user_sid}/Bindings" } }, "parent": "/Services/{Sid}" }, "post": { "description": "", "tags": [ "ChatV2User" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the User resource under.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/user_enum_webhook_enabled_type" } } ], "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.user" } } }, "description": "Created" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "CreateUser", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "CreateUserRequest", "properties": { "Identity": { "type": "string", "description": "The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). This value is often a username or email address. See the Identity documentation for more info." }, "RoleSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^RL[0-9a-fA-F]{32}$", "description": "The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User." }, "Attributes": { "type": "string", "description": "A valid JSON string that contains application-specific data." }, "FriendlyName": { "type": "string", "description": "A descriptive string that you create to describe the new resource. This value is often used for display purposes." } }, "required": [ "Identity" ] } } } } }, "get": { "description": "", "tags": [ "ChatV2User" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service.user" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListUserResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListUser", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "List of bindings for a given user", "x-twilio": { "defaultOutputProperties": [ "sid", "endpoint", "identity", "binding_type" ], "pathType": "list", "parent": "/Services/{ServiceSid}/Users/{Sid}", "mountName": "user_bindings" }, "get": { "description": "", "tags": [ "ChatV2UserBinding" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User Binding resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "UserSid", "in": "path", "description": "The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to read. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.", "schema": { "type": "string" }, "required": true }, { "name": "BindingType", "in": "query", "description": "The push technology used by the User Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.", "schema": { "type": "array", "items": { "type": "string", "$ref": "#/components/schemas/user_binding_enum_binding_type" } } }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "bindings": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service.user.user_binding" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListUserBindingResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListUserBinding", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "List of bindings for a given user", "x-twilio": { "defaultOutputProperties": [ "sid", "endpoint", "identity", "binding_type" ], "pathType": "instance", "parent": "/Services/{ServiceSid}/Users/{Sid}", "mountName": "user_bindings" }, "get": { "description": "", "tags": [ "ChatV2UserBinding" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User Binding resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "UserSid", "in": "path", "description": "The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resource to fetch. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the User Binding resource to fetch.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^BS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.user.user_binding" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchUserBinding", "x-maturity": [ "GA" ] }, "delete": { "description": "", "tags": [ "ChatV2UserBinding" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User Binding resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "UserSid", "in": "path", "description": "The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to delete. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.", "schema": { "type": "string" }, "required": true }, { "name": "Sid", "in": "path", "description": "The SID of the User Binding resource to delete.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^BS[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteUserBinding", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "List of channels for a given user", "x-twilio": { "defaultOutputProperties": [ "channel_sid", "status" ], "pathType": "list", "parent": "/Services/{ServiceSid}/Users/{Sid}", "mountName": "user_channels" }, "get": { "description": "List all Channels for a given User.", "tags": [ "ChatV2UserChannel" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to read the User Channel resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "UserSid", "in": "path", "description": "The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to read the User Channel resources from. This value can be either the `sid` or the `identity` of the User resource.", "schema": { "type": "string" }, "required": true }, { "name": "PageSize", "in": "query", "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.", "schema": { "type": "integer", "minimum": 1, "maximum": 1000 } }, { "name": "Page", "in": "query", "description": "The page index. This value is simply for client state.", "schema": { "type": "integer", "minimum": 0 } }, { "name": "PageToken", "in": "query", "description": "The page token. This is provided by the API.", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channels": { "type": "array", "items": { "$ref": "#/components/schemas/chat.v2.service.user.user_channel" } }, "meta": { "type": "object", "properties": { "first_page_url": { "type": "string", "format": "uri" }, "next_page_url": { "type": "string", "format": "uri", "nullable": true }, "page": { "type": "integer" }, "page_size": { "type": "integer" }, "previous_page_url": { "type": "string", "format": "uri", "nullable": true }, "url": { "type": "string", "format": "uri" }, "key": { "type": "string" } } } }, "title": "ListUserChannelResponse" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "ListUserChannel", "x-maturity": [ "GA" ] } }, "/v2/Services/{ServiceSid}/Users/{UserSid}/Channels/{ChannelSid}": { "servers": [ { "url": "https://chat.twilio.com" } ], "description": "List of channels for a given user", "x-twilio": { "defaultOutputProperties": [ "channel_sid", "status" ], "pathType": "instance", "parent": "/Services/{ServiceSid}/Users/{Sid}", "mountName": "user_channels" }, "get": { "description": "", "tags": [ "ChatV2UserChannel" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to fetch the User Channel resource from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "UserSid", "in": "path", "description": "The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to fetch the User Channel resource from. This value can be either the `sid` or the `identity` of the User resource.", "schema": { "type": "string" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) that has the User Channel to fetch. This value can be either the `sid` or the `unique_name` of the Channel to fetch.", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.user.user_channel" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchUserChannel", "x-maturity": [ "GA" ] }, "delete": { "description": "Removes User from selected Channel.", "tags": [ "ChatV2UserChannel" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "UserSid", "in": "path", "description": "The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from.", "schema": { "type": "string" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource belongs to.", "schema": { "type": "string" }, "required": true }, { "name": "X-Twilio-Webhook-Enabled", "in": "header", "description": "The X-Twilio-Webhook-Enabled HTTP request header", "schema": { "type": "string", "$ref": "#/components/schemas/user_channel_enum_webhook_enabled_type" } } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeleteUserChannel", "x-maturity": [ "GA" ] }, "post": { "description": "", "tags": [ "ChatV2UserChannel" ], "parameters": [ { "name": "ServiceSid", "in": "path", "description": "The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to update the User Channel resource in.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^IS[0-9a-fA-F]{32}$" }, "required": true }, { "name": "UserSid", "in": "path", "description": "The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) to update the User Channel resource from. This value can be either the `sid` or the `identity` of the User resource.", "schema": { "type": "string" }, "required": true }, { "name": "ChannelSid", "in": "path", "description": "The SID of the [Channel](https://www.twilio.com/docs/chat/channels) with the User Channel resource to update. This value can be the Channel resource's `sid` or `unique_name`.", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/chat.v2.service.user.user_channel" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateUserChannel", "x-maturity": [ "GA" ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateUserChannelRequest", "properties": { "NotificationLevel": { "type": "string", "$ref": "#/components/schemas/user_channel_enum_notification_level", "description": "The push notification level to assign to the User Channel. Can be: `default` or `muted`." }, "LastConsumedMessageIndex": { "type": "integer", "nullable": true, "description": "The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read." }, "LastConsumptionTimestamp": { "type": "string", "format": "date-time", "description": "The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels)." } } } } } }, "x-twilio": { "addContentTypeIfEmptyForm": true } } } }, "servers": [ { "url": "https://chat.twilio.com" } ], "tags": [ { "name": "ChatV2Binding" }, { "name": "ChatV2Channel" }, { "name": "ChatV2Credential" }, { "name": "ChatV2Invite" }, { "name": "ChatV2Member" }, { "name": "ChatV2Message" }, { "name": "ChatV2Role" }, { "name": "ChatV2Service" }, { "name": "ChatV2User" }, { "name": "ChatV2UserBinding" }, { "name": "ChatV2UserChannel" }, { "name": "ChatV2Webhook" } ], "x-maturity": [ { "name": "GA", "description": "This product is Generally Available." } ] }