跳轉到主要內容
POST
/
v2
/
webhook
/
endpoint
端點 - 建立
curl --request POST \
  --url https://api.chainstream.io/v2/webhook/endpoint \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://example.com",
  "channels": [
    "sol.token.migrated"
  ],
  "description": "Webhook description",
  "disabled": false,
  "filter": "<string>",
  "filterTypes": [
    "<string>"
  ],
  "metadata": {
    "key": "value"
  },
  "rateLimit": 1000,
  "secret": "<string>"
}
'
{
  "id": "ep_01HT7Z4QJ7N2Q9W8P6V3K5M1X2",
  "url": "https://example.com",
  "channels": [
    "sol.token.migrated"
  ],
  "createdAt": "2021-01-01T00:00:00.000Z",
  "description": "Webhook description",
  "disabled": false,
  "filter": "<string>",
  "filterTypes": [
    "<string>"
  ],
  "metadata": {
    "key": "value"
  },
  "rateLimit": 1000,
  "updatedAt": "2021-01-01T00:00:00.000Z"
}

授權

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

主體

application/json

Request to create a webhook endpoint

url
string
必填

Webhook 目標 URL

範例:

"https://example.com"

channels
enum<string>[] | null

訂閱的 Webhook 事件通道

Webhook event channel

可用選項:
sol.token.migrated,
sol.token.created
description
string | null

端點描述

範例:

"Webhook description"

disabled
boolean | null

端點是否已停用

範例:

false

filter
string | null

事件篩選配置

filterTypes
string[] | null

事件類型篩選

metadata
object

端點元資料

範例:
{ "key": "value" }
rateLimit
integer<int32> | null

端點速率限制

必填範圍: x >= 0
範例:

1000

secret
string | null

端點簽名密鑰

回應

200 - application/json

成功回應

Webhook endpoint response

id
string
必填

端點內部 ID

範例:

"ep_01HT7Z4QJ7N2Q9W8P6V3K5M1X2"

url
string
必填

Webhook 目標 URL

範例:

"https://example.com"

channels
enum<string>[] | null

訂閱的 Webhook 事件通道

Webhook event channel

可用選項:
sol.token.migrated,
sol.token.created
createdAt
string | null

端點建立時間戳

範例:

"2021-01-01T00:00:00.000Z"

description
string | null

端點描述

範例:

"Webhook description"

disabled
boolean | null

端點是否已停用

範例:

false

filter
string | null

事件篩選配置

filterTypes
string[] | null

事件類型篩選

metadata
object

端點元資料

範例:
{ "key": "value" }
rateLimit
integer<int32> | null

端點速率限制

必填範圍: x >= 0
範例:

1000

updatedAt
string | null

端點最後更新時間戳

範例:

"2021-01-01T00:00:00.000Z"