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

> ## Agent Instructions
> Setting up Context.dev for a user? Follow https://docs.context.dev/agent-quickstart.md. Start by signing the user up and getting an API key through https://www.context.dev/auth.md; application code reads CONTEXT_DEV_API_KEY.

# Retrieve a webhook delivery

> Retrieve a webhook delivery’s status and original payload.

<Badge color="blue">0 credits</Badge>

See the [guide](/webhooks) for examples and usage.


## OpenAPI

````yaml GET /webhooks/deliveries/{delivery_id}
openapi: 3.1.0
info:
  title: Context.dev API
  description: >-
    Scrape, crawl, search, and monitor websites, and retrieve brand, people, and
    news data.
  version: 1.0.0
servers:
  - url: https://api.context.dev/v1
security: []
tags:
  - name: Webhooks
    description: Inspect and retry batch and monitor webhook deliveries.
  - name: Logs
    description: Read your organization's API request logs.
  - name: Usage
    description: Read your organization's credit balance and usage history.
  - name: Agent Feedback
    description: Report API issues and documentation mismatches.
  - name: Batches
    description: Scrape many pages or crawl a site asynchronously.
  - name: Monitors
    description: Watch websites for exact or meaningful changes.
  - name: News
    description: Search live and historical news about a company.
  - name: Answers
    description: Answer a research task from the live web in the JSON shape you ask for.
paths:
  /webhooks/deliveries/{delivery_id}:
    get:
      tags:
        - Webhooks
      summary: Retrieve a webhook delivery
      description: Retrieve a webhook delivery’s status and original payload.
      operationId: getWebhookDelivery
      parameters:
        - schema:
            type: string
            pattern: ^whd_[a-f0-9]{32}$
            description: Delivery ID.
          required: true
          description: Delivery ID.
          name: delivery_id
          in: path
        - $ref: '#/components/parameters/RequestTags'
      responses:
        '200':
          description: Webhook delivery
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Mode:
              $ref: '#/components/headers/RateLimitMode'
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookDelivery'
                  - type: object
                    properties:
                      key_metadata:
                        $ref: '#/components/schemas/KeyMetadata'
                      request_id:
                        $ref: '#/components/schemas/RequestId'
                    required:
                      - request_id
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          description: Rate limit exceeded (600 requests per minute per organization).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Mode:
              $ref: '#/components/headers/RateLimitMode'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Webhook service is temporarily unavailable.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Mode:
              $ref: '#/components/headers/RateLimitMode'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    RequestTags:
      name: tags
      in: query
      required: false
      style: form
      explode: false
      schema:
        $ref: '#/components/schemas/RequestTags'
      description: >-
        Comma-separated labels for filtering usage, e.g.
        `production,team-alpha`.
      example: production,team-alpha
  headers:
    RequestId:
      description: Unique ID of this request; also `request_id` in JSON bodies.
      schema:
        type: string
        format: uuid
    RateLimitLimit:
      description: >-
        Maximum request units per minute, or maximum concurrent requests when
        X-RateLimit-Mode is concurrency.
      schema:
        type: integer
        minimum: 1
    RateLimitRemaining:
      description: >-
        Request units remaining in the current minute, or concurrent requests
        still available when X-RateLimit-Mode is concurrency.
      schema:
        type: integer
        minimum: 0
    RateLimitReset:
      description: >-
        Unix timestamp in seconds when the per-minute rate limit resets. Omitted
        for concurrency limits.
      schema:
        type: integer
    RateLimitMode:
      description: >-
        Set to concurrency when the organization is limited by concurrent
        requests. Omitted for per-minute limits.
      schema:
        type: string
        enum:
          - concurrency
  schemas:
    WebhookDelivery:
      type: object
      properties:
        id:
          type: string
          description: Delivery ID.
        event:
          type: string
          enum:
            - batch.completed
            - batch.failed
            - batch.cancelled
            - change.detected
            - run.completed
          description: Webhook event type.
        source:
          oneOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - batch
                  description: 'Which deliveries to list: `batch` or `monitor`.'
                batch_id:
                  type: string
                  description: Batch ID.
              required:
                - type
                - batch_id
              title: Batch
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - monitor
                  description: 'Which deliveries to list: `batch` or `monitor`.'
                monitor_id:
                  type: string
                  description: Monitor ID.
                run_id:
                  type: string
                  description: Monitor run ID.
              required:
                - type
                - monitor_id
                - run_id
              title: Monitor
          description: Batch or monitor run that produced the event.
        url:
          type: string
          format: uri
          description: Webhook destination URL.
        status:
          type: string
          enum:
            - pending
            - delivering
            - retrying
            - delivered
            - failed
            - cancelled
          description: >-
            `pending`, `delivering`, `retrying`, `delivered`, `failed`, or
            `cancelled` (source or its webhook was removed).
        created_at:
          type: string
          format: date-time
          description: Event creation time.
        retry_expires_at:
          type: string
          format: date-time
          description: Last time you can retry manually (7 days after the event).
        delivered_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Last successful delivery time, or null if never delivered.
        next_attempt_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Next scheduled attempt, or null if none.
        last_error:
          type:
            - object
            - 'null'
          properties:
            code:
              type: string
              description: Error code.
            message:
              type: string
              description: Error details.
          required:
            - code
            - message
          description: Latest delivery error, or null if none.
        event_id:
          type: string
          description: Stable event ID for deduplicating received webhooks.
        retry:
          allOf:
            - $ref: '#/components/schemas/WebhookRetry'
            - description: Automatic retry settings for this event.
        last_attempt:
          anyOf:
            - $ref: '#/components/schemas/WebhookAttempt'
            - type: 'null'
          description: Latest attempt, or null if none.
      required:
        - id
        - event
        - source
        - url
        - status
        - created_at
        - retry_expires_at
        - delivered_at
        - next_attempt_at
        - last_error
        - event_id
        - retry
        - last_attempt
    KeyMetadata:
      type: object
      properties:
        credits_consumed:
          type: integer
          description: Credits charged for this request.
        credits_remaining:
          type: integer
          description: Credits remaining for your organization.
      required:
        - credits_consumed
        - credits_remaining
      description: Credits this request used and your remaining balance.
    RequestId:
      type: string
      format: uuid
      description: >-
        Unique ID of this request, also in `X-Request-Id`. Include it when
        contacting support.
      example: 3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message.
        error_code:
          type: string
          enum:
            - INTERNAL_ERROR
            - VALID
            - NOT_FOUND
            - FORBIDDEN
            - USAGE_EXCEEDED
            - RATE_LIMITED
            - UNAUTHORIZED
            - DISABLED
            - PAID_PLAN_REQUIRED
            - INSUFFICIENT_PERMISSIONS
            - TIMEOUT_EXCEEDS_MAXIMUM
            - TIMEOUT_TOO_SHORT_FOR_WAIT
            - WEBSITE_ACCESS_ERROR
            - WEBSITE_BLOCKED
            - WEBSITE_NOT_FOUND
            - PDF_SKIPPED
            - PDF_IMAGES_ONLY
            - INPUT_VALIDATION_ERROR
            - ZDR_NOT_SUPPORTED
            - ZDR_NOT_ENABLED
            - FREE_EMAIL_DETECTED
            - DISPOSABLE_EMAIL_DETECTED
            - REQUEST_TIMEOUT
            - COLD_DOMAIN_TIMEOUT_TOO_LOW
            - UNSUPPORTED_CONTENT
            - CONTENT_TOO_LARGE
            - MONITOR_PAUSED
            - MONITOR_NO_WEBHOOK
            - COLLECTION_PAUSED
            - MONITOR_LIMIT_EXCEEDED
            - SEARCH_UNAVAILABLE
            - BATCH_LIMIT_EXCEEDED
            - BATCH_NOT_CANCELLABLE
            - BATCH_NOT_COMPLETED
            - IDEMPOTENCY_KEY_CONFLICT
            - DELIVERY_IN_PROGRESS
            - DELIVERY_ALREADY_DELIVERED
            - DELIVERY_EXPIRED
            - DELIVERY_CANCELLED
          description: Machine-readable error code.
        required_permission:
          type: string
          enum:
            - logs:read
            - data:execute
            - monitors:read
            - monitors:write
            - batches:read
            - batches:write
          description: >-
            Permission required for this request when error_code is
            INSUFFICIENT_PERMISSIONS. Manage (write) also grants read access to
            the same resource group.
        key_metadata:
          $ref: '#/components/schemas/KeyMetadata'
        request_id:
          $ref: '#/components/schemas/RequestId'
      required:
        - request_id
    RequestTags:
      type: array
      items:
        type: string
        minLength: 1
        maxLength: 50
      maxItems: 20
      description: Labels for filtering usage in the dashboard.
      example:
        - production
        - team-alpha
    WebhookRetry:
      type: object
      properties:
        delays_seconds:
          type: array
          items:
            type: integer
            minimum: 1
            maximum: 86400
          maxItems: 10
          description: >-
            Retry delays in seconds, totaling at most 72 hours. Use [] to
            disable automatic retries.
          example:
            - 30
            - 300
            - 3600
      additionalProperties: false
      description: Webhook retry settings. Use {} for the default schedule.
      example:
        delays_seconds:
          - 10
          - 60
          - 300
          - 1800
          - 7200
          - 21600
          - 57600
    WebhookAttempt:
      type: object
      properties:
        attempt:
          type: integer
          minimum: 1
          description: Attempt number, starting at 1.
        trigger:
          type: string
          enum:
            - initial
            - automatic
            - manual
          description: >-
            `initial`, `automatic` (scheduled retry), or `manual` (Retry
            endpoint).
        url:
          type: string
          format: uri
          description: URL used for this attempt.
        started_at:
          type: string
          format: date-time
          description: Attempt start time.
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Completion time, or null while in progress.
        http_status:
          type:
            - integer
            - 'null'
          description: HTTP response status, or null if no response was received.
        error:
          type:
            - object
            - 'null'
          properties:
            code:
              type: string
              description: Error code.
            message:
              type: string
              description: Error details.
          required:
            - code
            - message
          description: Attempt error, or null if none.
      required:
        - attempt
        - trigger
        - url
        - started_at
        - completed_at
        - http_status
        - error
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        X-RateLimit-Mode:
          $ref: '#/components/headers/RateLimitMode'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        X-RateLimit-Mode:
          $ref: '#/components/headers/RateLimitMode'
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/RequestId'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        X-RateLimit-Mode:
          $ref: '#/components/headers/RateLimitMode'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <API_KEY>`. Keys have full access unless
        restricted to scopes.

````

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