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.
| Field | Type | Description |
|---|---|---|
message | string | Success message |
user | object | The updated user record. |
user.id | string | The unique ID of the user. |
user.displayName | string | The user's display name. |
user.firstName | string | The user's first name. |
user.lastName | string | The user's last name. |
user.email | string | The user's email address. |
user.jobTitle | string | The user's job function. One of: "Data Engineer / Data Analysts", "Executive Team", "Finance / Accounting", "Founder", "Legal / Purchasing", "Management", "Sales / Marketing", "Software / Ops Engineer". |
user.phone | string | The user's country code (e.g., +44). |
user.phoneExtension | string | The user's phone extension. |
user.language | string | The user's preferred language. One of: "en", "ja". |
user.roleId | string | The ID of the user's role. |
user.organizationId | string | The 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 status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 500 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Aliases: updateuser