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

# Create an account

> Open an account and provision its wallet on the chosen chain.

Creates an account and its wallet. Link an existing party with `partyId`, or create one inline with the `party` object. Self-custody accounts also supply the wallet `address` — see [Venly-managed vs self-custody](/guides/finance/managed-vs-self-custody). A new account starts unverified and can't move money until it is [verified](/guides/finance/kyc-verification).


## OpenAPI

````yaml api-reference/Finance-API-Specs.yaml POST /accounts
openapi: 3.1.0
info:
  title: Venly Finance API
  description: >
    REST API for the Venly Finance platform:

    - Party management (Individuals & Organisations)

    - Account management with party association

    - Wallet balances & token allowances on supported chains (Base, Avalanche)

    - Virtual bank account assignment for global payments (EUR SEPA)

    - Fiat-to-crypto payment sessions (pay-in)

    - Account-to-account fiat & crypto transfers

    - EIP-2612 permits and payment requests


    ## Authentication


    All endpoints use OAuth2 client credentials. Obtain a token first, then
    include it in every request:


    **Step 1 — Get a token:**

    ```bash

    curl -X POST
    https://login.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
    \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "grant_type=client_credentials&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}"
    ```


    **Step 2 — Use the token:**

    ```

    Authorization: Bearer {access_token}

    ```


    Tokens expire after **5 minutes**. Implement refresh logic in your client.
  version: 1.1.0
  contact:
    name: Venly Support
    email: support@venly.io
    url: https://docs.venlyfinance.com
  license:
    name: Proprietary
  x-logo:
    url: https://venlyfinance.com/logo.png
  x-security-contact: security@venly.io
servers:
  - url: https://api.venlyfinance.com/v1
    description: Production
  - url: https://api-staging.venlyfinance.com/v1
    description: Staging
security:
  - OAuth2: []
tags:
  - name: Parties
    description: Party management (Individuals & Organisations)
  - name: Accounts
    description: Account management, party-role associations
  - name: Wallets
    description: Blockchain wallet balances
  - name: Virtual Bank Accounts
    description: Virtual bank account payment references for global payments
  - name: Fiat-to-crypto Payment Sessions
    description: Fiat-to-crypto payment session creation
  - name: Payment Requests
    description: Payment request management for card provider integrations
  - name: Transfers
    description: Fiat and crypto transfer operations between accounts
  - name: Permits
    description: EIP-712 permit signature management for token approvals
  - name: Allowances
    description: Token allowance management for wallets
paths:
  /accounts:
    post:
      tags:
        - Accounts
      summary: Create a new account
      description: >
        Creates a new account and auto-provisions a custodial wallet on the
        specified chain.


        **Party Association:**

        - Provide `partyId` to associate with an existing party

        - Provide `party` object to create a new party inline (Individual or
        Organisation)

        - The party is associated as ACCOUNT_HOLDER


        When creating a party inline, specify `partyType: INDIVIDUAL` with
        firstName/lastName,

        or `partyType: ORGANISATION` with name/vatNumber.


        **SELF_CUSTODY companies** must supply the wallet `address`;
        VENLY_MANAGED companies

        leave it blank and Venly generates the wallet.
      operationId: createAccount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountRequest'
            example:
              externalId: user-12345
              name: Jane Doe — Main
              chain: BASE
              address: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'
              partyId: 7e3b9c2a-1f4d-4a8b-9c11-2d6e8f0a1b22
      responses:
        '201':
          description: Account created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SingleAccountResponse'
              example:
                success: true
                result:
                  id: b2a1f0e9-8c7d-4e3a-9f21-0a1b2c3d4e5f
                  externalId: user-12345
                  name: Jane Doe — Main
                  kycStatus: VERIFICATION_PENDING
                  status: ACTIVE
                  createdAt: '2026-01-15T09:30:00'
                  version: 0
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CreateAccountRequest:
      type: object
      required:
        - externalId
        - chain
      description: |
        Create a new account. You can either:
        - Reference an existing party by providing `partyId`
        - Create a new party inline by providing the `party` object

        SELF_CUSTODY companies must also supply the wallet `address`.
      properties:
        externalId:
          type: string
          minLength: 1
          description: Unique external reference for this account
        name:
          type: string
          maxLength: 255
          minLength: 1
          description: Display name for the account
        chain:
          $ref: '#/components/schemas/BlockchainNetwork'
        address:
          type: string
          description: Wallet address. Required for SELF_CUSTODY companies
        partyId:
          type: string
          format: uuid
          description: ID of an existing party to associate as account holder
        party:
          $ref: '#/components/schemas/CreatePartyRequest'
        cardProviderReference:
          $ref: '#/components/schemas/CardProviderReference'
      example:
        externalId: user-12345
        name: John Doe Account
        chain: BASE
        party:
          partyType: INDIVIDUAL
          firstName: John
          lastName: Doe
          address:
            addressLine1: 123 Main Street
            city: Amsterdam
            postalCode: 1012AB
            country: NL
    SingleAccountResponse:
      allOf:
        - $ref: '#/components/schemas/BaseResponse'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/Account'
    BlockchainNetwork:
      type: string
      description: Supported blockchain network
      enum:
        - AVALANCHE
        - BASE
        - POLYGON
    CreatePartyRequest:
      type: object
      required:
        - partyType
      properties:
        partyType:
          $ref: '#/components/schemas/PartyType'
        externalId:
          type: string
          maxLength: 255
          description: Optional external reference ID
        firstName:
          type: string
          maxLength: 100
          description: Required for INDIVIDUAL parties
        lastName:
          type: string
          maxLength: 100
          description: Required for INDIVIDUAL parties
        name:
          type: string
          maxLength: 255
          description: Organisation name. Required for ORGANISATION parties
        vatNumber:
          type: string
          maxLength: 50
          description: VAT number. ORGANISATION parties only
        address:
          $ref: '#/components/schemas/Address'
      example:
        partyType: INDIVIDUAL
        firstName: John
        lastName: Doe
        address:
          addressLine1: 123 Main Street
          city: Amsterdam
          postalCode: 1012AB
          country: NL
    CardProviderReference:
      type: object
      required:
        - type
        - referenceId
      properties:
        type:
          type: string
          minLength: 1
          description: Card provider type identifier (case-sensitive)
        referenceId:
          type: string
          minLength: 1
          description: Unique reference ID from the card provider
    BaseResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the request was successful
    Account:
      type: object
      properties:
        id:
          type: string
          format: uuid
        externalId:
          type: string
        name:
          type: string
          description: Display name for the account
        kycStatus:
          $ref: '#/components/schemas/KycStatus'
        status:
          $ref: '#/components/schemas/AccountStatus'
        createdAt:
          type: string
          format: date-time
        version:
          type: integer
          format: int64
          description: Optimistic-locking version
    ErrorResponse:
      type: object
      description: Error response wrapper
      properties:
        success:
          type: boolean
          description: Always false for error responses
          example: false
        errors:
          type: array
          description: List of errors that occurred
          items:
            $ref: '#/components/schemas/ErrorBody'
        result:
          type: object
          nullable: true
          description: Null or omitted when success is false
    PartyType:
      type: string
      description: Type of party
      enum:
        - INDIVIDUAL
        - ORGANISATION
    Address:
      type: object
      description: Standardized address format used across all endpoints
      properties:
        addressLine1:
          type: string
          maxLength: 255
        addressLine2:
          type: string
          maxLength: 255
        city:
          type: string
          maxLength: 100
        state:
          type: string
          maxLength: 100
        postalCode:
          type: string
          maxLength: 20
        country:
          type: string
          pattern: ^[A-Z]{2}$
          description: ISO 3166-1 alpha-2 country code
    KycStatus:
      type: string
      description: KYC verification status (Individuals & accounts)
      enum:
        - VERIFICATION_PENDING
        - VERIFIED
        - REJECTED
    AccountStatus:
      type: string
      description: Status of an account
      enum:
        - ACTIVE
        - SUSPENDED
        - CLOSED
    ErrorBody:
      type: object
      description: Individual error details
      properties:
        code:
          type: string
          description: Machine-readable error code
          example: invalid-request
        message:
          type: string
          description: Human-readable error message
          example: The request contains invalid parameters.
  responses:
    BadRequest:
      description: Request validation failed (400)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            errors:
              - code: invalid-request
                message: The request contains invalid parameters.
    Unauthorized:
      description: Authentication required or failed (401)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            errors:
              - code: unauthenticated
                message: Please authenticate to perform this action.
    Forbidden:
      description: Caller lacks the required authority/role (403)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            errors:
              - code: forbidden
                message: You do not have permission to access this resource.
    Conflict:
      description: Resource conflict / optimistic-lock failure (409)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            errors:
              - code: concurrent-modification
                message: >-
                  This request has been modified by another user. Please refresh
                  and try again.
    InternalServerError:
      description: Unexpected server error (500)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            errors:
              - code: internal-error
                message: An unexpected error occurred. Please try again later.
  securitySchemes:
    OAuth2:
      type: oauth2
      description: >
        OAuth2 client credentials flow. Token endpoints:

        - Staging:
        https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token

        - Production:
        https://login.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
      flows:
        clientCredentials:
          tokenUrl: >-
            https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
          scopes: {}

````