| GET | /conversations |
|---|
namespace Voice.Api.Messaging
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type MessageDirections =
| Incoming = 0
| Outgoing = 1
[<AllowNullLiteral>]
type MessageInfo() =
member val Id:String = null with get,set
member val AccountId:String = null with get,set
member val CustomerId:String = null with get,set
member val EndpointId:String = null with get,set
member val EndpointDisplayName:String = null with get,set
member val Date:String = null with get,set
member val Direction:MessageDirections = new MessageDirections() with get,set
member val OtherAddress:String = null with get,set
member val Sender:String = null with get,set
member val Text:String = null with get,set
member val IsUnread:Boolean = new Boolean() with get,set
[<AllowNullLiteral>]
type ConversationInfo() =
member val Id:String = null with get,set
member val EndpointId:String = null with get,set
member val OtherAddress:String = null with get,set
member val MostRecentMessage:MessageInfo = null with get,set
[<AllowNullLiteral>]
type ListConversationsResponse() =
member val Conversations:ResizeArray<ConversationInfo> = null with get,set
[<AllowNullLiteral>]
type 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")>]
member val AccountIds:ResizeArray<String> = null with get,set
///<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")>]
member val EndpointIds:ResizeArray<String> = null with get,set
///<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")>]
member val CustomerIds:ResizeArray<String> = null with get,set
///<summary>
///The start date for the conversations you want to retrieve
///</summary>
[<ApiMember(Description="The start date for the conversations you want to retrieve")>]
member val AfterDate:String = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /conversations HTTP/1.1 Host: evovoice.io Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ListConversationsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Messaging">
<Conversations>
<ConversationInfo>
<EndpointId>String</EndpointId>
<Id>String</Id>
<MostRecentMessage>
<AccountId>String</AccountId>
<CustomerId>String</CustomerId>
<Date>String</Date>
<Direction>Incoming</Direction>
<EndpointDisplayName>String</EndpointDisplayName>
<EndpointId>String</EndpointId>
<Id>String</Id>
<IsUnread>false</IsUnread>
<OtherAddress>String</OtherAddress>
<Sender>String</Sender>
<Text>String</Text>
</MostRecentMessage>
<OtherAddress>String</OtherAddress>
</ConversationInfo>
</Conversations>
</ListConversationsResponse>