# Create a new account

> [!WARNING] 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

**`email`**

- Required
- Type: string
- Example: `"foo@bar.com"`

Email

**`password`**

- Required
- Type: string

Password

**`first_name`**

- Optional
- Type: string, null
- Example: `"Mark"`

First name

**`last_name`**

- Optional
- Type: string, null
- Example: `"Smith"`

Last name

**`company`**

- Optional
- Type: string, null
- Example: `"Dundler Mifflin"`

Company name

**`captcha_token`**

- Optional
- Type: string
- Example: `"0.6IlxLLPqSAjOaTUvKDnCDQ.rB6UBUW4dGZWZOmHnFVKa5b4qNVvKgOxvGDNJ4qFqR8"`

Cloudflare Turnstile token proving the sign up was not automated. Obtained from the Turnstile widget rendered next to the sign up form, and valid for 300 seconds and a single verification. Required for browser-based sign ups.

**`signup_to_newsletter`**

- Optional
- Type: boolean

Whether the user opts-in to signup to DatoCMS newletter

**`role_description`**

- Optional
- Type: enum
- Example: `"lead_developer"`

Role description that best describes you

<details>
<summary>Show enum values</summary>

**`cto`**

- Optional

CTO / Technical Director

**`lead_developer`**

- Optional

Lead Developer / Engineering Manager

**`frontend_developer`**

- Optional

Frontend Developer

**`web_designer`**

- Optional

**`digital_marketing`**

- Optional

Digital Marketing

**`project_manager`**

- Optional

Project Manager

**`designer`**

- Optional

Digital Designer (Web, Visual, Motion, UI, UX)

**`content`**

- Optional

Content Manager / Writer / Translator

</details>

**`role_context`**

- Optional
- Type: enum
- Example: `"company"`

Context in which you perform your role

<details>
<summary>Show enum values</summary>

**`agency`**

- Optional

I work at an agency

**`company`**

- Optional

I work in-house at a company

**`freelancer`**

- Optional

I am a freelancer

**`student`**

- Optional

I am a student

</details>

**`acquisition_method`**

- Optional
- Type: object

<details>
<summary>Show object format</summary>

**`medium`**

- Required
- Type: string

**`source`**

- Required
- Type: string

**`campaign`**

- Optional
- Type: string

</details>

**`latest_acquisition_method`**

- Optional
- Type: object

<details>
<summary>Show object format</summary>

**`medium`**

- Required
- Type: string

**`source`**

- Required
- Type: string

**`campaign`**

- Optional
- Type: string

</details>

## Returns

Returns a resource object of type [session](https://www.datocms.com/docs/content-management-api/resources/session.md)

## Examples

###### Example Basic example

Code

```javascript
import { buildClient } from "@datocms/dashboard-client";

async function run() {
  const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });

  const account = await client.account.create({
    email: "foo@bar.com",
    password: "",
  });

  // Check the 'Returned output' tab for the result ☝️
  console.log(account);
}

run();
```

Returned output

```javascript
{
  id: "eyJCJhbGci.eyJhaWwuY29tIn0.32wQOMci",
  account: { type: "account", id: "312" },
}
```

## Related content in "Dashboard API"

- [Account](https://www.datocms.com/docs/dashboard-api/resources/account.md)
- [Create a new account](https://www.datocms.com/docs/dashboard-api/resources/account/create.md)
- [Update a account](https://www.datocms.com/docs/dashboard-api/resources/account/update.md)
- [Delete a account](https://www.datocms.com/docs/dashboard-api/resources/account/destroy.md)
- [Retrieve a account](https://www.datocms.com/docs/dashboard-api/resources/account/self.md)
- [Request a password reset](https://www.datocms.com/docs/dashboard-api/resources/account/reset_password.md)
- [Activates 2-factor authorization](https://www.datocms.com/docs/dashboard-api/resources/account/activate_2fa.md)
- [Generates 2-factor authorization secrets](https://www.datocms.com/docs/dashboard-api/resources/account/reset_2fa.md)
- [De-activates 2-factor authorization](https://www.datocms.com/docs/dashboard-api/resources/account/deactivate_2fa.md)
- [Convert to organization](https://www.datocms.com/docs/dashboard-api/resources/account/convert_to_organization.md)
- [Confirm email change](https://www.datocms.com/docs/dashboard-api/resources/account/confirm_email_change.md)
- [Complete email verification](https://www.datocms.com/docs/dashboard-api/resources/account/complete_email_verification.md)
- [Request email verification](https://www.datocms.com/docs/dashboard-api/resources/account/request_email_verification.md)
- [Session](https://www.datocms.com/docs/dashboard-api/resources/session.md)
- [OAuth application](https://www.datocms.com/docs/dashboard-api/resources/oauth-application.md)
- [Organization](https://www.datocms.com/docs/dashboard-api/resources/organization.md)
- [Organization role](https://www.datocms.com/docs/dashboard-api/resources/organization-role.md)
- [Organization invitation](https://www.datocms.com/docs/dashboard-api/resources/organization-invitation.md)
- [Organization membership](https://www.datocms.com/docs/dashboard-api/resources/organization-membership.md)
- [Organization mandate request](https://www.datocms.com/docs/dashboard-api/resources/organization-mandate-request.md)
- [Organization mandate](https://www.datocms.com/docs/dashboard-api/resources/organization-mandate.md)
- [Project](https://www.datocms.com/docs/dashboard-api/resources/site.md)
- [Site invitation](https://www.datocms.com/docs/dashboard-api/resources/site-invitation.md)
- [Site transfer request](https://www.datocms.com/docs/dashboard-api/resources/site-transfer.md)
- [Account subscription](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-subscription.md)
- [Plan](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-plan.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-billing-profile.md)
- [Invoice](https://www.datocms.com/docs/dashboard-api/resources/invoice.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/resource-usage.md)
- [Daily Usage](https://www.datocms.com/docs/dashboard-api/resources/daily-usage.md)
- [Subscription limit](https://www.datocms.com/docs/dashboard-api/resources/subscription-limit.md)
- [Subscription feature](https://www.datocms.com/docs/dashboard-api/resources/subscription-feature.md)
- [Job result](https://www.datocms.com/docs/dashboard-api/resources/job-result.md)
- [Per-project subscription](https://www.datocms.com/docs/dashboard-api/resources/site-subscription.md)
- [Plan](https://www.datocms.com/docs/dashboard-api/resources/site-plan.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/per-site-pricing-billing-profile.md)