Sift | Docs

webhooks

Protocol buffer definition for webhooks

sift/webhooks/v1/webhooks.proto

BatchCreateWebhookLogsRequest

The request for a call to WebhookService_BatchCreateWebhookLogs to create a batch of webhook logs.

FieldTypeLabelDescription
requestsCreateWebhookLogRequestrepeated

BatchCreateWebhookLogsResponse

The response of a call to WebhookService_BatchCreateWebhookResponse.

CreateWebhookLogRequest

Request to create a single webhook log entry.

FieldTypeLabelDescription
webhook_idstring
event_idstring
retry_attempt_numberuint32
statusWebhookLogStatus
payloadstringoptional
error_reasonstringoptional
sent_dategoogle.protobuf.Timestamp

CreateWebhookRequest

The request for a call to WebhookService_CreateWebhook to create a webhook.

FieldTypeLabelDescription
namestring
target_urlstring
event_typeWebhookEventType
payloadstringoptional
http_headersWebhookHttpHeaderrepeated

CreateWebhookResponse

The response of a call to WebhookService_CreateWebhook.

FieldTypeLabelDescription
webhookWebhook

CreateWebhookSignatureKeyRequest

The request for a call to WebhookService_CreateWebhookSignatureKey to create a webhook signature key.

CreateWebhookSignatureKeyResponse

The response for a call to WebhookService_CreateWebhookSignatureKey. The active field indicates whether or not whether the key is currently active.

FieldTypeLabelDescription
signature_keyWebhookSignatureKey

GetWebhookRequest

The request for a call to WebhookService_GetWebhook to retrieve a webhook.

FieldTypeLabelDescription
webhook_idstring

GetWebhookResponse

The response of a call to WebhookService_GetWebhook.

FieldTypeLabelDescription
webhookWebhook

GetWebhookSignatureKeyRequest

The request for a call to WebhookService_GetWebhookSignatureKey to retrieve the current webhook signature key.

FieldTypeLabelDescription
organization_idstringOptional organization ID.

GetWebhookSignatureKeyResponse

The response for a call to WebhookService_GetWebhookSignatureKey. The active field indicates whether or not whether the key is currently active.

FieldTypeLabelDescription
signature_keyWebhookSignatureKey

ListWebhookLogsRequest

The request for a call to WebhookService_ListWebhookLogs to retrieve and filter webhook logs.

FieldTypeLabelDescription
page_sizeuint32The maximum number of webhook logs to return. The service may return fewer than this value. If unspecified, at most 50 runs will be returned. The maximum value is 1000.
page_tokenstringA page token, received from a previous ListWebhookLogs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListWebhookLogs must match the call that provided the page token.
filterstringA Common Expression Language (CEL) filter string. The available fields to filter by are webhook_id, status.
order_bystringHow to order the retrieved webhook logs. Formatted as a comma-separated string i.e. "FIELD_NAME[ desc],...". Available field to order_by is created_date. If left empty, items are ordered by created_date in ascending order (oldest-first). For more information about the format of this field, read this Example: "created_date desc"

ListWebhookLogsResponse

The response of a call to WebhookService_ListWebhookLogsResponse.

FieldTypeLabelDescription
logsWebhookLogrepeated
next_page_tokenstring

ListWebhooksRequest

The request for a call to WebhookService_ListWebhooks to retrieve and filter webhooks.

FieldTypeLabelDescription
page_sizeuint32The maximum number of webhooks to return. The service may return fewer than this value. If unspecified, at most 50 runs will be returned. The maximum value is 1000.
page_tokenstringA page token, received from a previous ListWebhooks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListWebhooks must match the call that provided the page token.
filterstringA Common Expression Language (CEL) filter string. Available fields to filter by are webhook_id, name, and event_type.
order_bystringHow to order the retrieved webhooks. Formatted as a comma-separated string i.e. "FIELD_NAME[ desc],...". Available field to order_by is created_date. If left empty, items are ordered by created_date in ascending order (oldest-first). For more information about the format of this field, read this Example: "created_date desc"

ListWebhooksResponse

The response of a call to WebhookService_ListWebhooks.

FieldTypeLabelDescription
webhooksWebhookrepeated
next_page_tokenstring

RotateWebhookSignatureKeyRequest

The request for a call to WebhookService_RotateWebhookSignatureKey replace the current webhook signature key with a new one. The activation state of the new signature key will be inherited from the previous key. If no key exists then this will return an error - see WebhookService_CreateWebhookSignatureKey.

RotateWebhookSignatureKeyResponse

The response for a call to WebhookService_RotateWebhookSignatureKey. The active field indicates whether or not whether the key is currently active.

FieldTypeLabelDescription
signature_keyWebhookSignatureKey

TestWebhookRequest

The request for a call to WebhookService_TestWebhook to test an existing webhook or a webhook create request.

FieldTypeLabelDescription
oneof form.webhook_idstring
oneof form.webhookWebhook
oneof form.create_requestCreateWebhookRequest

TestWebhookResponse

The response of a call to WebhookService_TestWebhook. The response code and body will come from the HTTP response from the target URL.

FieldTypeLabelDescription
http_response_codeuint32
http_response_bodybytes

ToggleWebhookSignatureKeyActivationRequest

The request for a call to WebhookService_ToggleWebhookSignatureKeyActivation to enable or disable the current webhook signature key. Set enable to true to activate the signature key, and false to deactivate.

FieldTypeLabelDescription
enablebool

ToggleWebhookSignatureKeyActivationResponse

The response for a call to WebhookService_ToggleWebhookSignatureKeyActivation.

FieldTypeLabelDescription
signature_keyWebhookSignatureKey

UpdateWebhookRequest

The request for a call to WebhookService_UpdateWebhook to update a webhook.

FieldTypeLabelDescription
webhookWebhookThe webhook to update. The webhook's webhook_id field is used to identify the webhook to update and is required.
update_maskgoogle.protobuf.FieldMaskThe list of fields to be updated. The fields available to be updated are 'target_url', 'name', 'event_type', 'payload', 'http_headers', 'archived_date'.

UpdateWebhookResponse

The response of a call to WebhookService_UpdateWebhook. To archive a webhook, specify archived_date in the update mask as well as a non-null value for archived_date in the webhook object. To unarchive a webhook, specify archived_date in the update mask and a null value for archived_date in the webhook object.

FieldTypeLabelDescription
webhookWebhook

Webhook

FieldTypeLabelDescription
webhook_idstring
organization_idstring
target_urlstring
namestring
event_typeWebhookEventType
payloadstringoptional
created_dategoogle.protobuf.Timestamp
modified_dategoogle.protobuf.Timestamp
archived_dategoogle.protobuf.Timestampoptional
created_by_user_idstring
modified_by_user_idstring
http_headersWebhookHttpHeaderrepeated

WebhookHttpHeader

FieldTypeLabelDescription
namestring
valuestring

WebhookLog

FieldTypeLabelDescription
webhook_log_idstring
webhook_idstring
event_idstring
organization_idstring
statusWebhookLogStatus
payloadstringoptional
retry_attempt_numberuint32
error_reasonstringoptional
sent_dategoogle.protobuf.Timestamp
created_dategoogle.protobuf.Timestamp
modified_dategoogle.protobuf.Timestamp
created_by_user_idstring
modified_by_user_idstring

WebhookSignatureKey

FieldTypeLabelDescription
signature_keystring
activebool
created_dategoogle.protobuf.Timestamp
modified_dategoogle.protobuf.Timestamp
created_by_user_idstring
modified_by_user_idstring

WebhookEventType

NameNumberDescription
WEBHOOK_EVENT_TYPE_UNSPECIFIED0
WEBHOOK_EVENT_TYPE_RULE_VIOLATION1

WebhookLogStatus

NameNumberDescription
WEBHOOK_LOG_STATUS_UNSPECIFIED0
WEBHOOK_LOG_STATUS_SENT1
WEBHOOK_LOG_STATUS_FAILED2
WEBHOOK_LOG_STATUS_RETRYING3

WebhookService

Method NameRequest TypeResponse TypeDescription
GetWebhookGetWebhookRequestGetWebhookResponseRetrieve a webhook by ID.
CreateWebhookCreateWebhookRequestCreateWebhookResponseCreate a webhook.
UpdateWebhookUpdateWebhookRequestUpdateWebhookResponseUpdate select fields of an existing webhook.
ListWebhooksListWebhooksRequestListWebhooksResponseRetrieve and optionally filter a list of webhooks.
TestWebhookTestWebhookRequestTestWebhookResponseTest an existing webhook or a webhook create request. This RPC will attempt to send an actual webhook with the provided parameters and forward back the response from the target.
CreateWebhookSignatureKeyCreateWebhookSignatureKeyRequestCreateWebhookSignatureKeyResponseCreate an webhook signature key. If a webhook signature key is active, the bodies of all webhooks will be signed using the signature key with HMAC-SHA-256. The signature generated will then included in the X-Sift-Signature HTTP header. Only one key can be held per organization. If an existing key exists, then this will simply return it. See WebhookService_RotateWebhookSignatureKey to rotate the key.
GetWebhookSignatureKeyGetWebhookSignatureKeyRequestGetWebhookSignatureKeyResponseRetrieve the current webhook signature key. Will return a not found error if one doesn't yet exist.
ToggleWebhookSignatureKeyActivationToggleWebhookSignatureKeyActivationRequestToggleWebhookSignatureKeyActivationResponseSet the activation state of the organization's current webhook signature key. Will return a not found error if one doesn't yet exist.
RotateWebhookSignatureKeyRotateWebhookSignatureKeyRequestRotateWebhookSignatureKeyResponseGenerate a new webhook signature key and replace the previous one. The activation state of the new key will match the activation state of the previous.
BatchCreateWebhookLogsBatchCreateWebhookLogsRequestBatchCreateWebhookLogsResponseCreate a batch of webhook logs. Users should not have to call this directly.
ListWebhookLogsListWebhookLogsRequestListWebhookLogsResponseRetrieve and optionally filter a list of webhook logs.