Hooks
View hook details
View the details of a hook with the Go SDK.
GET
/hooks/{hook_id}Use client.Hooks.Get to fetch a single webhook by its ID.
Call the method
hook, _, _ := client.Hooks.Get(
"hk_890bdbc4-467f-4670-8424-5667e41daf29",
)
| Field | Type | Description |
|---|---|---|
hookID | string | ID of the hook to retrieve. |
Use the hook details
Read hook for URL, type, active status, and last execution results. Use this to debug hook failures or confirm configuration.
Response
{
"id": "hk_890bdbc4-467f-4670-8424-5667e41daf29",
"name": "Pre-transaction validation",
"url": "https://api.example.com/validate",
"type": "PRE_TRANSACTION",
"active": true,
"timeout": 30,
"retry_count": 3,
"created_at": "2024-11-26T08:36:36.238244338Z",
"last_run": "2024-11-26T09:12:00.000000000Z",
"last_success": true
}Go response (*blnkgo.HookResponse)
| Field | Type | Description |
|---|---|---|
ID | string | Unique ID for the hook. |
Type | blnkgo.HookType | PRE_TRANSACTION or POST_TRANSACTION. |
Active | bool | Whether the hook is enabled. |
LastRun | string | Date and time the hook last executed. |
LastSuccess | bool | Whether the most recent execution succeeded. |