Skip to main content
PATCH
/
users
/
{user_id}
Update a user
curl --request PATCH \
  --url {schemes}://api.upsun.com/users/{user_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "username": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "picture": "<string>",
  "company": "<string>",
  "website": "<string>",
  "country": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "deactivated": true,
  "namespace": "<string>",
  "username": "<string>",
  "email": "jsmith@example.com",
  "email_verified": true,
  "first_name": "<string>",
  "last_name": "<string>",
  "picture": "<string>",
  "company": "<string>",
  "website": "<string>",
  "country": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "consented_at": "2023-11-07T05:31:56Z",
  "consent_method": "opt-in"
}

Authorizations

Authorization
string
header
required

Path Parameters

user_id
string<uuid>
required

The ID of the user.

Example:

"d81c8ee2-44b3-429f-b944-a33ad7437690"

Body

application/json
username
string

The user's username.

first_name
string

The user's first name.

last_name
string

The user's last name.

picture
string<uri>

The user's picture.

company
string

The user's company.

website
string<uri>

The user's website.

country
string

The user's country (2-letter country code).

Required string length: 2

Response

OK

id
string<uuid>
required

The ID of the user.

deactivated
boolean
required

Whether the user has been deactivated.

namespace
string
required

The namespace in which the user's username is unique.

username
string
required

The user's username.

email
string<email>
required

The user's email address.

email_verified
boolean
required

Whether the user's email address has been verified.

first_name
string
required

The user's first name.

last_name
string
required

The user's last name.

picture
string<uri>
required

The user's picture.

company
string
required

The user's company.

website
string<uri>
required

The user's website.

country
string
required

The user's ISO 3166-1 alpha-2 country code.

Required string length: 2
created_at
string<date-time>
required

The date and time when the user was created.

updated_at
string<date-time>
required

The date and time when the user was last updated.

consented_at
string<date-time>

The date and time when the user consented to the Terms of Service.

The method by which the user consented to the Terms of Service.

Available options:
opt-in,
text-ref