> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an account

> Create an account

### Request body

`CreateGlAccountRequest`

<ParamField body="account_number" type="string" required>
  Structured account code (e.g. `'1010'`).
</ParamField>

<ParamField body="account_sub_type" type="string,null">
  Optional sub-type (e.g. `cash`, `accounts_receivable`, `sales_revenue`).
</ParamField>

<ParamField body="account_type" type="string" required>
  One of `asset`, `liability`, `equity`, `revenue`, `expense`.
</ParamField>

<ParamField body="currency" type="string,null">
  ISO-4217 currency code (e.g. `USD`).
</ParamField>

<ParamField body="description" type="string,null" />

<ParamField body="is_header" type="boolean,null" />

<ParamField body="is_posting" type="boolean,null" />

<ParamField body="name" type="string" required />

<ParamField body="parent_account_id" type="string,null" />

### Responses

<ResponseField name="201" type="GlAccountResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/gl/accounts' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "account_number": "string",
    "account_sub_type": null,
    "account_type": "string",
    "currency": null,
    "description": null,
    "is_header": null,
    "is_posting": null,
    "name": "string",
    "parent_account_id": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "account_number": "string",
    "account_sub_type": null,
    "account_type": "string",
    "created_at": "string",
    "currency": "string",
    "current_balance": "string",
    "description": null,
    "id": "string",
    "is_header": true,
    "is_posting": true,
    "name": "string",
    "normal_balance": "string",
    "parent_account_id": null,
    "status": "string"
  }
  ```
</ResponseExample>
