Loading...

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

Description

Updates a user with the supplied details.

Path Parameters

accountId integer The account ID that the user belongs to. required
username string The ID of the user to update. required

Request Properties application/json

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. optional
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


                    

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 = XXXX;

const string userName = "XXXXX";

var context = new T70Context();

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

var item = userRepo.Get(userName);

item.LastName = "XXXXX";

userRepo.Update(item);

}

}