Update a specific Channel

POST /v3/Services/{ServiceSid}/Channels/{Sid}

A Channel resource represents a chat/conversation channel with an ordered list of messages and a participant roster.

Update a specific Channel.

Headers

Path parameters

  • ServiceSid string Required

    The unique SID identifier of the Service.

  • Sid string Required

    A 34 character string that uniquely identifies this Channel.

Body

  • The unique ID of the Messaging Service this channel belongs to.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^MG[0-9a-fA-F]{32}$.

  • Type string

    TThe Type for this Channel to migrate to. Can only be private. Migration to 'public' is not allowed.

    Values are public or private.

Responses

  • OK

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • attributes string | null

      The JSON string that stores application-specific data

    • created_by string | null

      The identity of the User that created the channel

    • date_created string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was created

    • date_updated string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was last updated

    • friendly_name string | null

      The string that you assigned to describe the resource

    • members_count integer | null

      The number of Members in the Channel

    • messages_count integer | null

      The number of Messages that have been passed in the Channel

    • The unique ID of the Messaging Service this channel belongs to.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^MG[0-9a-fA-F]{32}$.

    • service_sid string | null

      The SID of the Service that the resource is associated with

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^IS[0-9a-fA-F]{32}$.

    • sid string | null

      The unique string that identifies the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CH[0-9a-fA-F]{32}$.

    • type string | null

      The visibility of the channel. Can be: public or private

      Values are public or private.

    • unique_name string | null

      An application-defined string that uniquely identifies the resource

    • url string(uri) | null

      The absolute URL of the Channel resource

POST /v3/Services/{ServiceSid}/Channels/{Sid}
curl \
 -X POST https://chat.twilio.com/v3/Services/{ServiceSid}/Channels/{Sid} \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "X-Twilio-Webhook-Enabled: true" \
 -d 'MessagingServiceSid=string&Type=public'
Request example
# Headers
X-Twilio-Webhook-Enabled: true

# Payload
{
  "MessagingServiceSid": "string",
  "Type": "public"
}
Request examples
# Headers
X-Twilio-Webhook-Enabled: true

# Payload
{
  "MessagingServiceSid": "string",
  "Type": "public"
}
Response examples (200)
{
  "account_sid": "string",
  "attributes": "string",
  "created_by": "string",
  "date_created": "2023-05-04T09:42:00+00:00",
  "date_updated": "2023-05-04T09:42:00+00:00",
  "friendly_name": "string",
  "members_count": 42,
  "messages_count": 42,
  "messaging_service_sid": "string",
  "service_sid": "string",
  "sid": "string",
  "type": "public",
  "unique_name": "string",
  "url": "https://example.com"
}
Response examples (200)
{
  "account_sid": "string",
  "attributes": "string",
  "created_by": "string",
  "date_created": "2024-05-04T09:42:00+00:00",
  "date_updated": "2024-05-04T09:42:00+00:00",
  "friendly_name": "string",
  "members_count": 42,
  "messages_count": 42,
  "messaging_service_sid": "string",
  "service_sid": "string",
  "sid": "string",
  "type": "public",
  "unique_name": "string",
  "url": "https://example.com"
}