The UserConversation resource lists the Conversations in which a particular User is an active Participant. Use this resource to:
Please note that UnreadMessageCount returns a maximum value of 1000
Each UserConversation resource contains these properties.
account_sid
type: SID<AC>The unique ID of the Account responsible for this conversation.
^AC[0-9a-fA-F]{32}$
34
34
chat_service_sid
type: SID<IS>The unique ID of the Conversation Service this conversation belongs to.
^IS[0-9a-fA-F]{32}$
34
34
conversation_sid
type: SID<CH>The unique ID of the Conversation for this User Conversation.
^CH[0-9a-fA-F]{32}$
34
34
unread_messages_count
type: integerThe number of unread Messages in the Conversation for the Participant.
last_read_message_index
type: integerThe index of the last Message in the Conversation that the Participant has read.
participant_sid
type: SID<MB>The unique ID of the participant the user conversation belongs to.
^MB[0-9a-fA-F]{32}$
34
34
user_sid
type: SID<US>The unique string that identifies the User resource.
^US[0-9a-fA-F]{32}$
34
34
friendly_name
type: stringThe human-readable name of this conversation, limited to 256 characters. Optional.
conversation_state
type: enum<string>The current state of this User Conversation. One of inactive
, active
or closed
.
inactive
active
closed
attributes
type: stringAn 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
type: string<date-time>The date that this conversation was created, given in ISO 8601 format.
date_updated
type: string<date-time>The date that this conversation was last updated, given in ISO 8601 format.
notification_level
type: enum<string>The Notification Level of this User Conversation. One of default
or muted
.
default
muted
unique_name
type: stringAn 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.
links
type: object<uri-map>Contains absolute URLs to access the participant and conversation of this conversation.
GET https://conversations.twilio.com/v1/Users/{UserSid}/Conversations/{ConversationSid}
The {UserSid}
value can be either the sid
or the identity
of the User resource and the {ConversationSid}
value can be either the sid
or the unique_name
of the Conversation to fetch.
UserSid
type: stringThe unique SID identifier of the User resource. This value can be either the sid
or the identity
of the User resource.
ConversationSid
type: stringThe unique SID identifier of the Conversation. This value can be either the sid
or the unique_name
of the Conversation resource.
GET https://conversations.twilio.com/v1/Users/{UserSid}/Conversations
The {UserSid}
value can be either the sid
or the identity
of the User resource to read UserConversation resources from.
UserSid
type: stringThe unique SID identifier of the User resource. This value can be either the sid
or the identity
of the User resource.
PageSize
type: integerHow many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Page
type: integerThe page index. This value is simply for client state.
0
POST https://conversations.twilio.com/v1/Users/{UserSid}/Conversations/{ConversationSid}
UserSid
type: stringThe unique SID identifier of the User resource. This value can be either the sid
or the identity
of the User resource.
ConversationSid
type: stringThe unique SID identifier of the Conversation. This value can be either the sid
or the unique_name
of the Conversation resource.
NotificationLevel
type: enum<string>The Notification Level of this User Conversation. One of default
or muted
.
default
muted
LastReadTimestamp
type: string<date-time>The date of the last message read in conversation by the user, given in ISO 8601 format.
LastReadMessageIndex
type: integerThe index of the last Message in the Conversation that the Participant has read.
POST https://conversations.twilio.com/v1/Users/{UserSid}/Conversations/{ConversationSid}
The NotificationLevel
property expresses whether a user receives pushes for this conversation or not. This can be set separately for each user/conversation pair.
UserSid
type: stringThe unique SID identifier of the User resource. This value can be either the sid
or the identity
of the User resource.
ConversationSid
type: stringThe unique SID identifier of the Conversation. This value can be either the sid
or the unique_name
of the Conversation resource.
NotificationLevel
type: enum<string>The Notification Level of this User Conversation. One of default
or muted
.
default
muted
LastReadTimestamp
type: string<date-time>The date of the last message read in conversation by the user, given in ISO 8601 format.
LastReadMessageIndex
type: integerThe index of the last Message in the Conversation that the Participant has read.
DELETE https://conversations.twilio.com/v1/Users/{UserSid}/Conversations/{ConversationSid}
UserSid
type: stringThe unique SID identifier of the User resource. This value can be either the sid
or the identity
of the User resource.
ConversationSid
type: stringThe unique SID identifier of the Conversation. This value can be either the sid
or the unique_name
of the Conversation resource.