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

# Paystubs.added webhook

> The `paystubs.added` webhook is sent only when an account's data is [refreshed](/overview/ongoing-refresh) (does not include initial data retrieval) and a new paystub is retrieved.


Sent when paystubs are added or updated.

If you need to access to paystubs as soon as they are available:

* The `paystubs.partially_synced` webhook is sent when paystubs going back a specified number of days prior (starting from the date [when the account was added](/api-reference/accounts-webhooks/added)) have been retrieved during initial data retrieval for a newly connected account.
* The `paystubs.fully_synced` webhook is sent when all paystubs have been retrieved during initial data retrieval for a newly connected account.


## OpenAPI

````yaml openAPI/paystubs-webhooks-added.yaml post /v2/webhooks
openapi: 3.0.0
info:
  title: Paystubs Webhooks API
  version: 1.0.0
  description: >
    API for managing Paystubs webhooks.

    Sent when paystubs are added or updated.


    If you need to access to paystubs as soon as they are available:


    *   The `paystubs.partially_synced` webhook is sent when paystubs going back
    a specified number of days prior (starting from the date when the account
    was added) have been retrieved during initial data retrieval for a newly
    connected account.

    *   The `paystubs.fully_synced` webhook is sent when all paystubs have been
    retrieved during initial data retrieval for a newly connected account.
servers: []
security:
  - basicAuth: []
paths:
  /v2/webhooks:
    post:
      summary: Example subscription
      description: >
        The `paystubs.added` webhook is sent only when an account's data is
        [refreshed](/overview/ongoing-refresh) (does not include initial data
        retrieval) and a new paystub is retrieved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaystubsAddedSubscriptionRequest'
            examples:
              paystubs_added_subscription:
                summary: paystubs.added subscription
                value:
                  events:
                    - paystubs.added
                  name: name-for-the-webhook-subscription
                  url: https://your-webhook-backend.com
                  secret: optional-secret
      responses:
        '200':
          description: Successful subscription
          content:
            application/json:
              schema:
                type: object
                properties:
                  event:
                    type: string
                    enum:
                      - paystubs.added
                    description: The type of event being triggered.
                  name:
                    type: string
                    description: The name of the webhook subscription.
                  data:
                    type: object
                    properties:
                      account:
                        type: string
                        format: uuid
                        description: The unique identifier of the account.
                      user:
                        type: string
                        format: uuid
                        description: >-
                          The unique identifier of the user associated with the
                          paystubs.
                      available_from:
                        type: string
                        format: date-time
                        description: The timestamp when paystubs became available.
                      available_to:
                        type: string
                        format: date-time
                        description: The timestamp until when paystubs are available.
                      available_count:
                        type: integer
                        description: The total number of available paystubs.
                      added_count:
                        type: integer
                        description: The number of newly added paystubs.
                      added_from:
                        type: string
                        format: date-time
                        description: >-
                          The timestamp from which the newly added paystubs are
                          available.
                      added_to:
                        type: string
                        format: date-time
                        description: >-
                          The timestamp until which the newly added paystubs are
                          available.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
components:
  schemas:
    PaystubsAddedSubscriptionRequest:
      type: object
      description: Request body for subscribing to the `paystubs.added` webhook.
      properties:
        events:
          type: array
          items:
            type: string
            enum:
              - paystubs.added
          description: |
            List of events to subscribe to. Must include `paystubs.added`.
            Value is `paystubs.added`
        name:
          type: string
          description: |
            Your name for the webhook subscription.
            Name used 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. URL where you want to
            receive webhook delivery.
        secret:
          type: string
          nullable: true
          description: |
            Optional secret used to verify webhooks.
            Secret used to verify webhooks.
      required:
        - events
        - name
        - url
      example:
        events:
          - paystubs.added
        name: name-for-the-webhook-subscription
        url: https://your-webhook-backend.com
        secret: optional-secret
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Username = api_key_id, Password = api_key_secret

````