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

# Create posting

> Atomically applies a posting against the target account's virtual asset balances. See the `type` field for variant semantics. For `SETTLEMENT`, the value applied to the outstanding card debt is returned as `settledAmount`, with the per-entry rate used reflected in `entries[].rateSnapshot`.



## OpenAPI

````yaml /api-reference/openapi.json post /postings/
openapi: 3.1.0
info:
  title: Reap API
  version: 1.0.0
  description: Reap platform API
servers:
  - url: https://sandbox.api.reap.global
    description: Sandbox
  - url: https://prod.api.reap.global
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Accounts
  - name: Activities
  - name: Card Designs
  - name: Card Shipments
  - name: Card Transactions
  - name: Cards
  - name: Companies
  - name: Crypto Deposits
  - name: Policies
  - name: Simulation
  - name: Users
  - name: Virtual Asset Postings
  - name: Virtual Assets
  - name: Webhooks
paths:
  /postings/:
    post:
      tags:
        - Virtual Asset Postings
      summary: Create posting
      description: >-
        Atomically applies a posting against the target account's virtual asset
        balances. See the `type` field for variant semantics. For `SETTLEMENT`,
        the value applied to the outstanding card debt is returned as
        `settledAmount`, with the per-entry rate used reflected in
        `entries[].rateSnapshot`.
      operationId: create_virtual-asset-postings
      parameters:
        - name: Reap-Version
          in: header
          required: true
          schema:
            type: string
            enum:
              - '2025-02-14'
            description: API version (YYYY-MM-DD)
            example: '2025-02-14'
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: >-
              Unique key for safely retrying this request. Up to 255 characters;
              we recommend a UUIDv4. The first request executes and its response
              is cached; subsequent requests with the same key replay the cached
              response (24h retention).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                accountId:
                  description: Account to post against
                  type: string
                  format: uuid
                type:
                  type: string
                  enum:
                    - DEPOSIT
                    - WITHDRAWAL
                    - SETTLEMENT
                  description: >-
                    - `DEPOSIT`: Credit the submitted virtual asset amounts to
                    the account balance.

                    - `WITHDRAWAL`: Debit the submitted virtual asset amounts
                    from the account balance. Rejected if any entry would take
                    the balance below zero.

                    - `SETTLEMENT`: Debit the submitted virtual asset amounts
                    from the account balance AND apply their value to the
                    account’s outstanding card debt. Same non-negative guard as
                    `WITHDRAWAL`.
                  example: DEPOSIT
                entries:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      virtualAssetId:
                        description: Virtual asset to apply this entry to
                        type: string
                        format: uuid
                      amount:
                        type: string
                        pattern: ^\d+(\.\d+)?$
                        description: >-
                          Amount in the virtual asset denomination. String for
                          arbitrary precision.
                    required:
                      - virtualAssetId
                      - amount
                  description: >-
                    At least one entry. Each `virtualAssetId` may appear only
                    once.
              required:
                - accountId
                - type
                - entries
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                accountId:
                  description: Account to post against
                  type: string
                  format: uuid
                type:
                  type: string
                  enum:
                    - DEPOSIT
                    - WITHDRAWAL
                    - SETTLEMENT
                  description: >-
                    - `DEPOSIT`: Credit the submitted virtual asset amounts to
                    the account balance.

                    - `WITHDRAWAL`: Debit the submitted virtual asset amounts
                    from the account balance. Rejected if any entry would take
                    the balance below zero.

                    - `SETTLEMENT`: Debit the submitted virtual asset amounts
                    from the account balance AND apply their value to the
                    account’s outstanding card debt. Same non-negative guard as
                    `WITHDRAWAL`.
                  example: DEPOSIT
                entries:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      virtualAssetId:
                        description: Virtual asset to apply this entry to
                        type: string
                        format: uuid
                      amount:
                        type: string
                        pattern: ^\d+(\.\d+)?$
                        description: >-
                          Amount in the virtual asset denomination. String for
                          arbitrary precision.
                    required:
                      - virtualAssetId
                      - amount
                  description: >-
                    At least one entry. Each `virtualAssetId` may appear only
                    once.
              required:
                - accountId
                - type
                - entries
          multipart/form-data:
            schema:
              type: object
              properties:
                accountId:
                  description: Account to post against
                  type: string
                  format: uuid
                type:
                  type: string
                  enum:
                    - DEPOSIT
                    - WITHDRAWAL
                    - SETTLEMENT
                  description: >-
                    - `DEPOSIT`: Credit the submitted virtual asset amounts to
                    the account balance.

                    - `WITHDRAWAL`: Debit the submitted virtual asset amounts
                    from the account balance. Rejected if any entry would take
                    the balance below zero.

                    - `SETTLEMENT`: Debit the submitted virtual asset amounts
                    from the account balance AND apply their value to the
                    account’s outstanding card debt. Same non-negative guard as
                    `WITHDRAWAL`.
                  example: DEPOSIT
                entries:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      virtualAssetId:
                        description: Virtual asset to apply this entry to
                        type: string
                        format: uuid
                      amount:
                        type: string
                        pattern: ^\d+(\.\d+)?$
                        description: >-
                          Amount in the virtual asset denomination. String for
                          arbitrary precision.
                    required:
                      - virtualAssetId
                      - amount
                  description: >-
                    At least one entry. Each `virtualAssetId` may appear only
                    once.
              required:
                - accountId
                - type
                - entries
      responses:
        '200':
          description: Client-driven posting against an account.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Posting ID
                  accountId:
                    type: string
                    format: uuid
                    description: Account ID
                  type:
                    type: string
                    enum:
                      - DEPOSIT
                      - WITHDRAWAL
                      - SETTLEMENT
                    description: >-
                      - `DEPOSIT`: Credit the submitted virtual asset amounts to
                      the account balance.

                      - `WITHDRAWAL`: Debit the submitted virtual asset amounts
                      from the account balance. Rejected if any entry would take
                      the balance below zero.

                      - `SETTLEMENT`: Debit the submitted virtual asset amounts
                      from the account balance AND apply their value to the
                      account’s outstanding card debt. Same non-negative guard
                      as `WITHDRAWAL`.
                    example: DEPOSIT
                  entries:
                    type: array
                    items:
                      $ref: '#/components/schemas/PostingEntry'
                  settledAmount:
                    anyOf:
                      - type: number
                      - type: 'null'
                    description: >-
                      USD value applied to outstanding card debt. Populated for
                      `SETTLEMENT` postings, `null` otherwise.
                  createdAt:
                    type: string
                    description: ISO 8601 creation timestamp
                required:
                  - id
                  - accountId
                  - type
                  - entries
                  - settledAmount
                  - createdAt
        '400':
          description: Response for status 400
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            const: POSTING_ACCOUNT_INELIGIBLE
                          message:
                            type: string
                          detail:
                            anyOf:
                              - type: object
                                additionalProperties: {}
                              - type: 'null'
                        required:
                          - code
                          - message
                          - detail
                    required:
                      - error
                    title: PostingAccountIneligibleError
                    description: Account is not a valid posting target
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            const: POSTING_VIRTUAL_ASSETS_NOT_ENABLED
                          message:
                            type: string
                          detail:
                            anyOf:
                              - type: object
                                additionalProperties: {}
                              - type: 'null'
                        required:
                          - code
                          - message
                          - detail
                    required:
                      - error
                    title: PostingVirtualAssetsNotEnabledError
                    description: Virtual assets are not enabled for this project
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            const: INVALID_POSTING_REQUEST
                          message:
                            type: string
                          detail:
                            anyOf:
                              - type: object
                                additionalProperties: {}
                              - type: 'null'
                        required:
                          - code
                          - message
                          - detail
                    required:
                      - error
                    title: InvalidPostingRequestError
                    description: >-
                      Posting request is structurally invalid (empty entries,
                      non-positive amount, duplicate asset)
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            const: POSTING_ACCOUNT_NOT_FOUND
                          message:
                            type: string
                          detail:
                            anyOf:
                              - type: object
                                additionalProperties: {}
                              - type: 'null'
                        required:
                          - code
                          - message
                          - detail
                    required:
                      - error
                    title: PostingAccountNotFoundError
                    description: Account not found
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            const: POSTING_VIRTUAL_ASSET_NOT_FOUND
                          message:
                            type: string
                          detail:
                            anyOf:
                              - type: object
                                additionalProperties: {}
                              - type: 'null'
                        required:
                          - code
                          - message
                          - detail
                    required:
                      - error
                    title: PostingVirtualAssetNotFoundError
                    description: Virtual asset not found
        '409':
          description: Response for status 409
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            const: POSTING_VIRTUAL_ASSET_DISABLED
                          message:
                            type: string
                          detail:
                            anyOf:
                              - type: object
                                additionalProperties: {}
                              - type: 'null'
                        required:
                          - code
                          - message
                          - detail
                    required:
                      - error
                    title: PostingVirtualAssetDisabledError
                    description: Virtual asset is disabled
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            const: INSUFFICIENT_VIRTUAL_BALANCE
                          message:
                            type: string
                          detail:
                            anyOf:
                              - type: object
                                additionalProperties: {}
                              - type: 'null'
                        required:
                          - code
                          - message
                          - detail
                    required:
                      - error
                    title: InsufficientVirtualBalanceError
                    description: >-
                      One or more entries would take the account virtual asset
                      balance below zero
components:
  schemas:
    PostingEntry:
      type: object
      properties:
        virtualAssetId:
          type: string
          format: uuid
          description: Virtual asset ID
        amount:
          type: string
          description: Entry amount in the virtual asset denomination
        rateSnapshot:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            USD-per-unit rate applied to this entry. Populated for `SETTLEMENT`
            postings, `null` otherwise.
      required:
        - virtualAssetId
        - amount
        - rateSnapshot
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key as Bearer token

````