# Create an Account

> Solarium docs, Accounts. All requests are `POST https://api.trysolarium.com/graphql/` with `Authorization: Bearer <api key>` and a JSON body `{"query": ..., "variables": ...}`. Every query and mutation takes an `organizationId` (find it with `myOrganizations`). Index of all pages: https://trysolarium.com/llms.txt

Creates a new account in the chart of accounts.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `name` | `String!` | Yes | Account name |
| `taxCodeId` | `UUID!` | Yes | CRA Tax Code code ID. Determines account type and classification. Use listTaxCodes to get available codes. |
| `lastFour` | `String` | No | Last 4 digits of card/account for payment matching |
| `parentId` | `UUID` | No | Parent account ID for hierarchical accounts |

### Request

```graphql
mutation {
  createAccount(
    organizationId: "a1b2c3d4-..."
    name: "Office Supplies"
    taxCodeId: "tax-code-uuid-for-8711"
  ) {
    account {
      id
      name
      accountType
      classification
      taxCode { code name }
    }
    success
    error
  }
}
```

### Response

```json
{
  "data": {
    "createAccount": {
      "account": {
        "id": "f7e6d5c4-...",
        "name": "Office Supplies",
        "accountType": "expense",
        "classification": "expense",
        "taxCode": {
          "code": "8711",
          "name": "Office stationery and supplies"
        }
      },
      "success": true,
      "error": null
    }
  }
}
```
