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

> The `reports.generated` webhook is sent when a report has been successfully [generated](/api-reference/reports#generate) and can be retrieved.


# Reports.generated webhook



## OpenAPI

````yaml openAPI/reports-webhooks-generated.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.generated` webhook is sent when a report has been
        successfully [generated](/api-reference/reports#generate) and can be
        retrieved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReportsGeneratedRequest'
            examples:
              reports_generated_subscription:
                summary: reports.generated subscription
                value:
                  events:
                    - reports.generated
                  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/ReportsGeneratedWebhookMessage'
              examples:
                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:
    ReportsGeneratedRequest:
      type: object
      properties:
        events:
          type: array
          description: '`reports.generated`'
          items:
            type: string
          example:
            - reports.generated
        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.generated
        name: name-for-the-webhook-subscription
        url: https://your-webhook-backend.com
        secret: optional-secret
    ReportsGeneratedWebhookMessage:
      type: object
      properties:
        event:
          type: string
          description: '`reports.generated`'
          example: reports.generated
        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
            type:
              type: string
              description: The [type](/api-reference/reports#object-type) of report.
              example: voie
            report_id:
              type: string
              format: uuid
              description: ID of the report.
              example: 43a2c6c3-1e63-91e5-88e3-f9ab2dcc489b
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Username = api_key_id, Password = api_key_secret

````