GET | /conversations |
---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.Messaging
Namespace Global
Namespace Voice.Api.Messaging
Public Partial Class ConversationInfo
Public Overridable Property Id As String
Public Overridable Property EndpointId As String
Public Overridable Property OtherAddress As String
Public Overridable Property MostRecentMessage As MessageInfo
End Class
Public Partial Class ListConversations
'''<Summary>
'''The IDs of the account whose conversations you want to retrieve
'''</Summary>
<ApiMember(Description:="The IDs of the account whose conversations you want to retrieve")>
Public Overridable Property AccountIds As List(Of String)
'''<Summary>
'''The list of endpoint IDs whose conversations you want to retrieve
'''</Summary>
<ApiMember(Description:="The list of endpoint IDs whose conversations you want to retrieve")>
Public Overridable Property EndpointIds As List(Of String)
'''<Summary>
'''The list of customer IDs whose conversations you want to retrieve
'''</Summary>
<ApiMember(Description:="The list of customer IDs whose conversations you want to retrieve")>
Public Overridable Property CustomerIds As List(Of String)
'''<Summary>
'''The start date for the conversations you want to retrieve
'''</Summary>
<ApiMember(Description:="The start date for the conversations you want to retrieve")>
Public Overridable Property AfterDate As String
End Class
Public Partial Class ListConversationsResponse
Public Overridable Property Conversations As List(Of ConversationInfo)
End Class
Public Enum MessageDirections
Incoming
Outgoing
End Enum
Public Partial Class MessageInfo
Public Overridable Property Id As String
Public Overridable Property AccountId As String
Public Overridable Property CustomerId As String
Public Overridable Property EndpointId As String
Public Overridable Property EndpointDisplayName As String
Public Overridable Property [Date] As String
Public Overridable Property Direction As MessageDirections
Public Overridable Property OtherAddress As String
Public Overridable Property Sender As String
Public Overridable Property Text As String
Public Overridable Property IsUnread As Boolean
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /conversations HTTP/1.1 Host: team.evovoice.io Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"conversations":[{"id":"String","endpointId":"String","otherAddress":"String","mostRecentMessage":{"id":"String","accountId":"String","customerId":"String","endpointId":"String","endpointDisplayName":"String","date":"String","direction":"Incoming","otherAddress":"String","sender":"String","text":"String","isUnread":false}}]}