Dashboard API > Account
Update a account
Warning: Experimental API
Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.
Body parameters
emailstringOptional
Example:
"foo@bar.com"
first_namestring, nullOptional
First name
Example:
"Mark"
last_namestring, nullOptional
Last name
Example:
"Smith"
companystring, nullOptional
Company name
Example:
"Dundler Mifflin"
passwordstringOptional
New password
current_passwordstringOptional
Current password (required if new_password or email is set)
otp_codestringOptional
Two-factor authentication one-time password (required if new_password or email is set)
Example:
"123512"
default_organizationOptional
Type:null, <a href="/docs/content-management-api/resources/organization">ResourceLinkage<"organization"></a>
Returns
Returns a resource object of type session
Examples
import { buildClient } from "@datocms/dashboard-client";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const account = await client.account.update({ id: "312" });
// Check the 'Returned output' tab for the result ☝️ console.log(account);}
run();{ id: "eyJCJhbGci.eyJhaWwuY29tIn0.32wQOMci", account: { type: "account", id: "312" },}