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

# Ping webhook

> Pings your webhook endpoint.

POST/webhooks/\{token}/ping

Pings your webhook endpoint.

Send a ping request to your webhook endpoint to validate credentials and connectivity. Your webhook endpoint must be configured to respond.

## Configuring your webhook endpoint

When the Marqeta platform receives the ping request, it sends a `POST` request containing the following body to the URL of your webhook endpoint:

```json JSON lines wrap theme={null}
{
  "pings": [
    {
      "token": "marqeta",
      "payload": "healthcheck"
    }
  ]
}
```

To indicate that it is functioning properly, your webhook endpoint must respond with a status code of `200` (see [Signature Verification](https://www.marqeta.com/docs/developer-guides/signature-verification.md) for a code example that identifies a ping request). The response can optionally include a [JSON](http://www.json.org/)-formatted body, for example:

```json JSON lines wrap theme={null}
{"my_endpoint_status": "alive"}
```

The Marqeta platform then responds to its requestor by echoing, as-is, the response code and body received from your webhook endpoint.

## Using the ping facility

To ping a webhook endpoint, send a `POST` request to `/webhooks/{token}/ping` and use the `token` path parameter to specify which webhook you want to reach. Include an empty, [JSON](http://www.json.org/)-formatted body in the request, that is:

```json JSON lines wrap theme={null}
{}
```

The following chain of actions occurs during the successful execution of a ping operation:

**Step 1**

The Marqeta platform receives the ping request (`POST` to `/webhooks/{token}/ping`).

**Step 2**

The Marqeta platform sends a request to your webhook endpoint.

**Step 3**

Your webhook endpoint responds with a status code of "200" and an optional body.

**Step 4**

The Marqeta platform responds to its requestor by echoing, as-is, the response code and body it received from your webhook endpoint.

> [!NOTE]
>
> **Note**\
> If the customer-hosted endpoint fails to respond within five seconds, the Marqeta platform times out the request and responds with the following message body (where `<optional message>` represents additional details you can choose to include in the response):

```json JSON lines wrap theme={null}
{
  "error_message": "Webhook operation failed " + <optional message>,
  "error_code": "422600"
}
```

Failed pings are not automatically retried.

## URL path parameters

| Fields | Description |
| - | - |
| token string  Required | Unique identifier of the webhook. **Allowable Values:**  Existing webhook token |

## Response body

| Fields | Description |
| - | - |
| pings array of objects  Returned | Array of ping requests to your webhook endpoint. **Allowable Values:**  Valid array of one or more `ping` requests |
| pings\[].**payload** string  Conditionally returned | Payload of the ping request. **Allowable Values:**  255 char max |
| pings\[].**token** string  Conditionally returned | Unique identifier of the ping request. **Allowable Values:**  255 char max |

## Sample response body

```json JSON lines wrap theme={null}
{
  "pings": [
    {
      "my_endpoint_status": "alive"
    }
  ]
}
```


## Related topics

- [Webhooks Overview](https://www.marqeta.com/docs/core-api/webhooks.md)
- [Simulate ping](https://www.marqeta.com/docs/core-api/validating-connectivity/simulate-ping.md)
- [Perform ping](https://www.marqeta.com/docs/core-api/validating-connectivity/perform-ping.md)
- [About Webhooks](https://www.marqeta.com/docs/developer-guides/about-webhooks.md)
- [Signature Verification](https://www.marqeta.com/docs/developer-guides/signature-verification.md)
