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

# Open an account

> Opens a new account in a currency. Its balance starts at zero.

You can hold several accounts in one currency. The first one you open in a currency becomes the **default**, which is where card payments in that currency land unless you say otherwise. `isDefault` in the response tells you which you got.

`accountType` says what the account is for and defaults to `operational`. An unrecognised value is refused rather than defaulted.

Requires the `accounts:write` scope.



## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/accounts
openapi: 3.1.0
info:
  title: Talescria API
  version: 1.0.0
  description: >-
    Accounts, recipients, payments, transfers between your accounts, payment
    links, customers and invoices. Authenticate with an access token from your
    OAuth client.
servers:
  - url: https://api.talescria.com
    description: Production (test and live keys)
security:
  - bearerAuth: []
tags:
  - name: Accounts
    description: Your accounts and their balances.
  - name: Recipients
    description: People and businesses you pay, and where to pay them.
  - name: Payments
    description: Paying recipients, including across currencies.
  - name: Transfers
    description: Moving money between your own accounts.
  - name: Payment links
    description: Links anyone can open to pay you by card.
  - name: Customers
    description: People and businesses who pay you.
  - name: Invoices
    description: One-off invoices and recurring series.
paths:
  /v1/accounts:
    post:
      tags:
        - Accounts
      summary: Open an account
      description: >-
        Opens a new account in a currency. Its balance starts at zero.


        You can hold several accounts in one currency. The first one you open in
        a currency becomes the **default**, which is where card payments in that
        currency land unless you say otherwise. `isDefault` in the response
        tells you which you got.


        `accountType` says what the account is for and defaults to
        `operational`. An unrecognised value is refused rather than defaulted.


        Requires the `accounts:write` scope.
      operationId: openAccount
      parameters:
        - $ref: '#/components/parameters/IdempotencyKeyRequired'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - currency
                - name
              properties:
                name:
                  type: string
                  maxLength: 100
                  description: >-
                    Your name for it. Required, because several accounts may
                    share a currency and this is the only thing telling them
                    apart.
                currency:
                  type: string
                  description: Case-insensitive; trimmed and upper-cased before use.
                  enum:
                    - USD
                    - EUR
                    - GBP
                    - NGN
                    - KES
                    - ZAR
                    - GHS
                accountType:
                  type: string
                  enum:
                    - checking
                    - debit
                    - operational
                    - safeguard
                  default: operational
                  description: >-
                    What the account is for. Optional: omitted, it is
                    `operational`. An unrecognised value is a 400 rather than a
                    silent default, for example `savings`. 
            examples:
              gbp:
                summary: A new GBP account
                value:
                  currency: GBP
                  name: Operations
                  accountType: operational
              safeguarded:
                summary: Client money, held under a different duty than operating cash
                value:
                  currency: GBP
                  name: Client money
                  accountType: safeguard
      responses:
        '201':
          description: Opened. The balance is zero by construction.
          content:
            application/json:
              schema:
                type: object
                properties:
                  account:
                    $ref: '#/components/schemas/AccountRowOk'
              examples:
                opened:
                  summary: A new, empty wallet
                  value:
                    account:
                      status: ok
                      accountId: acct_01M2P8GP7RSDXN81CXRFM2HFV7
                      name: Operations
                      isDefault: true
                      currency: GBP
                      accountType: operational
                      posted:
                        minorUnits: '0'
                        currency: GBP
                      pending:
                        minorUnits: '0'
                        currency: GBP
                      available:
                        minorUnits: '0'
                        currency: GBP
        '400':
          description: >-
            `VALIDATION`: A field is missing or malformed. `message` says which.


            `IDEMPOTENCY_KEY_REQUIRED`: This operation needs an
            `Idempotency-Key` header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            `UNAUTHENTICATED`: The access token is missing, expired or revoked.
            Get a new token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            `ENVIRONMENT_UNAVAILABLE`: Live mode isn't available until your
            account is approved.


            `INSUFFICIENT_SCOPE`: Your API key lacks the scope this operation
            needs. The scope is named in `message` and the `WWW-Authenticate`
            header.


            `ENVIRONMENT_MISMATCH`: The request named a different environment
            from the key's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            `IDEMPOTENCY_IN_PROGRESS`: A request with this `Idempotency-Key` is
            still running. Retry shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            `UNSUPPORTED_CURRENCY`: Accounts can't be opened in this currency.


            `IDEMPOTENCY_KEY_REUSED`: This `Idempotency-Key` was used for a
            different request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '`RATE_LIMITED`: Too many requests. Wait for `Retry-After` seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            `MISCONFIGURED`: Something is wrong on our side. Contact support
            with the `x-request-id`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            `UPSTREAM_ERROR`: A service we depend on answered unexpectedly.
            Retry, and contact support with the `x-request-id` if it persists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: '`UPSTREAM_UNAVAILABLE`: Temporarily unavailable. Retry with backoff.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    IdempotencyKeyRequired:
      name: Idempotency-Key
      in: header
      required: true
      description: >-
        A unique key for this operation. Send the same key when you retry it.
        Kept for 24 hours.
      schema:
        type: string
        minLength: 8
        maxLength: 255
        pattern: ^[A-Za-z0-9_\-:.]+$
  schemas:
    AccountRowOk:
      type: object
      required:
        - status
        - accountId
        - currency
        - isDefault
        - posted
        - pending
        - available
      properties:
        status:
          const: ok
        accountId:
          type: string
        name:
          type: string
          description: Your name for the account. Absent if it was opened without one.
        isDefault:
          type: boolean
          description: >-
            Whether an inbound checkout payment in this currency lands here.
            Exactly one account per currency has it.
        currency:
          type: string
        accountType:
          type: string
          enum:
            - checking
            - debit
            - operational
            - safeguard
          description: >-
            What the account is for. **Absent** for one opened before this field
            existed, unknown, which is not the same claim as `operational`, and
            the two must not be shown alike. Safeguarded funds are held under a
            different legal duty than operating cash.
        posted:
          $ref: '#/components/schemas/Money'
          description: Settled balance.
        pending:
          $ref: '#/components/schemas/Money'
          description: Reserved by outgoing payments still in flight.
        available:
          $ref: '#/components/schemas/Money'
          description: 'What can be spent: posted minus pending. Show this as the balance.'
        deposit:
          type: object
          required:
            - status
          properties:
            status:
              type: string
              enum:
                - pending
                - ready
              description: >-
                `pending` means the account exists at the provider and nobody
                can send to it yet. `fields` is absent, not empty, "not yet" and
                "there are none" are different answers.
            scheme:
              type: string
              description: The rail these are for, faster_payments, sepa, ach, nip, erc20.
              example: faster_payments
            fields:
              type: array
              description: >-
                Ordered for display. A list rather than a shape because details
                differ per currency and rail: GBP is an account number and a
                sort code, EUR an IBAN and a BIC, a stablecoin account a wallet
                address. `key` is normalised where recognised so the UI can
                label it and attach a copy button; anything else arrives with
                the provider's own label rather than being dropped.
              items:
                type: object
                required:
                  - key
                  - label
                  - value
                properties:
                  key:
                    type: string
                    example: sort_code
                  label:
                    type: string
                    example: Sort code
                  value:
                    type: string
                    example: 04-00-04
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Branch on this, not on `message`. See Errors.
            message:
              type: string
              description: For people. Wording can change.
    Money:
      type: object
      required:
        - minorUnits
        - currency
      properties:
        minorUnits:
          type: string
          pattern: ^-?\d+$
          description: Integer minor units as a string. Never a float.
          example: '125000'
        currency:
          type: string
          example: USD
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An access token (`at_test_…` or `at_live_…`) from `POST
        https://idp.talescria.com/oauth/token`.

````

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