# Ping a webhook for a workspace

> Send a webhook a ping, to check that its receiver answers.

<div class="g1t-endpoint"><span class="g1t-method" data-method="post">POST</span><code>/workspaces/{workspace}/hooks/{id}/pings</code></div>

- **Authentication:** Required. Send an [access token](/reference/api/#authentication) as `Authorization: Bearer`.
- **MCP tool:** [`webhook`](/reference/mcp/#webhook) with `action` `ping`, and the same inputs
- **Scope:** An access token needs [`webhooks:admin`](/guides/authentication/#scopes).
- **Also at:** [`POST /repos/{owner}/{name}/hooks/{id}/pings`](/reference/api/webhooks/ping-webhook/)

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace` | string | Yes | Instead of repo: the workspace, for its own webhooks. |
| `id` | string | Yes | The webhook's id. |

## Example request

```sh
curl -X POST https://api.g1t.sh/workspaces/flagon-io/hooks/hk_01kpx5p9s4h0t1w6x8y2a3b4cd/pings \
  -H "Authorization: Bearer $G1T_TOKEN"
```

## Example response

A successful request answers `200` with:

```json
{
  "id": "dlv_01kpx5p9v2j7k3m8n4p5q6r7st",
  "hook_id": "hk_01kpx5p9s4h0t1w6x8y2a3b4cd",
  "event_id": "",
  "event": "ping",
  "status": "delivered",
  "attempts": 1,
  "response_status": 200,
  "response_body": "ok",
  "error": null,
  "duration_ms": 184,
  "payload": "{\"hook\":{\"events\":[\"git.push\",\"pull.merged\"],\"id\":\"hk_01kpx5p9s4h0t1w6x8y2a3b4cd\",\"url\":\"https://hooks.example.com/g1t\"},\"message\":\"g1t will send this webhook's events here.\",\"time\":\"2026-10-04T16:01:12.440Z\",\"type\":\"ping\"}",
  "created_at": "2026-10-04T16:01:12.440Z",
  "delivered_at": "2026-10-04T16:01:12.631Z",
  "next_attempt_at": null
}
```

## Errors

A failed request answers with one of these statuses and a body like `{"error": {"code": "not_found", "message": "Repository not found."}}`. See [errors](/reference/api/#errors).

| Status | Code | When |
| --- | --- | --- |
| 401 | `unauthenticated` | A token is required, or the one sent is not valid. |
| 403 | `forbidden` | The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | `not_found` | It does not exist, or you cannot see it. |
| 409 | `conflict` | The request conflicts with the current state. |
| 422 | `invalid` | The input is not valid. `message` says which field and why. |
