Requires any of the roles: | Manager, SystemAdministrator |
POST | /sessions/outgoing |
---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.Sessions
Namespace Global
Namespace Voice.Api.Sessions
'''<Summary>
'''Create a new outgoing call and process it with the specified flow. This can only be used for voice sessions. If no caller ID is specified, we will use a random one.
'''</Summary>
<Api(Description:="Create a new outgoing call and process it with the specified flow. This can only be used for voice sessions. If no caller ID is specified, we will use a random one.")>
Public Partial Class NewOutgoingSession
Implements IPost
'''<Summary>
'''The ID of the flow to use. This flow will be executed as soon as the call is answered.
'''</Summary>
<ApiMember(Description:="The ID of the flow to use. This flow will be executed as soon as the call is answered.")>
Public Overridable Property FlowId As String
'''<Summary>
'''The E164 number to dial, e.g. +18144043093
'''</Summary>
<ApiMember(Description:="The E164 number to dial, e.g. +18144043093")>
Public Overridable Property NumberToDial As String
'''<Summary>
'''The Caller ID to use. This must be the E164 number of an owned phone number
'''</Summary>
<ApiMember(Description:="The Caller ID to use. This must be the E164 number of an owned phone number")>
Public Overridable Property CallerId As String
End Class
End Namespace
End Namespace
VB.NET NewOutgoingSession DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sessions/outgoing HTTP/1.1
Host: team.evovoice.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
flowId: String,
numberToDial: String,
callerId: String
}