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

# Direct Deposit Switches.completed webhook

> The `direct_deposit_switches.completed` webhook is sent when a deposit switch flow in Link has completed and Argyle has successfully updated the user's deposit settings on their payroll platform.


Sent when a deposit switch flow in Link has completed.


## OpenAPI

````yaml openAPI/direct-deposit-switches-webhooks-completed.yaml post /v2/webhooks
openapi: 3.0.0
info:
  title: Direct Deposit Switches Webhooks
  version: 1.0.0
  description: |
    Sent when a deposit switch flow in Link has completed.
servers: []
security:
  - basicAuth: []
paths:
  /v2/webhooks:
    post:
      summary: Example subscription
      description: >
        The `direct_deposit_switches.completed` webhook is sent when a deposit
        switch flow in Link has completed and Argyle has successfully updated
        the user's deposit settings on their payroll platform.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookSubscriptionRequest'
            examples:
              direct_deposit_switches_completed_subscription:
                summary: direct_deposit_switches.completed subscription
                value:
                  events:
                    - direct_deposit_switches.completed
                  name: name-for-the-webhook-subscription
                  url: https://your-webhook-backend.com
                  secret: optional-secret
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookMessageCompleted'
        '400':
          description: Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookMessageFailed'
components:
  schemas:
    WebhookSubscriptionRequest:
      type: object
      properties:
        events:
          type: array
          description: '`direct_deposit_switches.completed`'
          items:
            type: string
        name:
          type: string
          description: Your name for the webhook subscription.
        url:
          type: string
          description: >-
            Where you want to receive webhook delivery. This can be either a
            backend URL that you manage, or a URL provided by a webhook
            management service. Argyle handles URL encoding for webhook URLs.
            Send the URL in its normal, unencoded form.
        secret:
          type: string
          description: Optional secret used to verify webhooks.
    WebhookMessageCompleted:
      type: object
      properties:
        event:
          type: string
          description: 'The event type. Value: `direct_deposit_switches.completed`'
          example: direct_deposit_switches.completed
        name:
          type: string
          description: Name used for the webhook subscription.
          example: name-for-the-webhook-subscription
        data:
          type: object
          properties:
            account:
              type: string
              format: uuid
              description: ID of the account.
              example: 0187c66e-e7e5-811c-b006-2232f00f426a
            user:
              type: string
              format: uuid
              description: ID of the user.
              example: 018051aa-f7a9-a0db-2f38-6cfa325e9d69
            deposit_destination:
              type: string
              format: uuid
              description: >
                ID of the deposit destination.


                If an exact match to an existing deposit destination cannot be
                found, a `null` value is returned and the `details` property
                will provide additional information.
              example: 0176e1ea-60ca-c561-eb8e-6dcdb33b1b55
            direct_deposit_changed:
              type: boolean
              description: >-
                `true` if the deposit switch resulted in any changes to the
                account's current deposit destinations, including additions,
                removals, or changes to existing allocations.
              example: true
            type:
              type: string
              enum:
                - ach_deposit_account
              description: Type of bank account deposit switch.
              example: ach_deposit_account
            flow:
              type: string
              enum:
                - update
              description: >-
                Indicates whether the deposit switch was a removal of an
                existing deposit destination.
              example: update
            details:
              type: string
              enum:
                - null
              description: >-
                Additional details when a one-to-one match between the update
                and an existing deposit destination cannot be determined.
              example: null
            resource:
              type: object
              description: ''
    WebhookMessageFailed:
      type: object
      properties:
        event:
          type: string
          description: 'The event type. Value: `direct_deposit_switches.failed`'
          example: direct_deposit_switches.failed
        name:
          type: string
          description: Name used for the webhook subscription.
          example: name-for-the-webhook-subscription
        data:
          type: object
          properties:
            account:
              type: string
              format: uuid
              description: ID of the account.
              example: 0187c66e-e7e5-811c-b006-2232f00f426a
            user:
              type: string
              format: uuid
              description: ID of the user.
              example: 018051aa-f7a9-a0db-2f38-6cfa325e9d69
            error_code:
              type: string
              description: >-
                The deposit switch error that occurred. See:
                /api-reference/deposit-switch-errors
              example: confirmation_timeout
            error_message:
              type: string
              description: The deposit switch error message.
              example: The user did not finish confirming the direct deposit switch.
            resource:
              type: object
              description: ''
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Username = api_key_id, Password = api_key_secret

````