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

# Reports.ready webhook

> The `reports.ready` webhook is sent when a [verification report](/api-reference/reports) can be generated once sufficient data has been retrieved from a connected payroll account.

The `reports.ready` webhook is also sent after an [account reconnection](/workflows/reconnecting-accounts) once all new data has been retrieved.

<Info>
This webhooks may be sent multiple times if the user connects multiple accounts.
- The [accounts.connected](/api-reference/accounts-webhooks/connected) and [accounts.failed](/api-reference/accounts-webhooks/failed) webhooks can be used to track multiple account connections.
- Compare them to the accounts listed in the reports.ready webhook payload to determine when to generate a report.
</Info>


Sent when reports can be or have been generated.


## OpenAPI

````yaml openAPI/reports-webhooks-ready.yaml post /v2/webhooks
openapi: 3.0.0
info:
  title: Reports Webhooks API
  version: 1.0.0
  description: |
    Sent when reports can be or have been generated.
servers: []
security:
  - basicAuth: []
paths:
  /v2/webhooks:
    post:
      summary: Example subscription
      description: >
        The `reports.ready` webhook is sent when a [verification
        report](/api-reference/reports) can be generated once sufficient data
        has been retrieved from a connected payroll account.


        The `reports.ready` webhook is also sent after an [account
        reconnection](/workflows/reconnecting-accounts) once all new data has
        been retrieved.


        <Info>

        This webhooks may be sent multiple times if the user connects multiple
        accounts.

        - The [accounts.connected](/api-reference/accounts-webhooks/connected)
        and [accounts.failed](/api-reference/accounts-webhooks/failed) webhooks
        can be used to track multiple account connections.

        - Compare them to the accounts listed in the reports.ready webhook
        payload to determine when to generate a report.

        </Info>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReportsReadyRequest'
            examples:
              reports_ready_subscription:
                summary: reports.ready subscription
                value:
                  events:
                    - reports.ready
                  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/ReportsReadyWebhookMessage'
              examples:
                reports_ready:
                  summary: Example Reports Ready
                  value:
                    event: reports.ready
                    name: name-for-the-webhook-subscription
                    data:
                      user: 018051aa-f7a9-a0db-2f38-6cfa325e9d69
                      resource:
                        user: 018051aa-f7a9-a0db-2f38-6cfa325e9d69
                        external_id: ''
                        accounts:
                          - id: 0185a8b8-60eb-80ca-7482-5f24504573f7
                            last_synced_at: '2024-01-08T12:55:04.016059Z'
                          - id: 0187c66e-e7e5-811c-b006-2232f00f426a
                            last_synced_at: '2024-01-08T12:58:06.023659Z'
                        documents: []
                reports_generated:
                  summary: Example Reports Generated
                  value:
                    event: reports.generated
                    name: name-for-the-webhook-subscription
                    data:
                      user: 018051aa-f7a9-a0db-2f38-6cfa325e9d69
                      type: voie
                      report_id: 43a2c6c3-1e63-91e5-88e3-f9ab2dcc489b
components:
  schemas:
    ReportsReadyRequest:
      type: object
      properties:
        events:
          type: array
          description: '`reports.ready`'
          items:
            type: string
          example:
            - reports.ready
        name:
          type: string
          description: Your name for the webhook subscription.
          example: My Webhook
        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.
          example: https://your-webhook-backend.com
        secret:
          type: string
          description: >-
            Optional secret used to [verify
            webhooks](/api-guide/webhooks#verifying-webhooks).
          example: your-secret-key
      required:
        - events
        - name
        - url
      example:
        events:
          - reports.ready
        name: name-for-the-webhook-subscription
        url: https://your-webhook-backend.com
        secret: optional-secret
    ReportsReadyWebhookMessage:
      type: object
      properties:
        event:
          type: string
          description: '`reports.ready`'
          example: reports.ready
        name:
          type: string
          description: Name used for the webhook subscription.
          example: My Webhook
        data:
          type: object
          properties:
            user:
              type: string
              format: uuid
              description: ID of the user.
              example: 018051aa-f7a9-a0db-2f38-6cfa325e9d69
            resource:
              type: object
              description: Related resources available for report generation.
              properties:
                user:
                  type: string
                  format: uuid
                  description: ID of the user.
                  example: 018051aa-f7a9-a0db-2f38-6cfa325e9d69
                external_id:
                  type: string
                  nullable: true
                  description: >-
                    The [external_id](/api-reference/users#object-external_id)
                    of the user, otherwise `null`.
                  example: ''
                accounts:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: ID of the account.
                        example: 0185a8b8-60eb-80ca-7482-5f24504573f7
                      last_synced_at:
                        type: string
                        format: date-time
                        description: >-
                          Timestamp ([ISO
                          8601](https://en.wikipedia.org/wiki/ISO_8601)) when
                          the account was last scanned for new data.
                        example: '2024-01-08T12:55:04.016059Z'
                documents:
                  type: array
                  description: Documents available for report generation.
                  items:
                    type: object
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Username = api_key_id, Password = api_key_secret

````