Skip to content
Docs

Webhook settings

Get the webhook

GET /v1/webhook returns the URL, networks, notify and tokens settings, and test status.

Overview

GET/v1/webhook

Returns the project's webhook. The key itself is never returned, only its first characters.

Request

Request
curl -sS "https://webhooks.gray3.io/v1/webhook" \
  -H "X-Gray-Project-Id: proj_your_project_id" \
  -H "Authorization: Bearer gray_whk_your_webhook_key"

Response

HTTP 200 — success envelope wraps the payload in data.

json
{
  "data": {
    "id": "whk_3b9d…",
    "name": "Production",
    "url": "https://api.example.com/webhooks/gray3",
    "status": "active",
    "enabledChainIds": ["ethereum", "base", "arbitrum"],
    "notify": "both",
    "tokens": "all",
    "keyPrefix": "gray_whk_4kQ",
    "keyRotatedAt": "2026-10-01T08:00:00.000Z",
    "verified": true,
    "verifiedAt": "2026-10-16T09:30:00.412Z",
    "lastTest": { "at": "2026-10-16T09:30:00.412Z", "ok": true, "responseCode": 200, "latencyMs": 184 },
    "createdAt": "2026-10-01T08:00:00.000Z",
    "updatedAt": "2026-10-16T09:30:00.412Z"
  }
}
FieldRequiredDescription
urlYesWhere messages are sent.
statusYesactive sends messages. paused holds them until you resume.
enabledChainIdsYesNetworks this webhook listens on.
notifyYesboth, confirmed, or unconfirmed. See Unconfirmed and confirmed messages.
tokensYesall or verified. See Verified and unverified tokens.
keyPrefixYesFirst characters of the current key, to tell keys apart.
verifiedYestrue once a test event to the current URL got a 2xx reply. Required before adding addresses.
lastTestYesResult of the latest test event, or null.

Errors

Errors use HTTP { "error": { "code", "message", "retryable" } }. Branch on code, not the message text.

CodeHTTPWhen
not_found404The project has no webhook. Create one in Console.
json
{
  "error": {
    "code": "not_found",
    "message": "Human-readable detail (may be sanitized).",
    "retryable": false
  }
}