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

# Create or Preinitiate a Microdeposit

> Use this endpoint to create a microdeposit. To create a microdeposit include the `first_name`, `last_name`, `email`, `account_number`, `routing_number`, and `account_type` in the request body. The response will include the new microdeposit record with a status of `INITIATED`. <br></br> You can also use this endpoint to pre-initiate a microdeposit. If you want to preinitiate only include the `first_name`, `last_name`, and `email` in the request body. The response will include the new microdeposit record with a status of `PREINITIATED`.<br></br> Pre-initiating a microdeposit is optional. However, if you choose to implement this flow, it should be used for all Connect Widget sessions in verification mode.<br></br>Pre-initiating a microdeposit enables you to pass the end user's first name, last name, and email, if this data has already been collected. If the end user selects an institution which requires the microdeposit flow, the pre-initiated `micro_deposit` will be used and the Connect Widget step that normally requests this info from the end user will be skipped. However, if the end user selects an institution which supports IAV, the pre-initiated `micro_deposit` will be deleted and IAV will be used instead. When requesting a Connect Widget URL after pre-inititiating, make sure to set the `current_microdeposit_guid` to the resulting microdeposit's guid and set the mode to verification.



## OpenAPI

````yaml openapi/nexus/v1.yaml POST /micro_deposits
openapi: 3.0.0
info:
  contact:
    name: Nexus API
    url: https://www.mx.com
  version: 1.0.0
  title: Nexus API
  description: >-
    Legacy clients can use Nexus API for all their connectivity needs. If you
    are a new client refer to our Platform API. Review our [Nexus API
    Guides](/nexus) for more information.
servers:
  - url: https://int-data.moneydesktop.com/
  - url: https://data.moneydesktop.com/
security:
  - sessionToken: []
tags:
  - name: accounts
  - name: beats
  - name: budgets
  - name: categories
  - name: extended transaction history
  - name: goals
  - name: holdings
  - name: identity
  - name: insights
  - name: institutions
  - name: jobs
  - name: member credentials
  - name: members
  - name: merchants
  - name: microdeposits
  - name: monthly cash flow profile
  - name: notifications
  - name: scheduled payments
  - name: sessions
  - name: spending plan
  - name: taggings
  - name: tags
  - name: transaction rules
  - name: transactions
  - name: user
  - name: verification
paths:
  /micro_deposits:
    post:
      tags:
        - microdeposits
      summary: Create or Preinitiate a Microdeposit
      description: >-
        Use this endpoint to create a microdeposit. To create a microdeposit
        include the `first_name`, `last_name`, `email`, `account_number`,
        `routing_number`, and `account_type` in the request body. The response
        will include the new microdeposit record with a status of `INITIATED`.
        <br></br> You can also use this endpoint to pre-initiate a microdeposit.
        If you want to preinitiate only include the `first_name`, `last_name`,
        and `email` in the request body. The response will include the new
        microdeposit record with a status of `PREINITIATED`.<br></br>
        Pre-initiating a microdeposit is optional. However, if you choose to
        implement this flow, it should be used for all Connect Widget sessions
        in verification mode.<br></br>Pre-initiating a microdeposit enables you
        to pass the end user's first name, last name, and email, if this data
        has already been collected. If the end user selects an institution which
        requires the microdeposit flow, the pre-initiated `micro_deposit` will
        be used and the Connect Widget step that normally requests this info
        from the end user will be skipped. However, if the end user selects an
        institution which supports IAV, the pre-initiated `micro_deposit` will
        be deleted and IAV will be used instead. When requesting a Connect
        Widget URL after pre-inititiating, make sure to set the
        `current_microdeposit_guid` to the resulting microdeposit's guid and set
        the mode to verification.
      operationId: createMicrodeposit
      requestBody:
        required: true
        content:
          application/vnd.mx.nexus.v1+json:
            schema:
              $ref: '#/components/schemas/MicrodepositRequest'
      responses:
        '200':
          description: OK
          content:
            application/vnd.mx.nexus.v1+json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/MicrodepositResponse'
                  - $ref: '#/components/schemas/PreinitiateResponse'
components:
  schemas:
    MicrodepositRequest:
      type: object
      properties:
        micro_deposit:
          type: object
          required:
            - account_number
            - account_type_name
            - routing_number
          properties:
            first_name:
              type: string
              description: The end user's first name.
            last_name:
              type: string
              description: The end user's last name.
            email:
              type: string
              description: The end user's email address.
            account_name:
              type: string
              description: The name of the account associated with the verification.
            account_number:
              type: string
              description: >-
                The account number of the account associated with the
                microdeposit.
            account_type_name:
              type: string
              description: >-
                The name of the account type. Possible values are `CHECKING` and
                `SAVINGS`.
            routing_number:
              type: string
              description: >-
                The routing number for the account associated with the
                microdeposit.
    MicrodepositResponse:
      properties:
        micro_deposit:
          type: object
          properties:
            account_name:
              type: string
              example: My Test Account
              description: The name of the account associated with the verification.
            account_number:
              type: string
              example: '333312345'
              description: >-
                The account number of the account associated with the
                microdeposit.
            account_type:
              type: integer
              example: 1
              description: >-
                The general or parent type of the account associated with the
                microdeposit. Possible values are `1` (CHECKING) and `2`
                (SAVINGS).
            account_type_name:
              type: string
              example: CHECKING
              description: >-
                The name of the account type. Possible values are `CHECKING` and
                `SAVINGS`.
            created_at:
              type: string
              example: '2021-09-01T18:29:06.000Z'
              description: >-
                The date and time the microdeposit was created, given in ISO
                8601 format.
            email:
              type: string
              example: example@example.com
              description: The end user's email address.
            error_code:
              type: string
              example: null
              description: The code for the error.
            error_message:
              type: string
              example: null
              description: A message explaining the error.
            first_name:
              type: string
              example: Josh
              description: The end user's first name.
            guid:
              type: string
              example: MIC-09ba578e-8448-4f7f-89e1-b62ff2517edb
              description: The unique identifier for the microdeposit. Defined by MX.
            institution_name:
              type: string
              example: MX Bank
              description: >-
                An easy-to-read name for an institution associated with the
                microdeposit, e.g., "Chase Bank" or "Wells Fargo Bank."
            last_name:
              type: string
              example: James
              description: The end user's last name.
            routing_number:
              type: string
              example: 91000019
              description: >-
                The routing number for the account associated with the
                microdeposit.
            status:
              type: integer
              example: 1
              description: The current status of the microdeposit.
            status_name:
              type: string
              example: REQUESTED
              description: The name of the current status.
            updated_at:
              type: string
              example: '2021-09-01T18:29:07.000Z'
              description: >-
                The date and time at which the microdeposit was last updated,
                given in ISO 8601 format.
            verified_at:
              type: string
              example: '2021-09-01T18:29:07.000Z'
              description: >-
                The date and time at which the microdeposit status changed from
                `DEPOSITED` to `VERIFIED`.
    PreinitiateResponse:
      properties:
        micro_deposit:
          type: object
          properties:
            account_name:
              description: The name of the account associated with the verification.
              type: string
              example: null
            account_number:
              description: >-
                The account number of the account associated with the
                microdeposit.
              type: string
              example: null
            account_type:
              description: >-
                The general or parent type of the account associated with the
                microdeposit. Possible values are `1` (CHECKING) and `2`
                (SAVINGS).
              type: integer
              example: null
            account_type_name:
              description: >-
                The name of the account type. Possible values are `CHECKING` and
                `SAVINGS`.
              type: string
              example: null
            created_at:
              description: >-
                The date and time the microdeposit was created, given in ISO
                8601 format.
              type: string
              example: 2021-09-01T18:29:06+00:0
            email:
              description: The end user's email address.
              type: string
              example: joshboy@example.com
            error_code:
              type: string
              example: null
              description: The code for the error.
            error_message:
              type: string
              example: null
              description: A message explaining the error.
            first_name:
              type: string
              example: Josh
              description: The end user's first name.
            guid:
              description: The unique identifier for the microdeposit. Defined by MX.
              type: string
              example: MIC-ecf60868-c1c7-4467-9b16-fd5fdc8ade39
            institution_name:
              description: >-
                An easy-to-read name for an institution associated with the
                microdeposit, e.g., "Chase Bank" or "Wells Fargo Bank."
              type: string
              example: null
            last_name:
              description: The end user's last name.
              type: string
              example: Boy
            routing_number:
              description: >-
                The routing number for the account associated with the
                microdeposit.
              type: string
              example: null
            status:
              description: The current status of the microdeposit.
              type: integer
              example: 9
            status_name:
              description: The name of the current status.
              type: string
              example: PREINITIATED
            updated_at:
              description: >-
                The date and time at which the microdeposit was last updated,
                given in ISO 8601 format.
              example: null
              type: string
            verified_at:
              description: >-
                The date and time at which the microdeposit status changed from
                `DEPOSITED` to `VERIFIED`.
              type: string
              example: null
  securitySchemes:
    sessionToken:
      description: >
        ### MX Session Token 

        - Request an API token using the read API token endpoint in the MX SSO
        API.

        - Exchange an API token for a session token. 
          - A session token is obtained by sending a POST request to /sessions
          - The session token will be used in each request made for the user. It should be passed in an `MD-SESSION-TOKEN` HTTP header as shown below.
          - This session token is valid for 30 minutes from the time it was created. The 30 minute expiration counter is refreshed with each call.
          - If you send a request with an expired session token you'll receive an error code of `4011`.

        ```

        curl -i https://int-data.moneydesktop.com/accounts \

        -H 'MD-SESSION-TOKEN:
        CWforZl1Vn2vC_v6H4rnQRT1DoWpDouJAV-_5TBmiQRAtA8rsOG_BoajTiOSsL0A3bd-bmHXlA-eQzc9ywItKg'
        \

        -H 'Content-Type: application/vnd.mx.nexus.v1+json' \

        -H 'Accept: application/vnd.mx.nexus.v1+json'

        ```


        In documentation code examples, replace `<API_KEY_VALUE>` with the
        session token.
      type: apiKey
      name: MD-SESSION-TOKEN
      in: header

````