Requires any of the roles: | SystemAdministrator, Manager |
POST | /users |
---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Voice.Api.Authentication
Namespace Global
Namespace Voice.Api.Authentication
Public Enum DashboardPermissions
ViewFiles
ViewNotifications
ViewSessions
ViewEndpoints
ViewReports
ViewCustomers
ViewFlows
End Enum
'''<Summary>
'''Creates a new login with the specified email address and password. Note: Any given email address can only exist once in the entire Evo Voice system.
'''</Summary>
<Api(Description:="Creates a new login with the specified email address and password. Note: Any given email address can only exist once in the entire Evo Voice system.")>
Public Partial Class NewUser
Implements IPost
'''<Summary>
'''The account ID you want to create this user under
'''</Summary>
<ApiMember(Description:="The account ID you want to create this user under")>
Public Overridable Property AccountId As String
'''<Summary>
'''The email address of the new user
'''</Summary>
<ApiMember(Description:="The email address of the new user")>
Public Overridable Property EmailAddress As String
'''<Summary>
'''The user's first name
'''</Summary>
<ApiMember(Description:="The user's first name")>
Public Overridable Property FirstName As String
'''<Summary>
'''The user's last name
'''</Summary>
<ApiMember(Description:="The user's last name")>
Public Overridable Property LastName As String
'''<Summary>
'''The password for the new user
'''</Summary>
<ApiMember(Description:="The password for the new user")>
Public Overridable Property Password As String
End Class
Public Partial Class UserInfo
Public Overridable Property Id As String
Public Overridable Property IsAuthenticated As Boolean
Public Overridable Property FirstName As String
Public Overridable Property LastName As String
Public Overridable Property Name As String
Public Overridable Property AvatarUrl As String
Public Overridable Property EmailAddress As String
Public Overridable Property Roles As List(Of String)
Public Overridable Property AccountIds As List(Of String)
Public Overridable Property AccountNames As List(Of String)
Public Overridable Property DashboardPermissions As List(Of DashboardPermissions)
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /users HTTP/1.1
Host: team.evovoice.io
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"accountId":"String","emailAddress":"String","firstName":"String","lastName":"String","password":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"id":"String","isAuthenticated":false,"firstName":"String","lastName":"String","name":"String","avatarUrl":"String","emailAddress":"String","roles":["String"],"accountIds":["String"],"accountNames":["String"],"dashboardPermissions":["ViewFiles"]}