Accounts

Create an account

Open a new account for a user or business entity.

The Create Account endpoint registers a new account in the system. Depending on your setup, this can represent either an individual account or a business account.

Endpoint

POST /v1/accounts

Headers

Key

Value

Required

Content-Type

application/json

Yes

Authorization

Bearer <access_token>

Required for admin-created accounts

Request Body

{
  "email": "owner@example.com",
  "name": "Acme Inc.",
  "type": "business",
  "password": "secure_password_here",
  "settings": {
    "currency": "USD",
    "timezone": "America/New_York",
    "language": "en"
  }
}

Field

Type

Required

Description

email

string

Yes

The primary email for the account. Must be unique.

name

string

Yes

The account name (business or individual).

type

string

Yes

Either individual or business.

password

string

Yes

A strong password for login authentication.

settings

object

No

Account preferences like currency, timezone, and language.

Response

Successful Response (201 Created)

{
  "id": "acct_001",
  "email": "owner@example.com",
  "name": "Acme Inc.",
  "type": "business",
  "status": "active",
  "created_at": "2025-09-18T20:05:00Z",
  "updated_at": "2025-09-18T20:05:00Z",
  "settings": {
    "currency": "USD",
    "timezone": "America/New_York",
    "language": "en"
  }
}

Field

Type

Description

id

string

Unique identifier of the created account.

email

string

Account email.

name

string

Account name.

type

string

individual or business.

status

string

Account status, usually active upon creation.

created_at

string

ISO 8601 timestamp of creation.

updated_at

string

ISO 8601 timestamp of last update.

settings

object

Saved preferences.

Error Response (400 / 409)

{
  "error": "email_exists",
  "message": "An account with this email already exists."
}

Error Code

Meaning

invalid_request

Missing or malformed fields.

email_exists

Another account already uses this email.

unauthorized

Attempt to create an account without required permissions.

Example Usage

cURL

curl -X POST "https://api.example.com/v1/accounts" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer admin_access_token" \
  -d '{
    "email": "owner@example.com",
    "name": "Acme Inc.",
    "type": "business",
    "password": "secure_password_here",
    "settings": {
      "currency": "USD",
      "timezone": "America/New_York",
      "language": "en"
    }
  }'

JavaScript (Fetch)

const response = await fetch("https://api.example.com/v1/accounts", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer admin_access_token"
  },
  body: JSON.stringify({
    email: "owner@example.com",
    name: "Acme Inc.",
    type: "business",
    password: "secure_password_here",
    settings: {
      currency: "USD",
      timezone: "America/New_York",
      language: "en"
    }
  })
});

const data = await response.json();
console.log(data.id);

To avoid duplicate accounts, always validate email uniqueness on the client side before creating. Passwords must follow your security policy (length, complexity, etc.).

Need help? Contact Support

Questions? Contact Sales

On this page

Create a free website with Framer, the website builder loved by startups, designers and agencies.