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

# Webhook

> The Webhook object represents an endpoint configured to receive Event notifications.

A Webhook object represents an endpoint you've configured to receive [Event](/core-resources/event) notifications — payment successes, refunds, subscription changes, and more. Each webhook is subscribed to one or more event types and receives an HTTP POST for every matching event, signed with its `secret`.

A workspace may have a small, fixed number of webhooks configured at once; `create` returns an error once that limit is reached.

<Note>
  Webhook URLs must use `http://` or `https://` and resolve to a public address. Other schemes, and URLs that resolve to a loopback, private, or link-local address (including cloud metadata endpoints), are rejected — both at creation/update time and again at delivery time.
</Note>

## Endpoints

| Method  | Endpoint                            | Description                                        |
| ------- | ----------------------------------- | -------------------------------------------------- |
| `GET`   | `/v0/webhooks/list`                 | List all configured webhooks                       |
| `POST`  | `/v0/webhooks/create`               | Create a new webhook                               |
| `POST`  | `/v0/webhooks/sendTestEvent`        | Send a synthetic test event to subscribed webhooks |
| `GET`   | `/v0/webhooks/{webhookId}`          | Retrieve a webhook                                 |
| `PATCH` | `/v0/webhooks/{webhookId}/update`   | Update a webhook                                   |
| `PATCH` | `/v0/webhooks/{webhookId}/archive`  | Archive a webhook                                  |
| `GET`   | `/v0/webhooks/{webhookId}/attempts` | List a webhook's delivery attempts                 |

## The Webhook object

<ResponseField name="object" type="string">
  Object type identifier. Always `"webhook"` for Webhook objects.
</ResponseField>

<ResponseField name="id" type="string" required>
  Unique identifier (UUID) for this webhook.
</ResponseField>

<ResponseField name="url" type="string" required>
  The endpoint that receives event deliveries.
</ResponseField>

<ResponseField name="status" type="string" required>
  Current webhook status. Possible values: `active`, `inactive`
</ResponseField>

<ResponseField name="secret" type="string" required>
  Signing secret used to verify the `x-fngs-signature` header on each delivery.
</ResponseField>

<ResponseField name="events" type="array" required>
  [Event](/core-resources/event) types this webhook is subscribed to.
</ResponseField>

<ResponseField name="createdAt" type="integer">
  Unix timestamp (milliseconds) when the webhook was created.
</ResponseField>

<ResponseField name="deletedAt" type="integer | null">
  Unix timestamp (milliseconds) when the webhook was archived. `null` if not archived.
</ResponseField>

***

## The Webhook Attempt object

Each delivery attempt — success or failure — is recorded and available via the `attempts` endpoint.

<ResponseField name="object" type="string">
  Object type identifier. Always `"webhook_attempt"` for Webhook Attempt objects.
</ResponseField>

<ResponseField name="id" type="string" required>
  Unique identifier (UUID) for this attempt.
</ResponseField>

<ResponseField name="webhookId" type="string" required>
  The [Webhook](#the-webhook-object) this attempt belongs to.
</ResponseField>

<ResponseField name="eventType" type="string | null">
  The [Event](/core-resources/event) type that was delivered.
</ResponseField>

<ResponseField name="sequence" type="integer" required>
  Retry sequence number for this delivery. `0` is the first try.
</ResponseField>

<ResponseField name="statusCode" type="integer | null">
  HTTP status code returned by the receiving endpoint. `null` if the request itself failed (timeout, connection error, blocked URL).
</ResponseField>

<ResponseField name="request" type="object | null">
  The request body that was sent.
</ResponseField>

<ResponseField name="response" type="object | null">
  The parsed JSON response body, if any.
</ResponseField>

<ResponseField name="createdAt" type="integer">
  Unix timestamp (milliseconds) when the attempt was made.
</ResponseField>

***

## Example response

```json theme={null}
{
  "status": "success",
  "data": {
    "webhook": {
      "object": "webhook",
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "url": "https://example.com/webhooks/fungies",
      "status": "active",
      "secret": "your-webhook-signing-secret",
      "events": ["payment_success", "subscription_cancelled"],
      "createdAt": 1717200000000,
      "deletedAt": null
    }
  }
}
```

***

## Related resources

<CardGroup cols={2}>
  <Card title="Events" icon="bell" href="/core-resources/event">
    The notification payloads webhooks deliver
  </Card>

  <Card title="Webhook Setup Guide" icon="webhook" href="/developers/webhooks/setup">
    Configuring and verifying webhook deliveries
  </Card>
</CardGroup>
