API Reference / Users
Update a user
Updates the caller's own display name or login email address. The target is always the caller resolved from the session or API key, never a request field, so a caller can never name a different user to update. Only the fields you supply are changed.
/ accounts. v1. Accounts/ UpdateUserRequest body
application/jsonRequired
Request to update the calling user's own profile. Only the display name can change. ChangeEmail changes the email address.
email?stringMust equal the current address, ignoring case, or the request is rejected with invalid_argument. It never changes the address. Absent leaves it unchanged.
name?stringNew display name, 1 to 256 characters after trimming. Absent leaves the name unchanged.
Response body
application/json
Success
user?UserThe user's updated account details.
Show attributes
avatarUrl?stringURL of the user's avatar image, taken from their linked Discord account. Empty when there is none.
createdAt?stringWhen the account was created.
Format"date-time"
email?stringThe user's email address, stored lowercase and unique across users.
id?stringOpaque 16-byte identifier of the user, assigned when the account is created. Base64-encoded in JSON.
Format"byte" base64
isAdministrator?booleanTrue when the user is a platform administrator with access across every workspace.
name?stringThe user's display name, 1 to 256 characters.
status?stringThe account's status. A suspended user can no longer sign in.
Value in"USER_"USER_
updatedAt?stringWhen the account was last changed.
Format"date-time"
application/json
The request was malformed, such as a missing required field or an unparseable cursor.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The requested resource does not exist in this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The resource already exists.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request was rate limited. Slow down and retry later.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/accounts.v1.Accounts/UpdateUser" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Jordan A. Hale"
}'const res = await fetch("https://api.goldmine.to/accounts.v1.Accounts/UpdateUser", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Jordan A. Hale"
}),
});
const data = await res.json();body := strings.NewReader(`{
"name": "Jordan A. Hale"
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/accounts.v1.Accounts/UpdateUser", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/accounts.v1.Accounts/UpdateUser",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"name": "Jordan A. Hale"
},
)
data = res.json(){
"user": {
"id": "EjRWeBI0VniQEjRWeBI0Vg==",
"name": "Jordan A. Hale",
"email": "jordan@acme.example",
"status": "active",
"createdAt": "2026-01-15T10:00:00Z",
"updatedAt": "2026-06-29T12:05:00Z"
}
}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "not_found",
"message": "The requested resource does not exist in this workspace."
}{
"code": "already_exists",
"message": "The resource already exists."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}