> ## 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.

# Accounts.failed webhook

> The `accounts.failed` webhook is sent when:

1. The user submits login credentials that fail to authenticate.
2. The user submits login credentials to re-authenticate an account and authentication fails.
3. The user submits login credentials but there is a timeout during a required multi-factor authentication (MFA) process.
<Warning>
To stay notified of [account disconnections](/workflows/reconnecting-accounts), instead use the `accounts.updated` webhook with a `resource` object included, and check for changes the account object's `connection.status` property.
</Warning>




## OpenAPI

````yaml openAPI/accounts-webhooks-failed.yaml post /v2/webhooks
openapi: 3.0.0
info:
  title: Accounts Webhooks API
  version: 1.0.0
  description: >
    API for handling account connection events via webhooks.

    The `accounts.added` webhook is sent when a user submits login credentials
    through Link. A new account object is created after the login credentials
    have undergone authentication, regardless of whether the connection was
    successful (`accounts.connected` is sent) or unsuccessful (`accounts.failed`
    is sent).
servers: []
security:
  - basicAuth: []
paths:
  /v2/webhooks:
    post:
      summary: Example subscription
      description: >
        The `accounts.failed` webhook is sent when:


        1. The user submits login credentials that fail to authenticate.

        2. The user submits login credentials to re-authenticate an account and
        authentication fails.

        3. The user submits login credentials but there is a timeout during a
        required multi-factor authentication (MFA) process.

        <Warning>

        To stay notified of [account
        disconnections](/workflows/reconnecting-accounts), instead use the
        `accounts.updated` webhook with a `resource` object included, and check
        for changes the account object's `connection.status` property.

        </Warning>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountsFailedRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountsFailedWebhook'
components:
  schemas:
    AccountsFailedRequest:
      type: object
      properties:
        events:
          type: array
          items:
            type: string
            enum:
              - accounts.failed
          description: |
            Array containing the `accounts.failed` event.
            Value: `accounts.failed`
        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.
        config:
          type: object
          properties:
            include_resource:
              type: boolean
              description: >
                `"include_resource": true` will return the [account
                object](/api-reference/accounts#object) in the response within a
                `resource` object.
      required:
        - events
        - name
        - url
      example:
        events:
          - accounts.failed
        name: name-for-the-webhook-subscription
        url: https://your-webhook-backend.com
        secret: optional-secret
        config:
          include_resource: true
    AccountsFailedWebhook:
      type: object
      properties:
        event:
          type: string
          description: The event that triggered the webhook.
          example: accounts.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 [account connection
                error](/api-reference/account-connection-errors) that occurred.
              example: invalid_mfa
            error_message:
              type: string
              description: The account connection error message.
              example: >-
                This user did not provide the correct multi-factor
                authentication response.
            resource:
              type: object
              description: Optional account object.
      example:
        event: accounts.failed
        name: name-for-the-webhook-subscription
        data:
          account: 0187c66e-e7e5-811c-b006-2232f00f426a
          user: 018051aa-f7a9-a0db-2f38-6cfa325e9d69
          error_code: invalid_mfa
          error_message: >-
            This user did not provide the correct multi-factor authentication
            response.
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Username = api_key_id, Password = api_key_secret

````