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

# Create accounts

> Permissions required: **Manage Accounts**

Open one or more accounts.

An FBO or omnibus account created with a parentId is refused with one of these messages:

* `FBO accounts cannot have a parent account` or `OMNIBUS accounts cannot have a parent account` - nested accounts are not enabled for your organization.
* `isDisclosed is inherited from the parent account` - an account with a parentId must not send isDisclosed.
* `parent account not found` - no account with that id exists in your organization.
* `parent account must be an FBO or OMNIBUS account` - a segregated account cannot hold accounts.
* `a pure OMNIBUS cannot be placed under another account` - an omnibus with SELF ledgering is always top level.
* `OMNIBUS accounts with SELF ledgering cannot have child accounts` - a pure omnibus holds no accounts.
* `an account's children must all be of one kind` - the parent already holds segregated accounts.
* `parent account is closed`, `parent account is closing` or `parent account is not open` - the parent must be OPEN.
* `parent account is frozen` - the parent is frozen.
* `an ancestor account is frozen` - an account above the parent is frozen.
* `account tree depth limit reached` - the new account would sit too deep in the tree.



## OpenAPI

````yaml /knowledge-base/openapi/v4.yaml post /accounts
openapi: 3.1.0
info:
  title: Anchorage Digital Account APIs (v4)
  version: 4.0.0-beta
  description: >-
    Reference for the Anchorage Digital v4 API, the surface behind Crypto as a
    Service: account management (accounts and the account tree, beneficiaries,
    freeze/unfreeze/close), balances and transactions, trusted destinations,
    orders and allocations, withdrawals, deposit instructions, deposit
    attributions, the policy engine (policies, approval keys), and supported
    asset types. Approval groups, endorsements, compliance profiles, customers
    (onboarding), fee configuration updates, interest enrollment, funding
    allocations, and destination removal are under construction and return
    mocked data only.


    Status: BETA. The v4 API is available in the sandbox only
    (https://api.anchorage-staging.com/v4) and is not available in production
    yet. The contract may change until general availability. Which endpoints are
    live, in final testing, or under construction:
    https://docs.anchorage.com/platform/developers/caas/caas-overview


    Authentication: every request carries an `Api-Access-Key` header. Every
    POST, PATCH, and DELETE additionally requires an `Idempotency-Key`, and is
    signed with `Api-Signature` (hex-encoded Ed25519 over
    `timestamp_epoch_seconds + uppercase(http_method) + request_path +
    request_body`) plus `Api-Timestamp` (unix epoch seconds).


    Pagination: list endpoints accept `after` (cursor) and `limit` (page size, 1
    to 1000, default 100) and return a `page.endCursor` to continue from. Errors
    use a common envelope with a human-readable `message`; batch endpoints
    return a result per item instead.


    Guides: https://docs.anchorage.com/platform/developers/caas/caas-overview
servers:
  - url: https://api.anchorage-staging.com/v4
security:
  - Api-Access-Key: []
tags:
  - name: Accounts
  - name: Compliance Profiles
  - name: Balances
  - name: Transactions
  - name: Trusted Destinations
  - name: Orders & Allocations
  - name: Withdrawals
  - name: Deposit Instructions
  - name: Deposit Attributions
  - name: Policies
  - name: Approval Groups
  - name: Endorsements
  - name: Customers
  - name: Asset Types
paths:
  /accounts:
    post:
      tags:
        - Accounts
      summary: Create accounts
      description: >-
        Permissions required: **Manage Accounts**


        Open one or more accounts.


        An FBO or omnibus account created with a parentId is refused with one of
        these messages:


        * `FBO accounts cannot have a parent account` or `OMNIBUS accounts
        cannot have a parent account` - nested accounts are not enabled for your
        organization.

        * `isDisclosed is inherited from the parent account` - an account with a
        parentId must not send isDisclosed.

        * `parent account not found` - no account with that id exists in your
        organization.

        * `parent account must be an FBO or OMNIBUS account` - a segregated
        account cannot hold accounts.

        * `a pure OMNIBUS cannot be placed under another account` - an omnibus
        with SELF ledgering is always top level.

        * `OMNIBUS accounts with SELF ledgering cannot have child accounts` - a
        pure omnibus holds no accounts.

        * `an account's children must all be of one kind` - the parent already
        holds segregated accounts.

        * `parent account is closed`, `parent account is closing` or `parent
        account is not open` - the parent must be OPEN.

        * `parent account is frozen` - the parent is frozen.

        * `an ancestor account is frozen` - an account above the parent is
        frozen.

        * `account tree depth limit reached` - the new account would sit too
        deep in the tree.
      operationId: createAccounts
      parameters:
        - name: Idempotency-Key
          in: header
          schema:
            type: string
          required: true
          description: >-
            Client-supplied key that deduplicates retried requests. Reusing a
            key returns the original result instead of repeating the action.
        - name: Api-Signature
          in: header
          required: true
          schema:
            type: string
            pattern: ^[0-9A-Fa-f]{128,160}$
          description: >-
            A hex-encoded Ed25519 signature of `timestamp_epoch_seconds +
            uppercase(http_method) + request_path + request_body`.
        - name: Api-Timestamp
          in: header
          required: true
          schema:
            type: integer
            format: int64
          description: Current timestamp, represented as unix epoch seconds
      requestBody:
        description: Accounts to create
        required: true
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/CreateAccountRequest'
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAccountsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
components:
  schemas:
    CreateAccountRequest:
      title: Create Account Request
      description: >-
        Details of an account to create. The `type` discriminator selects
        SegregatedAccount, Omnibus, or FBO.
      discriminator:
        propertyName: type
        mapping:
          SEGREGATED: '#/components/schemas/CreateSegregatedAccountRequest'
          OMNIBUS: '#/components/schemas/CreateOmnibusAccountRequest'
          FBO: '#/components/schemas/CreateFboAccountRequest'
      oneOf:
        - $ref: '#/components/schemas/CreateFboAccountRequest'
        - $ref: '#/components/schemas/CreateOmnibusAccountRequest'
        - $ref: '#/components/schemas/CreateSegregatedAccountRequest'
    CreateAccountsResponse:
      title: Create Accounts Response
      description: Per-item results for a batch account creation request.
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BatchItemResult'
    ErrorDetails:
      title: ErrorDetails
      type: object
      properties:
        message:
          description: A human-readable message providing more details about the error.
          example: Missing required field 'amount'.
          type: string
      required:
        - message
    CreateSegregatedAccountRequest:
      title: Create Segregated Account
      type: object
      description: >-
        Details of the segregatedAccount to create. Disclosure follows from the
        parent account (FBO or omnibus), not from a field on this object.
      properties:
        complianceProfileId:
          description: >-
            Reference to the Compliance Profile holding this account's tax
            classification, customers, and signers. Optional; immutable once the
            account is created.
          type: string
          format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
        name:
          type: string
          description: The name of the account.
        externalId:
          type: string
          description: The external unique identifier used to identify this account.
          minLength: 1
        parentId:
          type: string
          description: >-
            The account id of the parent account (FBO or omnibus) this account
            is under. Whether this segregatedAccount is disclosed or undisclosed
            follows from its parent.
          minLength: 1
        type:
          type: string
          description: Set to `SEGREGATED` to create a segregated account.
          enum:
            - SEGREGATED
      required:
        - parentId
        - type
    CreateOmnibusAccountRequest:
      title: Create Omnibus Account
      type: object
      description: >-
        Pure Omnibus account: all customers share one org-level on-chain wallet
        per asset.
      properties:
        complianceProfileId:
          description: >-
            Reference to the Compliance Profile holding this account's tax
            classification, customers, and signers. Optional; immutable once the
            account is created.
          type: string
          format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
        isDisclosed:
          type: boolean
          description: >-
            Whether the underlying segregatedAccounts are disclosed. Each value
            of this flag must be contractually approved — operating disclosed vs
            undisclosed is a contractual matter. On create, required on a
            top-level account and must be absent on an account with a parentId:
            it is inherited from the top of the branch.
        name:
          type: string
          description: The name of the account.
          minLength: 1
        externalId:
          type: string
          description: The external unique identifier used to identify this account.
          minLength: 1
        parentId:
          type: string
          description: >-
            Optional. The account id of the parent account this account is
            under. The parent must be an FBO or an omnibus with SEGREGATED
            ledgering. A pure omnibus (SELF ledgering) is always top level. An
            account's children are either all accounts that hold accounts (FBO
            or omnibus) or all segregated accounts.
        type:
          type: string
          description: Set to `OMNIBUS` to create an omnibus account.
          enum:
            - OMNIBUS
        ledgering:
          type: string
          description: >-
            Where balances for this omnibus account are ledgered: SELF for
            org-level aggregate balance (Pure Omnibus), SEGREGATED for
            per-customer virtual balances.
          enum:
            - SELF
            - SEGREGATED
          default: SELF
      required:
        - type
    CreateFboAccountRequest:
      title: Create FBO Account
      type: object
      description: >-
        Details of the FBO (for-benefit-of) account to create: a parent
        container that segregated accounts reference via parentId.
      properties:
        complianceProfileId:
          description: >-
            Reference to the Compliance Profile holding this account's tax
            classification, customers, and signers. Optional; immutable once the
            account is created.
          type: string
          format: uuid
          example: 3486b413-93d3-4447-afce-2b9c9dc34a32
        isDisclosed:
          type: boolean
          description: >-
            Whether the underlying segregatedAccounts are disclosed. Each value
            of this flag must be contractually approved — operating disclosed vs
            undisclosed is a contractual matter. On create, required on a
            top-level account and must be absent on an account with a parentId:
            it is inherited from the top of the branch.
        name:
          type: string
          description: The name of the account.
          minLength: 1
        externalId:
          type: string
          description: The external unique identifier used to identify this account.
          minLength: 1
        parentId:
          type: string
          description: >-
            Optional. The account id of the parent account this account is
            under. The parent must be an FBO or an omnibus with SEGREGATED
            ledgering. A pure omnibus (SELF ledgering) is always top level. An
            account's children are either all accounts that hold accounts (FBO
            or omnibus) or all segregated accounts.
        type:
          type: string
          description: Set to `FBO` to create an FBO account.
          enum:
            - FBO
      required:
        - type
    BatchItemResult:
      title: Batch Item Result
      type: object
      description: The per-item result of a batch action, discriminated by status.
      discriminator:
        propertyName: status
        mapping:
          SUCCESS: '#/components/schemas/BatchItemSuccessResult'
          ERROR: '#/components/schemas/BatchItemErrorResult'
      oneOf:
        - $ref: '#/components/schemas/BatchItemSuccessResult'
        - $ref: '#/components/schemas/BatchItemErrorResult'
    BatchItemSuccessResult:
      title: Batch Item Success Result
      type: object
      description: Successful outcome for one item of a batch request.
      properties:
        index:
          $ref: '#/components/schemas/BatchItemIndex'
        id:
          $ref: '#/components/schemas/BatchItemId'
        status:
          type: string
          description: Outcome of the action for this item
          enum:
            - SUCCESS
          default: SUCCESS
      required:
        - index
        - id
        - status
    BatchItemErrorResult:
      title: Batch Item Error Result
      type: object
      description: >-
        Failed outcome for one item of a batch request. Other items in the same
        batch may still have succeeded.
      properties:
        index:
          $ref: '#/components/schemas/BatchItemIndex'
        id:
          $ref: '#/components/schemas/BatchItemId'
        status:
          type: string
          description: Outcome of the action for this item
          enum:
            - ERROR
          default: ERROR
        error:
          description: Human-readable reason the item failed.
          type: string
      required:
        - index
        - status
        - error
    BatchItemIndex:
      title: Batch Item Index
      type: integer
      minimum: 0
      description: >-
        The 0-based position of this item in the request. Always present
        regardless of outcome, so a result can be correlated with its request
        item even when no id was ever assigned.
    BatchItemId:
      title: Batch Item ID
      type: string
      description: >-
        Unique identifier of the item this result applies to. Always present on
        success. On error, present only if an id was assigned before the item
        failed (e.g. an existing entity targeted by an action); absent when the
        item was rejected before any id could exist, such as a failed validation
        on creation. Use `index` to correlate a result with its request item
        when `id` is absent.
  securitySchemes:
    Api-Access-Key:
      type: apiKey
      name: Api-Access-Key
      in: header
      description: An API key associated with a security role

````

## Related topics

- [Accounts](https://docs.anchorage.com/knowledge-base/platform/developers/caas/caas-accounts.md)
- [Create virtual accounts](https://docs.anchorage.com/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-create-virtual-accounts.md)
- [Create a virtual account for a wallet](https://docs.anchorage.com/knowledge-base/api-reference/v2-platforms/virtual-accounts/create-a-virtual-account-for-a-wallet.md)
- [Withdraw](https://docs.anchorage.com/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-withdraw.md)
- [Create customers](https://docs.anchorage.com/knowledge-base/platform/developers/named-virtual-accounts/named-virtual-accounts-create-customers.md)
