JSON API » people » people/update

Updates an existing person.

Input parameters

Requires authentication and the user or wholesale role privileges. If you don't have the administrator or wholesale role privileges, you may only update restricted fields within your own person.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idIntegerID of person to update.Yes
companyStringCompany name.NoCurrent value.
countryStringTwo letter country code.NoCurrent value.
date_formatStringDate format. "DD/MM/YYYY", "MM/DD/YYYY", or "YYYY-MM-DD".NoCurrent value.
descriptionStringDescription.NoCurrent value.
emailStringEmail address(es).NoCurrent value.
extensionStringNumber for forward to in dial by name. Empty string for none.NoCurrent value.
faxStringFax number.NoCurrent value.
forenameStringFirst name.NoCurrent value.
languageStringLanguage code. Empty string for default.NoCurrent value.
mobileStringMobile (cellular) number.NoCurrent value.
passwordStringPassword.NoCurrent value.
public_keyStringGPG public key.NoCurrent value.
roleIntegerID of role.NoCurrent value.
sourceStringSource IP address(es). Empty string for any.NoCurrent value.
surnameStringLast name.NoCurrent value.
telephoneStringTelephone number.NoCurrent value.
time_formatStringTime format. "12" or "24".NoCurrent value.
timezoneStringTime zone. Empty string for default.NoCurrent value.
titleStringTitle.NoCurrent value.
usernameStringUser name.NoCurrent value.
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
201Input passed validation. Only returned if validation=1.
204Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your rate plan does not allow this.
404The person does not exist, or you do not have permission to update them.

Data returned

No data is returned.

Example: Changing the username

http://enswitch.example.com/api/json/people/update/?auth_username=user;auth_password=password;id=123;username=user@example.com

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
3.13Function added.