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

# Create account opening

> Starts an asynchronous account opening and returns an account_opening resource in received status.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/augustus/openapi.documented.yml post /v1/account_openings
openapi: 3.1.0
info:
  title: Augustus Banking API
  description: Augustus Banking API
  version: 0.1.0
  contact:
    name: Augustus
    url: https://docs.augustus.com
    email: developer@augustus.com
servers:
  - url: https://api.augustus.com
    description: Production
  - url: https://api.sandbox.augustus.com
    description: Sandbox
security:
  - BearerAuth: []
tags: []
paths:
  /v1/account_openings:
    post:
      tags:
        - Account Openings
      summary: Create account opening
      description: >-
        Starts an asynchronous account opening and returns an account_opening
        resource in received status.
      operationId: AccountOpeningsController_create
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Idempotency key for safe retries. Reusing a key with an identical
            request body returns the cached response. Reusing a key with a
            different body returns 409.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        description: Account opening parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountOpeningBodyDto'
      responses:
        '200':
          description: The acknowledged account_opening resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountOpeningResourceDto'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Augustus from '@augustusbank/typescript-sdk';

            const client = new Augustus({
              apiKey: process.env['AUGUSTUS_API_KEY'], // This is the default and can be omitted
            });

            const accountOpening = await client.accountOpenings.create({
              account_program_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              account_type: 'virtual_account',
              beneficiary_data: {
                country_of_citizenship: 'US',
                date_of_birth: '2019-12-27',
                identification: { type: 'ssn', value: '732-66-9102' },
                legal_name: 'x',
                residential_address: {
                  city: 'x',
                  country: 'US',
                  postal_code: 'x',
                  state: 'xx',
                  street_line_1: 'x',
                },
              },
            });

            console.log(accountOpening.id);
components:
  schemas:
    CreateAccountOpeningBodyDto:
      type: object
      properties:
        account_program_id:
          description: ID of the account program to create the account opening under.
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
        account_type:
          description: Type of account to open. Currently only virtual account.
          type: string
          enum:
            - virtual_account
        beneficiary_data:
          description: Personal information of the account beneficiary.
          anyOf:
            - $ref: '#/components/schemas/UsBeneficiaryData'
            - $ref: '#/components/schemas/NonUsBeneficiaryData'
      required:
        - account_program_id
        - account_type
        - beneficiary_data
      additionalProperties: false
    AccountOpeningResourceDto:
      type: object
      properties:
        id:
          description: Unique identifier of the account opening request.
          type: string
        type:
          description: Resource type discriminator.
          type: string
          enum:
            - account_opening
        status:
          description: Current account opening lifecycle status.
          type: string
          enum:
            - received
            - screening_in_progress
            - provisioning_in_progress
            - succeeded
            - rejected
            - failed
      required:
        - id
        - type
        - status
      additionalProperties: false
    UsBeneficiaryData:
      type: object
      properties:
        legal_name:
          description: Full legal name of the account holder.
          type: string
          minLength: 1
          maxLength: 255
        residential_address:
          description: Residential address of the account holder.
          anyOf:
            - $ref: '#/components/schemas/UsResidentialAddress'
            - $ref: '#/components/schemas/NonUsResidentialAddress'
        date_of_birth:
          description: Date of birth as an ISO 8601 calendar date (YYYY-MM-DD).
          type: string
          format: date
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
        identification:
          description: >-
            Government-issued identification with type: "ssn" (Social Security
            Number, format ###-##-####) or "itin" (Individual Taxpayer ID,
            format 9##-##-####).
          anyOf:
            - $ref: '#/components/schemas/SsnIdentification'
            - $ref: '#/components/schemas/ItinIdentification'
        country_of_citizenship:
          description: ISO 3166-1 alpha-2 country code of citizenship.
          type: string
          enum:
            - US
      required:
        - legal_name
        - residential_address
        - date_of_birth
        - identification
        - country_of_citizenship
      additionalProperties: false
    NonUsBeneficiaryData:
      type: object
      properties:
        legal_name:
          description: Full legal name of the account holder.
          type: string
          minLength: 1
          maxLength: 255
        residential_address:
          description: Residential address of the account holder.
          anyOf:
            - $ref: '#/components/schemas/UsResidentialAddress'
            - $ref: '#/components/schemas/NonUsResidentialAddress'
        date_of_birth:
          description: Date of birth as an ISO 8601 calendar date (YYYY-MM-DD).
          type: string
          format: date
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
        identification:
          $ref: '#/components/schemas/IdIdentification'
          description: >-
            Government-issued identification with type: "id" (generic
            government-issued ID).
        country_of_citizenship:
          $ref: '#/components/schemas/Alpha2CodeWithoutUs'
          description: ISO 3166-1 alpha-2 country code of citizenship.
      required:
        - legal_name
        - residential_address
        - date_of_birth
        - identification
        - country_of_citizenship
      additionalProperties: false
    UsResidentialAddress:
      type: object
      properties:
        street_line_1:
          description: Primary street address.
          type: string
          minLength: 1
          maxLength: 255
        street_line_2:
          description: Secondary street address (apartment, suite, etc.).
          type: string
          maxLength: 255
        city:
          description: City name.
          type: string
          minLength: 1
          maxLength: 255
        state:
          description: Two-letter state code.
          type: string
          minLength: 2
          maxLength: 2
        postal_code:
          description: Postal or ZIP code.
          type: string
          minLength: 1
          maxLength: 30
        country:
          description: ISO 3166-1 alpha-2 country code.
          type: string
          enum:
            - US
      required:
        - street_line_1
        - city
        - state
        - postal_code
        - country
      additionalProperties: false
    NonUsResidentialAddress:
      type: object
      properties:
        street_line_1:
          description: Primary street address.
          type: string
          minLength: 1
          maxLength: 255
        street_line_2:
          description: Secondary street address (apartment, suite, etc.).
          type: string
          maxLength: 255
        city:
          description: City name.
          type: string
          minLength: 1
          maxLength: 255
        postal_code:
          description: Postal or ZIP code.
          type: string
          minLength: 1
          maxLength: 30
        country:
          $ref: '#/components/schemas/Alpha2CodeWithoutUs'
          description: ISO 3166-1 alpha-2 country code.
      required:
        - street_line_1
        - city
        - postal_code
        - country
      additionalProperties: false
    SsnIdentification:
      type: object
      properties:
        type:
          type: string
          enum:
            - ssn
        value:
          type: string
          pattern: ^\d{3}-\d{2}-\d{4}$
      required:
        - type
        - value
      additionalProperties: false
    ItinIdentification:
      type: object
      properties:
        type:
          type: string
          enum:
            - itin
        value:
          type: string
          pattern: ^9\d{2}-\d{2}-\d{4}$
      required:
        - type
        - value
      additionalProperties: false
    IdIdentification:
      type: object
      properties:
        type:
          type: string
          enum:
            - id
        value:
          type: string
          minLength: 1
      required:
        - type
        - value
      additionalProperties: false
    Alpha2CodeWithoutUs:
      type: string
      enum:
        - AF
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - KH
        - CM
        - CA
        - CV
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - CY
        - CZ
        - DK
        - DJ
        - DM
        - DO
        - EC
        - EG
        - SV
        - GQ
        - ER
        - EE
        - ET
        - FK
        - FO
        - FJ
        - FI
        - FR
        - GF
        - PF
        - TF
        - GA
        - GM
        - GE
        - DE
        - GH
        - GI
        - GR
        - GL
        - GD
        - GP
        - GU
        - GT
        - GN
        - GW
        - GY
        - HT
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IL
        - IT
        - JM
        - JP
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MP
        - MK
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - SH
        - KN
        - LC
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - SC
        - SL
        - SG
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SZ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - UM
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
        - AX
        - BQ
        - CW
        - GG
        - IM
        - JE
        - ME
        - BL
        - MF
        - RS
        - SX
        - SS
        - XK
  securitySchemes:
    BearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Bearer token for authentication with Augustus Banking API

````