Returns a user's list of webhooks.
This endpoint is available on Codex Growth and Enterprise Plans
Endpoint: getWebhooks
Method: POST
Arguments
Response
Name | Type | Description |
---|---|---|
alertRecurrence | AlertRecurrence! | The recurrence of the webhook. Can be |
callbackUrl | String! | The url to which the webhook message should be sent. |
conditions | WebhookCondition! | The conditions which must be met in order for the webhook to send a message. |
created | Int! | The unix timestamp for the time the webhook was created. |
groupId | String | The webhook group ID used to group webhooks together for ordered message sending. |
id | String! | The ID of the webhook. |
name | String! | The given name of the webhook. |
retrySettings | RetrySettings | The settings for retrying failed webhook messages. |
status | String! | The status of the webhook. Can be |
webhookType | WebhookType! | The type of webhook. Can be |
publishingType | PublishingType | How the data is published. Can be |
Example
Query
mutation GetWebhooks {
getWebhooks(cursor: "", limit: 10) {
cursor
items {
alertRecurrence
callbackUrl
conditions {
... on PriceEventWebhookCondition {
__typename
networkId {
eq
}
priceUsd {
eq
gt
gte
lt
lte
}
tokenAddress {
eq
}
}
}
created
groupId
id
name
status
webhookType
}
}
}
Response
{
"data": {
"getWebhooks": {
"cursor": null,
"items": [
{
"alertRecurrence": "INDEFINITE",
"callbackUrl": "https://myserver.mydomain.com/my-webhook-handler",
"conditions": {
"__typename": "PriceEventWebhookCondition",
"networkId": {
"eq": 1
},
"priceUsd": {
"eq": null,
"gt": "0",
"gte": null,
"lt": null,
"lte": null
},
"tokenAddress": {
"eq": "0x5a98fcbea516cf06857215779fd812ca3bef1b32"
}
},
"created": 1676662026,
"groupId": "test-group",
"id": "44c4e700-4c09-401e-a6d8-b22bd6935d41",
"name": "uniswap",
"status": "ACTIVE",
"webhookType": "PRICE_EVENT"
}
]
}
}
}
Ask questions, share what you're working on and request new features 👬👭