Retrieve a list of all User Conversations for the User.

GET /v1/Services/{ChatServiceSid}/Users/{UserSid}/Conversations

A Service User Conversation resource represents a conversation of the user belonging to a specific conversation service.

Retrieve a list of all User Conversations for the User.

Path parameters

  • ChatServiceSid string Required

    The SID of the Conversation Service the Conversation resource is associated with.

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

  • UserSid string Required

    The unique SID identifier of the User resource. This value can be either the sid or the identity of the User resource.

Query parameters

  • PageSize integer(int64)

    How many resources to return in each list page. The default is 50, and the maximum is 50.

    Minimum value is 1, maximum value is 50.

  • Page integer

    The page index. This value is simply for client state.

    Minimum value is 0.

  • PageToken string

    The page token. This is provided by the API.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • conversations array[object]
      Hide conversations attributes Show conversations attributes object
      • account_sid string | null

        The unique ID of the Account responsible for this conversation.

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

      • chat_service_sid string | null

        The unique ID of the Conversation Service this conversation belongs to.

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

      • conversation_sid string | null

        The unique ID of the Conversation for this User Conversation.

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

      • unread_messages_count integer | null

        The number of unread Messages in the Conversation for the Participant.

      • last_read_message_index integer | null

        The index of the last Message in the Conversation that the Participant has read.

      • participant_sid string | null

        The unique ID of the participant the user conversation belongs to.

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

      • user_sid string | null

        The unique string that identifies the User resource.

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

      • friendly_name string | null

        The human-readable name of this conversation, limited to 256 characters. Optional.

      • conversation_state string

        The current state of this User Conversation. One of inactive, active or closed.

        Values are inactive, active, or closed.

      • timers

        Timer date values representing state update for this conversation.

      • attributes string | null

        An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.

      • date_created string(date-time) | null

        The date that this conversation was created, given in ISO 8601 format.

      • date_updated string(date-time) | null

        The date that this conversation was last updated, given in ISO 8601 format.

      • created_by string | null

        Identity of the creator of this Conversation.

      • notification_level string

        The Notification Level of this User Conversation. One of default or muted.

        Values are default or muted.

      • unique_name string | null

        An application-defined string that uniquely identifies the Conversation resource. It can be used to address the resource in place of the resource's conversation_sid in the URL.

      • url string(uri) | null
    • meta object
      Hide meta attributes Show meta attributes object
      • first_page_url string(uri)
      • key string
      • next_page_url string(uri) | null
      • page integer
      • page_size integer
      • previous_page_url string(uri) | null
      • url string(uri)
GET /v1/Services/{ChatServiceSid}/Users/{UserSid}/Conversations
curl \
 --request GET 'https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Users/{UserSid}/Conversations' \
 --user "username:password"
Response examples (200)
{
  "meta": {
    "key": "conversations",
    "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations?PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations?PageSize=50&Page=0",
    "previous_page_url": null
  },
  "conversations": []
}
{
  "meta": {
    "key": "conversations",
    "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations?PageSize=50&Page=0",
    "page": 0,
    "page_size": 50,
    "next_page_url": null,
    "first_page_url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations?PageSize=50&Page=0",
    "previous_page_url": null
  },
  "conversations": [
    {
      "url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "links": {
        "participant": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "conversation": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      },
      "timers": {
        "date_closed": "2015-12-16T22:28:38Z",
        "date_inactive": "2015-12-16T22:19:38Z"
      },
      "user_sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "attributes": "{}",
      "created_by": "created_by",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "unique_name": "unique_name",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T20:00:00Z",
      "friendly_name": "friendly_name",
      "participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "conversation_state": "inactive",
      "notification_level": "default",
      "unread_messages_count": 100,
      "last_read_message_index": 100
    }
  ]
}