---
title: "Register a completion webhook"
method: POST
path: "/api/hooks/register"
tags: ["keys-hooks"]
---

# Register a completion webhook

`POST /api/hooks/register`

## Request

- Base URL: `https://api.anygas.xyz/svc`
- URL: `https://api.anygas.xyz/svc/api/hooks/register`
- Auth: none declared

Get called on DONE/FAILED for a route id instead of polling. We POST {event,routeId,status,destTx,srcTx,ts}. If secret is set, deliveries carry x-anygas-signature: sha256=HMAC(secret, rawBody). Watch state at GET /api/hooks/{id}. Rate limit 120/min.

## Request body

- object
  - `routeId` string, required
  - `url` string, required
  - `secret` string

## Response `200`

Hook registered

- HookRegistered
  - `id` string
  - `routeId` string
  - `url` string
  - `status` string
  - `note` string

---

[API](https://skmtc.dev/anygas/apis/robyn-anygas-api.md) · [All operations](https://skmtc.dev/anygas/apis/robyn-anygas-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anygas/apis/robyn-anygas-api/revisions/9b7498be8304?raw)
