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

# Query Webhook delivery logs

> Query Webhook delivery results. The default window is the last 72 hours, and one request can span at most 30 days. `response_body` retains at most approximately 2,000 characters and may contain business or sensitive information returned by the receiver.

The current service queries logs at tenant scope and does not further isolate them by the user who created the Webhook. Use this endpoint only with an administrator API Key in a controlled tenant, and pass `webhook_id` whenever possible to narrow the scope. Do not expose log responses to ordinary end users.




## OpenAPI

````yaml en/api-reference/adp-api.yaml POST /open/agentic_doc_processor/{tenant_name}/v1/webhook/logs
openapi: 3.1.0
info:
  title: ADP API
  version: 1.0.0
  description: >-
    Laiye ADP OpenAPI reference for document extraction, recognition, and
    conversion; extraction application management; webhooks; human
    collaboration; credit usage; workflow discovery, runs, exports, and file
    management.
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://adp-global.laiye.com
    description: ADP global production endpoint
security: []
tags:
  - name: Document extraction
    description: Extract structured fields from uploaded documents.
  - name: Document recognition
    description: Recognize text, layout blocks, and positions from uploaded documents.
  - name: Document conversion
    description: >-
      Convert PDFs, Office documents, OFD files, and images into page images or
      native spreadsheet structures.
  - name: Application management
    description: >-
      Create, update, delete, and query extraction applications and
      configurations.
  - name: Webhook
    description: List system events and manage event callbacks.
  - name: Account
    description: Query credit usage.
  - name: Workflow
    description: >-
      List business workflow templates, run workflow applications, and query run
      results.
  - name: Workflow files
    description: Upload and manage files used by workflow applications.
  - name: Human collaboration
    description: >-
      Configure review triggers, query collaboration tasks, and submit human
      corrections.
paths:
  /open/agentic_doc_processor/{tenant_name}/v1/webhook/logs:
    post:
      tags:
        - Webhook
      summary: Query Webhook delivery logs
      description: >
        Query Webhook delivery results. The default window is the last 72 hours,
        and one request can span at most 30 days. `response_body` retains at
        most approximately 2,000 characters and may contain business or
        sensitive information returned by the receiver.


        The current service queries logs at tenant scope and does not further
        isolate them by the user who created the Webhook. Use this endpoint only
        with an administrator API Key in a controlled tenant, and pass
        `webhook_id` whenever possible to narrow the scope. Do not expose log
        responses to ordinary end users.
      operationId: queryWebhookLogs
      parameters:
        - $ref: '#/components/parameters/TenantName'
      requestBody:
        $ref: '#/components/requestBodies/WebhookLogQueryRequest'
      responses:
        '200':
          $ref: '#/components/responses/WebhookLogResponse'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    TenantName:
      name: tenant_name
      in: path
      required: true
      description: 'Tenant name. Default: laiye.'
      schema:
        type: string
        default: laiye
  requestBodies:
    WebhookLogQueryRequest:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookLogQueryRequest'
          example:
            webhook_id: webhook_abc123
            start_time: '2026-08-01 00:00:00'
            end_time: '2026-08-02 00:00:00'
            page: 1
            page_size: 20
  responses:
    WebhookLogResponse:
      description: Webhook delivery logs. `response_body` may contain sensitive data.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookLogResponse'
    ValidationError:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HTTPValidationError'
          example:
            detail:
              - type: greater_than
                loc:
                  - query
                  - limit
                msg: Input should be greater than 0
                input: 0
                ctx:
                  gt: 0
  schemas:
    WebhookLogQueryRequest:
      type: object
      additionalProperties: false
      properties:
        webhook_id:
          type:
            - string
            - 'null'
          description: >-
            Webhook configuration ID. Always provide it whenever possible to
            narrow the query scope.
        start_time:
          type:
            - string
            - 'null'
          pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$
          description: >-
            Start time in `YYYY-MM-DD HH:mm:ss` format. If omitted, defaults to
            72 hours before the end time.
        end_time:
          type:
            - string
            - 'null'
          pattern: ^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$
          description: >-
            End time in `YYYY-MM-DD HH:mm:ss` format. If omitted, defaults to
            the current time.
        page:
          type: integer
          default: 1
          minimum: 1
        page_size:
          type: integer
          default: 20
          minimum: 1
          maximum: 100
    WebhookLogResponse:
      allOf:
        - $ref: '#/components/schemas/SimpleResponse'
        - type: object
          properties:
            data:
              type: object
              properties:
                logs:
                  type: array
                  items:
                    $ref: '#/components/schemas/WebhookLog'
                total:
                  type: integer
                  minimum: 0
                page:
                  type: integer
                  minimum: 1
                page_size:
                  type: integer
                  minimum: 1
                  maximum: 100
              required:
                - logs
                - total
                - page
                - page_size
          required:
            - data
    HTTPValidationError:
      type: object
      description: FastAPI/Pydantic request validation error.
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorItem'
      required:
        - detail
    SimpleResponse:
      type: object
      properties:
        code:
          oneOf:
            - type: string
            - type: integer
          description: Business code. A successful response is usually success or 200.
        message:
          type: string
          description: Response message.
        tips:
          type:
            - string
            - 'null'
          description: Details. Defaults to null.
    WebhookLog:
      type: object
      properties:
        id:
          type: string
        webhook_id:
          type: string
        webhook_url:
          type: string
          format: uri
        event_type:
          $ref: '#/components/schemas/WebhookEventType'
        app_id:
          type:
            - string
            - 'null'
        app_name:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - pending
            - success
            - failed
            - final_failed
        retry_count:
          type: integer
          minimum: 0
        next_retry_at:
          type:
            - string
            - 'null'
          format: date-time
        response_code:
          type:
            - integer
            - 'null'
        response_body:
          type:
            - string
            - 'null'
          maxLength: 2000
          description: >-
            Last receiver response or error message. It may contain sensitive
            data.
        delivered_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - webhook_id
        - webhook_url
        - event_type
        - status
        - retry_count
    ValidationErrorItem:
      type: object
      additionalProperties: true
      properties:
        type:
          type: string
          description: Validation error type.
        loc:
          type: array
          description: Location of the invalid field in the request.
          items:
            oneOf:
              - type: string
              - type: integer
        msg:
          type: string
          description: Human-readable validation error message.
        input:
          description: Input value that failed validation.
        ctx:
          type: object
          additionalProperties: true
          description: Additional context supplied by the validator.
        url:
          type: string
          format: uri
          description: Link to the Pydantic error documentation.
      required:
        - type
        - loc
        - msg
    WebhookEventType:
      type: string
      enum:
        - doc_parse_completed
        - doc_extract_completed
        - collaboration_start
        - collaboration_success
        - collaboration_failed
        - collaboration_completed
        - collaboration_timeout
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Production API Key. You can find it under My API in the ADP platform.
        Make sure the API Key is active and belongs to the production
        environment.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.