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

# Fetch delivery

> Fetch a webhook delivery by ID.

See [Introduction](/api-reference/introduction) for the base URL and authentication.

Fetch the status of a webhook delivery, including each attempt. Delivery IDs are returned on a completed review as `webhookDeliveryId`. See [Fetch review](/api-reference/fetch-review).

## Path Parameters

<ParamField path="deliveryId" type="string" placeholder="whd_agent_abc123" required>
  The ID of the webhook delivery.
</ParamField>

<RequestExample>
  ```bash Request theme={null}
  curl --request GET \
    --url https://api.gotohuman.com/webhooks/deliveries/whd_agent_abc123 \
    --header 'x-api-key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json Succeeded theme={null}
  {
    "accountId": "abFMvLv4HafQymWxKDAov",
    "deliveryId": "whd_agent_abc123",
    "status": "succeeded",
    "ok": true,
    "statusCode": 200,
    "statusText": "OK",
    "event": "review.completed",
    "target": "agent",
    "urlSource": "request",
    "webhook": "https://example.com/hooks/gotohuman",
    "reviewId": "123456abcdef",
    "formId": "123456abcdef",
    "formName": "Review AI Draft",
    "agentId": "agent123456abcdef",
    "sessionId": "session789abcdef",
    "attemptCount": 1,
    "maxAttempts": 7,
    "attempts": [
      {
        "attemptId": "attempt-1",
        "ok": true,
        "statusCode": 200,
        "scheduledBy": "inline",
        "at": "2027-10-05T14:48:02.000Z"
      }
    ],
    "triggeredAt": "2027-10-05T14:48:00.000Z",
    "updatedAt": "2027-10-05T14:48:02.000Z"
  }
  ```

  ```json Retrying theme={null}
  {
    "accountId": "abFMvLv4HafQymWxKDAov",
    "deliveryId": "whd_agent_abc123",
    "status": "retrying",
    "ok": false,
    "statusCode": 500,
    "statusText": "Internal Server Error",
    "event": "review.completed",
    "target": "agent",
    "urlSource": "agent",
    "webhook": "https://example.com/hooks/gotohuman",
    "reviewId": "123456abcdef",
    "formId": "123456abcdef",
    "formName": "Review AI Draft",
    "agentId": "agent123456abcdef",
    "sessionId": "session789abcdef",
    "attemptCount": 2,
    "maxAttempts": 7,
    "attempts": [
      {
        "attemptId": "attempt-1",
        "ok": false,
        "statusCode": 500,
        "scheduledBy": "inline",
        "at": "2027-10-05T14:48:02.000Z"
      },
      {
        "attemptId": "attempt-2",
        "ok": false,
        "statusCode": 500,
        "scheduledBy": "cloud-task",
        "at": "2027-10-05T14:49:05.000Z"
      }
    ],
    "nextRetryAt": "2027-10-05T14:54:05.000Z",
    "triggeredAt": "2027-10-05T14:48:00.000Z",
    "updatedAt": "2027-10-05T14:49:05.000Z"
  }
  ```
</ResponseExample>

## Response

<ResponseField name="accountId" type="string">
  ID of the account that owns the delivery.
</ResponseField>

<ResponseField name="deliveryId" type="string">
  ID of the webhook delivery.
</ResponseField>

<ResponseField name="status" type="string">
  `pending`, `delivering`, `succeeded`, `retrying`, or `dead`.
</ResponseField>

<ResponseField name="ok" type="boolean">
  `true` when the latest attempt returned a successful HTTP response.
</ResponseField>

<ResponseField name="statusCode" type="number">
  HTTP status code from the latest attempt.
</ResponseField>

<ResponseField name="statusText" type="string">
  HTTP status text from the latest attempt.
</ResponseField>

<ResponseField name="event" type="string">
  Webhook event. `review.completed` or `trigger.submitted`.
</ResponseField>

<ResponseField name="target" type="string">
  Where the webhook was sent. `agent`, `tool`, or `audit`.
</ResponseField>

<ResponseField name="urlSource" type="string">
  Which webhook URL was used. `request`, `form`, or `agent`.
</ResponseField>

<ResponseField name="webhook" type="string">
  URL the delivery was sent to.
</ResponseField>

<ResponseField name="reviewId" type="string">
  ID of the review that triggered the delivery.
</ResponseField>

<ResponseField name="formId" type="string">
  ID of the review type.
</ResponseField>

<ResponseField name="formName" type="string">
  Name of the review type.
</ResponseField>

<ResponseField name="agentId" type="string">
  ID of the agent.
</ResponseField>

<ResponseField name="sessionId" type="string">
  Session or workflow run.
</ResponseField>

<ResponseField name="attemptCount" type="number">
  Number of automatic attempts so far.
</ResponseField>

<ResponseField name="maxAttempts" type="number">
  Maximum automatic attempts. Failed deliveries retry up to 7 times. See [Retries](/webhooks#retries).
</ResponseField>

<ResponseField name="attempts" type="object[]">
  One entry per attempt, in order.

  <Expandable title="properties">
    <ResponseField name="attemptId" type="string">
      ID of the attempt, such as `attempt-1`.
    </ResponseField>

    <ResponseField name="ok" type="boolean">
      `true` when this attempt returned a successful HTTP response.
    </ResponseField>

    <ResponseField name="statusCode" type="number">
      HTTP status code from this attempt.
    </ResponseField>

    <ResponseField name="scheduledBy" type="string">
      `inline` for the first attempt, `cloud-task` for an automatic retry, or `manual` for a retry from the review history.
    </ResponseField>

    <ResponseField name="at" type="string">
      ISO 8601 timestamp of the attempt.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="nextRetryAt" type="string">
  ISO 8601 timestamp of the next automatic retry. Present while `status` is `retrying`.
</ResponseField>

<ResponseField name="retriesCancelled" type="boolean">
  `true` when auto-retries were stopped. The delivery status is then `dead`.
</ResponseField>

<ResponseField name="triggeredAt" type="string">
  ISO 8601 timestamp when the delivery was created.
</ResponseField>

<ResponseField name="updatedAt" type="string">
  ISO 8601 timestamp of the latest update.
</ResponseField>
