Loading...

POST   https://api.3seventy.com/api/v2.1/account/{accountId}/user

Description

Creates a new user for the supplied account ID with the given details.

Path Parameters

accountId integer The account ID to assign the user to. required

Request Properties application/json

Password string The login password for the new user. required
PasswordConfirmation string Confirmation password, must match Password. required
Email string Email address of the user. required
FirstName string The user's first or given name. optional
LastName string The user's last or family name. optional
PhoneNumber string The user's mobile phone number. required
IsChatUser boolean Chat agent has access to Call Center only. optional
Comment string Gets or sets application-specific information for the membership user. optional
IsApproved boolean Gets or sets whether the membership user can be authenticated. optional
IsLockedOut boolean Gets a value indicating whether the membership user is locked out and unable to be validated. optional
{
  "Password": "password",
  "PasswordConfirmation": "password",
  "Email": "test@test.com",
  "FirstName": "FirstName",
  "LastName": "Last Name",
  "PhoneNumber": "+15125015940",
  "IsChatUser": false,
  "Comment": "",
  "IsApproved": true,
  "IsLockedOut": false
}

C#


using System;
using System.Collections.Generic;
using System.Linq;
using ThreeSeventy.Vector.Client;
using ThreeSeventy.Vector.Client.Models;

public class Program
{

private static void Main(string[] args)
{

const int accountId = XXX;

var context = new T70Context();

var userRepo = context.Repository<User>(new { AccountId = accountId });

var item = new User()
{

AccountId = XXXXX,

Email = "XXXXXXX",

UserName = "XXXXXXXX",

FirstName = "XXXXXX",

LastName = "XXXXXX",

Password = "XXXXXXX",

PasswordConfirmation = "XXXXXXX"

};

userRepo.Add(item);

}

}