Skip to main content

get-customer

dci get-customer customerId

Returns the customer, including its general settings and contact info, scoped to \{customerId\}. \{customerId\} must match the customer resolved from the bearer token; a token scoped to a different customer gets 403, even if that customer would otherwise be reachable through a reseller/MTS relationship. Requires the Settings permission and DoiT API access (platform:externalApi).

Output

OK - Customer returned.

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

FieldTypeDescription
idstringCustomer ID.
namestringCustomer name.
primaryDomainstringCustomer's primary domain.
domainsarray of stringDomains associated with the customer.
urlSlugstringThe customer's active URL display name, used in Console URLs.
settingsobjectCustomer settings. Shared by the getCustomer response and the updateCustomer request body so a value is always read and written at the same path. currency accepts only the listed codes; any other value is rejected with 400. Unlike urlSlug and allowedInviteDomains it cannot be cleared - no value unsets it.
settings.currencystringCurrency code for monetary values. One of: "USD", "ILS", "EUR", "AUD", "CAD", "GBP", "DKK", "NOK", "SEK", "BRL", "SGD", "MXN", ….
settings.allowedInviteDomainsarray of stringEmail domains allowed to self-invite into the customer. Updating this field requires the UsersManager permission in addition to Settings. An empty array clears the list.
settings.mfaRequiredbooleanWhether users of this customer are required to enroll in multi-factor authentication. A missing value is treated as true. Disabling this does not remove MFA enrollments existing users already have.
contactobjectCustomer point-of-contact details. Shared by the getCustomer response and the updateCustomer request body so a value is always read and written at the same path.
contact.emailsarray of string (email)Point-of-contact email addresses for the customer.
Raw JSON schema
{
"type": "object",
"description": "Customer scoped to the authenticated tenant, including its settings and contact info.",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "Customer ID.",
"x-doit-confidentiality": "customer-data"
},
"name": {
"type": "string",
"description": "Customer name.",
"x-doit-confidentiality": "customer-data"
},
"primaryDomain": {
"type": "string",
"description": "Customer's primary domain.",
"x-doit-pii": true,
"x-doit-confidentiality": "customer-data"
},
"domains": {
"type": "array",
"description": "Domains associated with the customer.",
"items": {
"type": "string"
},
"x-doit-pii": true,
"x-doit-confidentiality": "customer-data"
},
"urlSlug": {
"type": "string",
"description": "The customer's active URL display name, used in Console URLs.",
"x-doit-confidentiality": "customer-data"
},
"settings": {
"type": "object",
"description": "Customer settings. Shared by the `getCustomer` response and the `updateCustomer` request body so a value is always read and written at the same path.\n\n`currency` accepts only the listed codes; any other value is rejected with `400`. Unlike `urlSlug` and `allowedInviteDomains` it cannot be cleared - no value unsets it.",
"properties": {
"currency": {
"description": "Currency code for monetary values.",
"type": "string",
"enum": [
"USD",
"ILS",
"EUR",
"AUD",
"CAD",
"GBP",
"DKK",
"NOK",
"SEK",
"BRL",
"SGD",
"MXN",
"CHF",
"MYR",
"TWD",
"EGP",
"ZAR",
"JPY",
"IDR",
"AED",
"THB",
"COP"
]
},
"allowedInviteDomains": {
"type": "array",
"description": "Email domains allowed to self-invite into the customer. Updating this field requires the `UsersManager` permission in addition to `Settings`. An empty array clears the list.",
"items": {
"type": "string"
},
"x-doit-pii": true,
"x-doit-confidentiality": "customer-data"
},
"mfaRequired": {
"type": "boolean",
"description": "Whether users of this customer are required to enroll in multi-factor authentication. A missing value is treated as `true`. Disabling this does not remove MFA enrollments existing users already have.",
"x-doit-confidentiality": "customer-data"
}
}
},
"contact": {
"type": "object",
"description": "Customer point-of-contact details. Shared by the `getCustomer` response and the `updateCustomer` request body so a value is always read and written at the same path.",
"properties": {
"emails": {
"type": "array",
"description": "Point-of-contact email addresses for the customer.",
"items": {
"type": "string",
"format": "email"
},
"x-doit-pii": true,
"x-doit-confidentiality": "customer-data"
}
}
}
}
}

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.
40420RESOURCE_NOT_FOUNDThe requested resource does not exist. Check the identifier argument.
50040API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: getcustomer