Create a chainhook

Create a chainhook through the Hiro Platform.


POST
/v1/ext/{apiKey}/chainhooks

Path Parameters

apiKeystring

Hiro API key

Chainhook predicate configuration

Empty Object

Response Body

curl -X POST "https://api.platform.hiro.so/v1/ext/0941f307fd270ace19a5bfed67fbd3bc/chainhooks" \
  -H "Content-Type: application/json" \
  -d '{}'
const body = JSON.stringify({})

fetch("https://api.platform.hiro.so/v1/ext/0941f307fd270ace19a5bfed67fbd3bc/chainhooks", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.platform.hiro.so/v1/ext/0941f307fd270ace19a5bfed67fbd3bc/chainhooks"
  body := strings.NewReader(`{}`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.platform.hiro.so/v1/ext/0941f307fd270ace19a5bfed67fbd3bc/chainhooks"
body = {}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "status": "string",
  "chainhookUuid": "string"
}