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

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# 创建账户

> 为 onboarding 状态为成功的实体创建银行账户

为已完成 onboarding 的实体创建银行账户。`onboarding_id` 引用的 onboarding 必须为 `status: SUCCEEDED`。类型为 `PREVIOUSLY_ONBOARDED` 的 onboarding 目前无法创建账户：API 会返回 `500` 和 `PROVIDER_ACCOUNT_CREATION_FAILED`。

响应包含特定于区域的银行标识符。各区域返回哪些字段，请参阅 [按区域划分的账户标识符](https://docs.y.uno/zh-hans/reference/banking-connectivity.md#account-identifiers-by-region)。


## OpenAPI

````yaml openapi/zh-hans/banking-connectivity/accounts/create-account-banking.json POST /banking/accounts
openapi: 3.0.0
info:
  version: 1.0.0
  title: Banking Connectivity
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - public-api-key: []
    private-secret-key: []
paths:
  /banking/accounts:
    post:
      tags:
        - Accounts (Banking Connectivity)
      summary: 创建账户（银行连接）
      description: >-
        为已完成 onboarding 的实体创建银行账户。类型为 PREVIOUSLY_ONBOARDED 的 onboarding
        目前无法创建账户：API 会返回 500 PROVIDER_ACCOUNT_CREATION_FAILED。
      operationId: post_v1-banking-connectivity-accounts
      parameters:
        - in: header
          name: x-idempotency-key
          schema:
            type: string
          description: >-
            用于 HTTP
            标头的唯一标识符，确保即使因网络问题或超时而重试，请求也只会被处理一次。详情请参阅[身份验证](/zh-hans/reference/getting-started/authentication#idempotency)（UUID）。
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - account_id
                - entity_id
                - onboarding_id
                - connection_id
                - account_type
                - country
                - currency
              properties:
                account_id:
                  type: string
                  description: >-
                    商户的 Yuno 账户的唯一标识符。可在 [Yuno
                    Dashboard](https://dashboard.y.uno/) 中找到（UUID，36 个字符）。
                  example: 550e8400-e29b-41d4-a716-446655440000
                entity_id:
                  type: string
                  description: >-
                    拥有该账户的实体的
                    `id`，从[创建实体](/zh-hans/reference/banking-connectivity/entities-banking-connectivity/create-entity)获取（UUID，36
                    个字符）。
                  example: 660e8400-e29b-41d4-a716-446655440000
                onboarding_id:
                  type: string
                  description: >-
                    从[创建实体
                    onboarding](/zh-hans/reference/banking-connectivity/entity-onboarding-banking-connectivity/create-entity-onboarding)
                    获取的成功 onboarding 的 `id`（UUID，36 个字符）。该 onboarding 必须为
                    `status: SUCCEEDED`。
                  example: 990e8400-e29b-41d4-a716-446655440000
                connection_id:
                  type: string
                  description: 用于开立账户的银行服务提供商连接的 `id`（UUID，36 个字符）。
                  example: bb0e8400-e29b-41d4-a716-446655440000
                account_type:
                  type: string
                  description: 要创建的银行账户的类型。
                  enum:
                    - CHECKING
                    - SAVINGS
                    - INVESTMENT
                  example: CHECKING
                currency:
                  type: string
                  description: >-
                    账户的币种（[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)，3
                    个字符）。支持的值取决于服务提供商所在区域：`USD`（美国）、`GBP`（英国）、`AUD`（澳大利亚）、`EUR`（欧盟）。
                  example: USD
                country:
                  type: string
                  description: >-
                    账户所在国家/地区（[ISO 3166-1
                    alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)，2
                    个字符）。
                  example: US
            examples:
              Create Account:
                summary: Create Account
                value:
                  account_id: 550e8400-e29b-41d4-a716-446655440000
                  entity_id: 660e8400-e29b-41d4-a716-446655440000
                  onboarding_id: 990e8400-e29b-41d4-a716-446655440000
                  connection_id: bb0e8400-e29b-41d4-a716-446655440000
                  account_type: CHECKING
                  country: US
                  currency: USD
      responses:
        '200':
          description: ''
        '201':
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 银行连接账户的唯一标识符（UUID，36 个字符）。
                    example: aa0e8400-e29b-41d4-a716-446655440000
                  entity_id:
                    type: string
                    description: 与此账户关联的实体的 `id`。
                    example: 660e8400-e29b-41d4-a716-446655440000
                  onboarding_id:
                    type: string
                    description: 用于创建此账户的 onboarding 的 `id`。
                    example: 990e8400-e29b-41d4-a716-446655440000
                  account_id:
                    type: string
                    description: 商户的 Yuno 账户标识符。
                    example: 550e8400-e29b-41d4-a716-446655440000
                  provider:
                    type: object
                    description: 服务提供商侧的账户标识符。
                    properties:
                      account_id:
                        type: string
                        description: 服务提供商的内部账户标识符。
                        example: col_bank_account_789
                  account_type:
                    type: string
                    description: 银行账户的类型。
                    enum:
                      - CHECKING
                      - SAVINGS
                      - INVESTMENT
                    example: CHECKING
                  status:
                    type: string
                    description: 账户的当前状态。
                    enum:
                      - ACTIVE
                      - PENDING
                      - INACTIVE
                    example: ACTIVE
                  account_number:
                    type: string
                    description: 银行账号。
                    example: '1234567890'
                  routing_number:
                    type: string
                    nullable: true
                    description: 美国 routing number。适用于位于美国的账户。
                    example: '123456789'
                  iban:
                    type: string
                    nullable: true
                    description: 国际银行账号（IBAN）。适用于英国和欧盟的账户。
                    example: null
                  currency:
                    type: string
                    description: 账户币种（[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)）。
                    example: USD
                  balance:
                    type: object
                    description: 账户的当前余额信息。
                    properties:
                      available:
                        type: number
                        description: 可用于转账的可用余额。
                        example: 0
                      current:
                        type: number
                        description: 包含待处理交易在内的当前总余额。
                        example: 0
                      pending:
                        type: number
                        description: 当前处于待处理交易中的金额。
                        example: 0
                  account_details:
                    type: object
                    description: 其他账户详情和特定于区域的标识符。
                    properties:
                      account_name:
                        type: string
                        description: 账户的显示名称。
                        example: John Doe - Checking
                      sort_code:
                        type: string
                        nullable: true
                        description: 英国 sort code。适用于位于英国的账户。
                        example: null
                      bsb:
                        type: string
                        nullable: true
                        description: 澳大利亚 BSB 号码。适用于位于澳大利亚的账户。
                        example: null
                      swift:
                        type: string
                        nullable: true
                        description: 用于国际转账的 SWIFT/BIC 代码。
                        example: null
                  payment_rails:
                    type: object
                    description: 此账户支持的支付通道。
                    properties:
                      incoming:
                        type: array
                        description: 可用于接收资金的支付通道。
                        items:
                          type: string
                        example:
                          - ACH_STANDARD
                          - WIRE
                      outgoing:
                        type: array
                        description: 可用于发送资金的支付通道。
                        items:
                          type: string
                        example:
                          - ACH_STANDARD
                          - WIRE
                  supports_book_transfers:
                    type: boolean
                    description: 账户是否支持同一服务提供商下账户之间的内部（内部记账）转账。
                    example: true
                  created_at:
                    type: string
                    description: 账户创建时的时间戳（ISO 8601）。
                    example: '2026-02-01T10:10:00Z'
                  updated_at:
                    type: string
                    description: 账户最后更新时的时间戳（ISO 8601）。
                    example: '2026-02-01T10:10:00Z'
              examples:
                Created (Account):
                  summary: Created (Account)
                  value:
                    id: aa0e8400-e29b-41d4-a716-446655440000
                    entity_id: 660e8400-e29b-41d4-a716-446655440000
                    onboarding_id: 990e8400-e29b-41d4-a716-446655440000
                    account_id: 550e8400-e29b-41d4-a716-446655440000
                    provider:
                      account_id: col_bank_account_789
                    account_type: CHECKING
                    status: ACTIVE
                    account_number: '1234567890'
                    routing_number: '123456789'
                    iban: null
                    currency: USD
                    balance:
                      available: 0
                      current: 0
                      pending: 0
                    account_details:
                      account_name: John Doe - Checking
                      sort_code: null
                      bsb: null
                      swift: null
                    payment_rails:
                      incoming:
                        - ACH_STANDARD
                        - WIRE
                      outgoing:
                        - ACH_STANDARD
                        - WIRE
                    supports_book_transfers: true
                    created_at: '2026-02-01T10:10:00Z'
                    updated_at: '2026-02-01T10:10:00Z'
          description: Created
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: VALIDATION_ERROR
                  messages:
                    type: array
                    items:
                      type: string
                      example: Onboarding status must be SUCCEEDED to create an account
                  http_code:
                    type: integer
                    example: 400
                    default: 0
              examples:
                Bad Request:
                  summary: Bad Request
                  value:
                    code: VALIDATION_ERROR
                    messages:
                      - Onboarding status must be SUCCEEDED to create an account
                    http_code: 400
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: ONBOARDING_NOT_FOUND
                  messages:
                    type: array
                    items:
                      type: string
                      example: Onboarding not found
                  http_code:
                    type: integer
                    example: 404
                    default: 0
              examples:
                Not Found:
                  summary: Not Found
                  value:
                    code: ONBOARDING_NOT_FOUND
                    messages:
                      - Onboarding not found
                    http_code: 404
          description: Not Found
components:
  securitySchemes:
    public-api-key:
      type: apiKey
      in: header
      name: public-api-key
    private-secret-key:
      type: apiKey
      in: header
      name: private-secret-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.