Evo Voice

<back to all web services

NewAISession

Creates a new session

Requires Authentication
Requires the role:SystemAdministrator
The following routes are available for this service:
POST/ai/sessions
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.AI
Imports Voice.Api

Namespace Global

    Namespace Voice.Api

        Public Partial Class EntityInfo
            '''<Summary>
            '''The ID of the object
            '''</Summary>
            <ApiMember(Description:="The ID of the object")>
            Public Overridable Property Id As String

            '''<Summary>
            '''The date the object was created
            '''</Summary>
            <ApiMember(Description:="The date the object was created")>
            Public Overridable Property DateCreated As String

            '''<Summary>
            '''The date the object was last modified
            '''</Summary>
            <ApiMember(Description:="The date the object was last modified")>
            Public Overridable Property DateLastModified As String

            '''<Summary>
            '''The user that created this object
            '''</Summary>
            <ApiMember(Description:="The user that created this object")>
            Public Overridable Property CreatedBy As String

            '''<Summary>
            '''The user that last modified this object
            '''</Summary>
            <ApiMember(Description:="The user that last modified this object")>
            Public Overridable Property LastModifiedBy As String
        End Class
    End Namespace

    Namespace Voice.Api.AI

        Public Partial Class AISessionInfo
            Inherits EntityInfo
            '''<Summary>
            '''The ID of the account associated with this session
            '''</Summary>
            <ApiMember(Description:="The ID of the account associated with this session")>
            Public Overridable Property AccountId As String

            '''<Summary>
            '''The name of the account associated with this customer
            '''</Summary>
            <ApiMember(Description:="The name of the account associated with this customer")>
            Public Overridable Property AccountName As String

            '''<Summary>
            '''The purpose for this AI session
            '''</Summary>
            <ApiMember(Description:="The purpose for this AI session")>
            Public Overridable Property Purpose As String
        End Class

        '''<Summary>
        '''Creates a new session
        '''</Summary>
        <Api(Description:="Creates a new session")>
        Public Partial Class NewAISession
            Implements IPost
            '''<Summary>
            '''The account ID to associate this session with
            '''</Summary>
            <ApiMember(Description:="The account ID to associate this session with")>
            Public Overridable Property AccountId As String

            '''<Summary>
            '''The purpose for this session
            '''</Summary>
            <ApiMember(Description:="The purpose for this session")>
            Public Overridable Property Purpose As String
        End Class
    End Namespace
End Namespace

VB.NET NewAISession DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /ai/sessions HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	accountId: String,
	purpose: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	accountId: String,
	accountName: String,
	purpose: String,
	id: String,
	dateCreated: String,
	dateLastModified: String,
	createdBy: String,
	lastModifiedBy: String
}