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

# Create a deposit

> Create a deposit, funded by bank transfer. The deposit amount can be optionally advanced, to increase the account's buying power before the deposit is funded.



## OpenAPI

````yaml https://api.engine.usesophic.com/openapi.json post /accounts/{account_id}/deposits
openapi: 3.1.0
info:
  title: Sophic Engine API
  version: 0.1.0
servers:
  - url: https://api.engine.usesophic.com/
security: []
paths:
  /accounts/{account_id}/deposits:
    post:
      summary: Create a deposit
      description: >-
        Create a deposit, funded by bank transfer. The deposit amount can be
        optionally advanced, to increase the account's buying power before the
        deposit is funded.
      operationId: create_deposit_accounts__account_id__deposits_post
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            title: Account Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDepositRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deposit'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateDepositRequest:
      properties:
        amount:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: string
          title: Amount
          description: The amount to deposit, as a decimal number with two decimal places.
          examples:
            - '100.00'
            - '50.12'
        currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          description: >-
            The currency to deposit in, which needs to be a supported currency
            on the account.
        payment_reference:
          title: Payment Reference
          description: >-
            The reference that will be used to identify the inbound payment that
            funds this deposit. If provided, it should be unique per batch of
            deposits you are planning to fund. If not provided, we will generate
            one for you. In both cases, we expect that a payment will be
            received with this reference.
          x-remove-null-from-type-union: true
          type: string
        request_advance:
          type: boolean
          title: Request Advance
          description: >-
            Request that the deposit amount is credited in advance as unsettled
            cash, which will settle once the deposit is funded.
          default: false
      type: object
      required:
        - amount
        - currency
      title: CreateDepositRequest
    Deposit:
      properties:
        id:
          type: string
          title: Id
          description: Unique resource identifier.
        account:
          type: string
          title: Account
          description: The ID of the parent account.
        amount:
          type: string
          title: Amount
          description: The amount of the deposit.
          examples:
            - '100.00'
            - '50.12'
        currency:
          allOf:
            - $ref: '#/components/schemas/Currency'
          description: The currency of the deposit.
        payment_reference:
          type: string
          title: Payment Reference
          description: >-
            The reference that will be used to identify the inbound payment that
            funds this deposit.
          examples:
            - '202512161234'
        was_advanced:
          type: boolean
          title: Was Advanced
          description: Whether the deposit was advanced as unsettled cash.
        advanced_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Advanced At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the deposit was advanced as unsettled cash, if
            applicable.
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the deposit was completed i.e settled funds were
            credited to the account's cash balance.
        status:
          allOf:
            - $ref: '#/components/schemas/DepositStatus'
          description: The status of the deposit.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was created.
        modified_at:
          type: string
          format: date-time
          title: Modified At
          description: >-
            The timestamp (in
            [ISO-8601](https://www.iso.org/iso-8601-date-and-time-format.html)
            format) of when the resource was last modified.
      type: object
      required:
        - created_at
        - modified_at
        - id
        - account
        - amount
        - currency
        - payment_reference
        - was_advanced
        - status
      title: Deposit
    Error:
      properties:
        detail:
          type: string
          title: Detail
          description: A human-readable description of the error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
        docs:
          title: Docs
          description: A URL to documentation about this error code.
          x-remove-null-from-type-union: true
          type: string
        context:
          title: Context
          description: An optional object for adding extra context to the error.
          x-remove-null-from-type-union: true
          additionalProperties:
            anyOf:
              - type: string
              - type: integer
          type: object
        params:
          title: Params
          description: An optional list of params that failed validation.
          x-remove-null-from-type-union: true
          items:
            $ref: '#/components/schemas/InvalidParam'
          type: array
      type: object
      required:
        - detail
        - code
      title: Error
    Currency:
      type: string
      enum:
        - EUR
        - USD
        - GBP
      title: Currency
      properties: {}
    DepositStatus:
      type: string
      enum:
        - open
        - completed
      title: DepositStatus
      properties: {}
    InvalidParam:
      properties:
        path:
          items:
            anyOf:
              - type: integer
              - type: string
          type: array
          title: Path
          description: Path to the field name (or index if a list) that errored.
        detail:
          type: string
          title: Detail
          description: Human-readable detail for error.
        code:
          type: string
          title: Code
          description: A machine-readable error code.
      type: object
      required:
        - path
        - detail
        - code
      title: InvalidParam
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````