Update user
const url = 'https://acme.mykreezalid.com/api/v1/users/1/update';const options = { method: 'PUT', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"email":"jane@example.com","group_id":784568,"password":"example","avatar":"example","external_id":"ABCdef123456","account_type":"individual","first_name":"Jane","last_name":"Doe","username":"janedoe","business_name":"ACME","address_line1":"example","address_line2":"example","address_city":"example","address_zipcode":"example","address_state":"example","address_country":"US","nationality":"US","phone_country_code":"+1","phone_number":"212-398-2600","lang":"en","timezone":"America/New_York","active":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://acme.mykreezalid.com/api/v1/users/1/update \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "email": "jane@example.com", "group_id": 784568, "password": "example", "avatar": "example", "external_id": "ABCdef123456", "account_type": "individual", "first_name": "Jane", "last_name": "Doe", "username": "janedoe", "business_name": "ACME", "address_line1": "example", "address_line2": "example", "address_city": "example", "address_zipcode": "example", "address_state": "example", "address_country": "US", "nationality": "US", "phone_country_code": "+1", "phone_number": "212-398-2600", "lang": "en", "timezone": "America/New_York", "active": true }'Updates the fields you send and leaves the others unchanged. The response says whether the update was saved: check success.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”User’s unique identifier
Request Bodyrequired
Section titled “Request Bodyrequired”object
Must not be used by another user
Example
jane@example.comIdentifier of an existing group
Example
784568If you leave it out on creation, a random password is set: the user then chooses one with the password reset.
URL of an image to download and use as the profile image
Example
ABCdef123456Example
JaneExample
DoeExample
janedoeExample
ACMETwo-letter country code. Defaults to your marketplace’s country on creation.
Example
USTwo-letter country code. Defaults to your marketplace’s country on creation.
Example
USExample
+1Example
212-398-2600Example
enDefaults to your marketplace’s time zone on creation.
Example
America/New_YorkEnables (true) or disables (false) the account
Responses
Section titled “Responses”Whether the user has been updated
object
User has been updated, or Error. No update made. when nothing was saved
Example
{ "success": true, "message": "User has been updated"}No user has this identifier.