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

# Callback status

> Webhook delivery state of a call submitted with `X-Callback-URL` / `callback_url`: kept for 24 h. Free. `404 callback_not_found` for a request without a callback, of another account, or older than 24 h.

Shows whether the webhook for a request submitted with a callback URL was delivered: its state, attempts, the last status your server answered and the next retry. Free. Only the callback **host** is kept, never its path or query. See [Async requests and webhooks](https://docs.scrapebadger.com/long-running-requests.md#receive-webhooks).


## OpenAPI

````yaml get /v1/requests/{request_id}/callback
openapi: 3.1.0
info:
  title: ScrapeBadger Account API
  version: 1.0.0
servers:
  - url: https://scrapebadger.com
security:
  - apiKey: []
paths:
  /v1/requests/{request_id}/callback:
    get:
      tags:
        - Agent
      summary: Callback status
      description: >-
        Webhook delivery state of a call submitted with `X-Callback-URL` /
        `callback_url`: kept for 24 h. Free. `404 callback_not_found` for a
        request without a callback, of another account, or older than 24 h.
      operationId: callback_status_v1_requests__request_id__callback_get
      parameters:
        - name: request_id
          in: path
          required: true
          schema:
            type: string
            title: Request Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncCallbackStatus'
        '404':
          description: '`callback_not_found`.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
                  - detail
components:
  schemas:
    AsyncCallbackStatus:
      title: AsyncCallbackStatus
      type: object
      description: Webhook delivery state of a call submitted with a callback URL.
      properties:
        request_id:
          type: string
        state:
          type: string
          enum:
            - pending
            - delivering
            - delivered
            - failed
          description: >-
            `pending`: the call is still running. `delivering`: an attempt is
            under way or the next retry is due at `next_attempt_at`.
            `delivered`: the endpoint answered 2xx. `failed`: every attempt
            failed, a final status (not 408/429/5xx) came back, or a gateway
            restart interrupted the delivery (`last_error` "interrupted (gateway
            restart)").
        attempts:
          type: integer
        last_status:
          anyOf:
            - type: integer
            - type: 'null'
          description: HTTP status of the last attempt.
        last_error:
          anyOf:
            - type: string
            - type: 'null'
          description: Short error class of the last attempt, e.g. `HTTP 503`, `timeout`.
        next_attempt_at:
          anyOf:
            - type: integer
            - type: 'null'
          description: Unix time of the next retry.
        delivered_at:
          anyOf:
            - type: integer
            - type: 'null'
          description: Unix time.
        callback_host:
          type: string
          description: Host of the callback URL only (never its path or query).
      required:
        - request_id
        - state
        - attempts
        - callback_host
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your ScrapeBadger API key. You can find this in your dashboard at
        https://scrapebadger.com/dashboard/api-keys?utm_source=docs&utm_medium=referral

````

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