Skip to main content
PATCH
/
users
/
{user_id}
Update a user
curl --request PATCH \
  --url https://api.platform.dakota.xyz/users/{user_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-idempotency-key: <x-idempotency-key>' \
  --data '
{
  "first_name": "John",
  "last_name": "Doe",
  "role": "admin"
}
'
{
  "type": "https://docs.dakota.xyz/api-reference/errors#invalid-request",
  "title": "Invalid request",
  "status": 400,
  "detail": "Invalid request",
  "instance": "https://api.platform.dakota.xyz/users/example-id",
  "request_id": "req_01hzy6y7v8w9x0y1z2a3b4c5d6"
}

Authorizations

x-api-key
string
header
required

Headers

x-idempotency-key
string<uuid>
required

Unique key to ensure request idempotency. If the same key is used within a certain time window, the original response will be returned instead of executing the request again.

Path Parameters

user_id
string
required

Unique identifier of the user to update KSUID is a 27-character globally unique ID that combines a timestamp with a random component. Used for all entity identifiers in the Dakota platform.

Required string length: 27
Pattern: ^[0-9A-Za-z]{27}$
Example:

"1NFHrqBHb3cTfLVkFSGmHZqdDPi"

Body

application/json

Updated user details

Request body for updating a client user

first_name
string

Given name of the user

Minimum string length: 1
Example:

"John"

last_name
string

Surname of the user

Minimum string length: 1
Example:

"Doe"

role
enum<string>

Role that can be assigned to a client user

Available options:
admin,
viewer
Example:

"admin"

Response

user updated successfully