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

# Validate a Web Archive destination

> Run the Web Archive destination test upload again. POST /webarchive/destinations/{id}/validate is allowed 5 minutes after a valid result, 1 minute otherwise.

`POST /webarchive/destinations/{id}/validate` runs the test upload to the bucket again and stores the result in `validation`. Send the body `{}`.

> [!WARNING]
>
> A `200` response doesn't mean success. Check `validation.status`: `valid` means Bright Data can write to the bucket.

> [!NOTE]
>
> The last validation, including the one on create, sets when the next one is allowed: 5 minutes after a `valid` result, 1 minute after any other result. A validation before then, or while one is running, returns `429 destination_validation_cooldown`.

Bright Data never validates on its own. A `valid` result shows as `expired` after 24 hours and the destination keeps working. Validate is limited to 10 requests per minute and 60 per hour.

The test uploads an object under `<prefix>/.brd-destination-probe/` (5 MiB + 1 byte as a multipart upload on Amazon S3 and OCI, 1 KiB on GCS, Azure and Alibaba OSS), lists and reads it back and deletes it when the credentials allow it. `validation.probe_key` shows its path and `validation.probe_deleted` shows if it was deleted.


## OpenAPI

````yaml api-reference/web-archive-api POST /webarchive/destinations/{id}/validate
openapi: 3.1.0
info:
  title: BrightData Web Archive API
  version: 1.0.0
  description: API to search and retrieve archived web pages.
servers:
  - url: https://api.brightdata.com
security:
  - bearerAuth: []
paths:
  /webarchive/destinations/{id}/validate:
    parameters:
      - name: id
        in: path
        required: true
        description: 'Destination ID: `dst_` followed by 32 hex characters.'
        schema:
          type: string
          pattern: ^dst_[a-f0-9]{32}$
          example: dst_0123456789abcdef0123456789abcdef
    post:
      summary: Validate a destination again
      description: >-
        Runs the test upload again and stores the result in `validation`. The
        next validation is allowed 5 minutes after a `valid` result and 1 minute
        after any other result. A 200 response doesn't mean success: check
        `validation.status`. Limited to 10 requests per minute and 60 per hour.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            examples:
              Empty:
                value: {}
      responses:
        '200':
          description: The destination with the new validation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Destination'
        '401':
          description: Missing or invalid API key.
        '404':
          description: >-
            `destination_not_found`: unknown ID, or a destination of another
            account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DestinationError'
        '409':
          description: >-
            `destination_validation_superseded`: a newer change replaced this
            validation; read the destination again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DestinationError'
        '429':
          description: >-
            `destination_validation_cooldown`: the cooldown has not ended or a
            validation is running. `destination_validation_busy`: too many
            validations at once.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DestinationError'
        '503':
          description: '`destination_unavailable`: temporary error; retry.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DestinationError'
components:
  schemas:
    Destination:
      type: object
      properties:
        id:
          type: string
          description: Destination ID
          example: dst_0123456789abcdef0123456789abcdef
        customer_id:
          type: string
          description: Your Bright Data Account ID
        name:
          type: string
        target:
          type: object
          description: Where Bright Data writes. Credentials are never returned.
          properties:
            provider:
              type: string
              enum:
                - s3
                - gcs
                - azure
                - oci
                - ali_oss
            auth_mode:
              type: string
            bucket:
              type: string
            prefix:
              type: string
            account:
              type: string
            namespace:
              type: string
            region:
              type: string
            role_arn:
              type: string
            region_hint:
              type: string
        validation:
          $ref: '#/components/schemas/DestinationValidation'
        firehose_validation:
          $ref: '#/components/schemas/DestinationValidation'
          description: >-
            `assume_role` only. Result of the same test with the Bright Data
            Data Firehose role. For information only: it doesn't change
            `validation.status`.
        target_revision:
          type: integer
          description: Increases when the target changes
        auth_revision:
          type: integer
          description: Increases when the credentials or role change
        next_validation_at:
          type: string
          format: date-time
          description: Earliest time of the next validation
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    DestinationError:
      type: object
      required:
        - error_code
      properties:
        error_code:
          type: string
          enum:
            - invalid_destination
            - invalid_destination_request
            - destination_not_found
            - destination_in_use
            - destination_changed
            - destination_limit_reached
            - destination_validation_superseded
            - destination_validation_failed
            - destination_validation_cooldown
            - destination_validation_busy
            - destination_validation_unavailable
            - destination_unavailable
    DestinationValidation:
      type: object
      description: Result of the last test upload.
      properties:
        status:
          type: string
          enum:
            - valid
            - expired
            - invalid
            - unavailable
            - unverified
            - validating
          description: >-
            `valid`: Bright Data can write to the bucket. `expired`: was valid
            more than 24 hours ago; deliveries are not blocked. `invalid`:
            Bright Data can't write; see `error_code`, `stage` and `checks`.
            `unavailable`: validation couldn't run; try again. `unverified`:
            stored but not validated yet. `validating`: a validation is running.
        error_code:
          type: string
          description: >-
            Why validation failed, for example `s3_access_denied`,
            `s3_assume_role_denied` or `region_mismatch`.
        stage:
          type: string
          description: Test step that failed.
        checks:
          type: object
          description: >-
            One key per test step. `true`: passed. `false`: ran and was denied.
            A missing key: the step was not reached.
          additionalProperties:
            type: boolean
        probe_key:
          type: string
          description: Path of the test object, under `<prefix>/.brd-destination-probe/`.
        probe_deleted:
          type: boolean
          description: >-
            `false` when the credentials can't delete and the test object stays
            in the bucket.
        location:
          type: object
          description: Bucket region found by validation.
          properties:
            provider:
              type: string
            regions:
              type: array
              items:
                type: string
            type:
              type: string
            source:
              type: string
            checked_at:
              type: string
              format: date-time
        checked_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
          description: >-
            When a `valid` result shows as `expired`: 24 hours after
            `checked_at`.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Use your Bright Data API Key as a Bearer token in the Authorization
        header.


        **How to authenticate:**

        1. Obtain your API Key from the Bright Data account settings at
        https://brightdata.com/cp/setting/users

        2. Include the API Key in the Authorization header of your requests

        3. Format: `Authorization: Bearer YOUR_API_KEY`


        **Example:**

        ```

        Authorization: Bearer
        b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df

        ```


        Learn how to get your Bright Data API key:
        https://docs.brightdata.com/api-reference/authentication
      bearerFormat: API Key

````