Skip to main content
POST
/
v1
/
account_openings
JavaScript
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);
{
  "id": "<string>",
  "type": "account_opening"
}

Authorizations

Authorization
string
header
required

Bearer token for authentication with Augustus Banking API

Headers

Idempotency-Key
string

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.

Body

application/json

Account opening parameters

account_program_id
string<uuid>
required

ID of the account program to create the account opening under.

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
enum<string>
required

Type of account to open. Currently only virtual account.

Available options:
virtual_account
beneficiary_data
object
required

Personal information of the account beneficiary.

Response

200 - application/json

The acknowledged account_opening resource

id
string
required

Unique identifier of the account opening request.

type
enum<string>
required

Resource type discriminator.

Available options:
account_opening
status
enum<string>
required

Current account opening lifecycle status.

Available options:
received,
screening_in_progress,
provisioning_in_progress,
succeeded,
rejected,
failed