Evo Voice

<back to all web services

ListConversations

Requires Authentication
The following routes are available for this service:
GET/conversations
namespace Voice.Api.Messaging

open System
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> = new ResizeArray<ConversationInfo>() 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> = new ResizeArray<String>() 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> = new ResizeArray<String>() 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> = new ResizeArray<String>() 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

F# ListConversations DTOs

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

HTTP + JSON

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/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}}]}