メインコンテンツへスキップ
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"