メインコンテンツへスキップ

update-user

dci update-user id

Updates user information, including name, job function, phone, language, and role.

Request

Content-Type: application/json

Schema

{
"type": "object",
"description": "Fields allowed when updating an existing user.",
"properties": {
"firstName": {
"type": "string",
"description": "The user's first name."
},
"lastName": {
"type": "string",
"description": "The user's last name."
},
"jobTitle": {
"type": "string",
"description": "The user's job function.",
"enum": [
"Data Engineer / Data Analysts",
"Executive Team",
"Finance / Accounting",
"Founder",
"Legal / Purchasing",
"Management",
"Sales / Marketing",
"Software / Ops Engineer"
]
},
"jobFunction": {
"type": "string",
"deprecated": true,
"description": "Deprecated: use 'jobTitle' instead. If both are provided, 'jobTitle' takes precedence.",
"enum": [
"Data Engineer / Data Analysts",
"Executive Team",
"Finance / Accounting",
"Founder",
"Legal / Purchasing",
"Management",
"Sales / Marketing",
"Software / Ops Engineer"
]
},
"phone": {
"type": "string",
"description": "The user's country code (e.g., +44).",
"pattern": "^\\+[0-9]+$"
},
"phoneExtension": {
"type": "string",
"description": "The user's phone extension (8-15 digits).",
"pattern": "^[0-9]{8,15}$"
},
"language": {
"type": "string",
"description": "The user's preferred language.",
"enum": [
"en",
"ja"
]
},
"roleId": {
"type": "string",
"description": "The ID of the role to assign to the user."
}
}
}

Output

OK - User updated successfully.

By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.

FieldTypeDescription
messagestringSuccess message
userobjectThe updated user record.
user.idstringThe unique ID of the user.
user.displayNamestringThe user's display name.
user.firstNamestringThe user's first name.
user.lastNamestringThe user's last name.
user.emailstringThe user's email address.
user.jobTitlestringThe user's job function. One of: "Data Engineer / Data Analysts", "Executive Team", "Finance / Accounting", "Founder", "Legal / Purchasing", "Management", "Sales / Marketing", "Software / Ops Engineer".
user.phonestringThe user's country code (e.g., +44).
user.phoneExtensionstringThe user's phone extension.
user.languagestringThe user's preferred language. One of: "en", "ja".
user.roleIdstringThe ID of the user's role.
user.organizationIdstringThe ID of the user's organization.
Raw JSON schema
{
"type": "object",
"description": "Response of a user update operation.",
"properties": {
"message": {
"type": "string",
"description": "Success message"
},
"user": {
"type": "object",
"description": "The updated user record.",
"properties": {
"id": {
"type": "string",
"description": "The unique ID of the user."
},
"displayName": {
"type": "string",
"description": "The user's display name."
},
"firstName": {
"type": "string",
"description": "The user's first name."
},
"lastName": {
"type": "string",
"description": "The user's last name."
},
"email": {
"type": "string",
"description": "The user's email address."
},
"jobTitle": {
"type": "string",
"description": "The user's job function.",
"enum": [
"Data Engineer / Data Analysts",
"Executive Team",
"Finance / Accounting",
"Founder",
"Legal / Purchasing",
"Management",
"Sales / Marketing",
"Software / Ops Engineer"
]
},
"phone": {
"type": "string",
"description": "The user's country code (e.g., +44).",
"pattern": "^\\+[0-9]+$"
},
"phoneExtension": {
"type": "string",
"description": "The user's phone extension."
},
"language": {
"type": "string",
"description": "The user's preferred language.",
"enum": [
"en",
"ja"
]
},
"roleId": {
"type": "string",
"description": "The ID of the user's role."
},
"organizationId": {
"type": "string",
"description": "The ID of the user's organization."
}
}
}
}
}

Errors

On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.

HTTP statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
50040API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: updateuser