Retrieve all webhooks events

Get a list of registered webhooks events.

GET

Parameters

Path Parameters

WebhookId
REQUIRED
Unique identifier of the webhook

Query Parameters

Id
Filter resources by their unique identifier
Autocomplete
Search term for autocomplete functionality
Limit
How many items to return at one time (max 100)
Next
Pagination token for retrieving the next page of results
Order
Sort order for the results (ascending or descending)
SortBy
Field name to sort the results by
Webhook_id
Filter events by webhook ID
Org_id
Filter events by organization ID
Type
Filter events by webhook type
Status
Filter events by their status
When_created[$gt]
Filter events created after this date and time
When_created[$lt]
Filter events created before this date and time
When_created[$gte]
Filter events created on or after this date and time
When_created[$lte]
Filter events created on or before this date and time
Status codeDescription
200A list of webhooks events.
400Bad request error - the request contains invalid parameters or malformed data
500Internal server error - an unexpected error occurred on the server
cURL
curl -L \
"https://blockv-labs.io/webhooks/{webhookId}/events?id={id}&autocomplete={autocomplete}&limit={limit}&next={next}&order={order}&sortBy={sortBy}&webhook_id={webhook_id}&org_id={org_id}&type={type}&status={status}&when_created[$gt]={when_created[$gt]}&when_created[$lt]={when_created[$lt]}&when_created[$gte]={when_created[$gte]}&when_created[$lte]={when_created[$lte]}" \
-H 'Accept: application/json'
Response
{
"events": [
{
"id": "string",
"webhook_id": "wh_octjglnywaupz6th",
"type": "template_activity",
"payload": "string",
"signature": "string",
"url": "https://example.com/webhook",
"status": "delivered",
"error": {
"code": 0,
"message": "Error message"
},
"when_modified": "2021-10-01T12:00:00Z",
"when_created": "2021-10-01T12:00:00Z"
}
],
"next": "string"
}
json
{
"type": "object",
"required": [
"events"
],
"properties": {
"events": {
"type": "array",
"description": "Array of webhook events showing delivery attempts and status.",
"items": {
"type": "object",
"description": "Represents a webhook event notification.",
"required": [
"id",
"webhook_id",
"type",
"payload",
"signature",
"url",
"status",
"when_created"
],
"properties": {
"id": {
"type": "string",
"description": "Unique ID for the webhook.",
"x-oapi-codegen-extra-tags": {
"json": "id,omitempty",
"bson": "_id,omitempty"
},
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
}
},
"webhook_id": {
"type": "string",
"description": "Unique identifier for the webhook.",
"example": "wh_octjglnywaupz6th",
"x-oapi-codegen-extra-tags": {
"bson": "webhook_id,omitempty"
},
"x-go-type": "id.ID",
"x-go-type-import": {
"path": "github.com/vlabsio/smarttoken/pkg/types/id"
}
},
"type": {
"type": "string",
"description": "Enum representing the available webhook types.",
"enum": [
"address_activity",
"template_activity",
"action_activity"
],
"example": "template_activity"
},
"payload": {
"type": "string",
"description": "The actual event payload.",
"x-oapi-codegen-extra-tags": {
"bson": "event,omitempty"
}
},
"signature": {
"type": "string",
"description": "The signature of the event.",
"x-oapi-codegen-extra-tags": {
"bson": "signature,omitempty"
}
},
"url": {
"type": "string",
"description": "The URL that the event was sent to.",
"example": "https://example.com/webhook",
"x-oapi-codegen-extra-tags": {
"bson": "url,omitempty"
}
},
"status": {
"type": "string",
"description": "The current delivery status of the webhook event.",
"enum": [
"pending",
"delivered",
"failed",
"retrying"
],
"example": "delivered",
"x-oapi-codegen-extra-tags": {
"bson": "status,omitempty"
}
},
"error": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "object",
"x-go-type": "any",
"x-go-type-skip-optional-pointer": true
}
}
},
"when_modified": {
"type": "string",
"format": "date-time",
"description": "The date and time the event was last modified.",
"example": "2021-10-01T12:00:00Z",
"x-oapi-codegen-extra-tags": {
"bson": "when_modified,omitempty"
}
},
"when_created": {
"type": "string",
"format": "date-time",
"description": "The date and time the event was created.",
"example": "2021-10-01T12:00:00Z",
"x-oapi-codegen-extra-tags": {
"bson": "when_created,omitempty"
}
}
}
}
},
"next": {
"type": "string",
"description": "Pagination token for retrieving the next set of webhook events.",
"x-go-type-skip-optional-pointer": true
}
}
}