Skip to main content

WebhookApiClient

Contains all the endpoints needed to manage webhooks.

Constructors

Constructor

new WebhookApiClient(): WebhookApiClient

Returns

WebhookApiClient

Methods

createWebhookEndpoint()

static createWebhookEndpoint(data, config?): Promise<SCWebhookEndpointType>

This endpoint creates a webhook endpoint and connects it to the given webhook events.

Parameters

ParameterTypeDescription
dataWebhookParamType
config?AxiosRequestConfig

Returns

Promise<SCWebhookEndpointType>


deleteWebhookEndpoint()

static deleteWebhookEndpoint(id, config?): Promise<any>

This endpoint deletes a Webhook Endpoint.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<any>


expireWebhookSigningSecret()

static expireWebhookSigningSecret(id, config?): Promise<SCWebhookEndpointType>

This endpoint expires the secret associated with this endpoint.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<SCWebhookEndpointType>


getAllWebhookEndpointAttempts()

static getAllWebhookEndpointAttempts(id, config?): Promise<SCPaginatedResponse<SCWebhookEndpointAttemptType>>

This endpoint retrieves the attempts related to this endpoint.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCWebhookEndpointAttemptType>>


getAllWebhookEndpoints()

static getAllWebhookEndpoints(config?): Promise<SCPaginatedResponse<SCWebhookEndpointType>>

This endpoint retrieves all webhook endpoints

Parameters

ParameterTypeDescription
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCWebhookEndpointType>>


getAllWebhookEvents()

static getAllWebhookEvents(config?): Promise<string[]>

This endpoint retrieves webhook events that can be enabled in the endpoint.

Parameters

ParameterTypeDescription
config?AxiosRequestConfig

Returns

Promise<string[]>


getASpecificWebhookEndpoint()

static getASpecificWebhookEndpoint(id, config?): Promise<SCWebhookEndpointType>

This endpoint retrieves a specific webhook endpoint using ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<SCWebhookEndpointType>


resendMultipleWebhookEndpointEvent()

static resendMultipleWebhookEndpointEvent(id, event, config?): Promise<any>

This endpoint resends the events specified as parameters to the endpoint specified by the id parameter.

Parameters

ParameterTypeDescription
idstring | number
eventnumber[]
config?AxiosRequestConfig

Returns

Promise<any>


resendWebhookEndpointEvent()

static resendWebhookEndpointEvent(id, event, config?): Promise<any>

This endpoint resends the event specified as parameter to the endpoint specified by the id parameter.

Parameters

ParameterTypeDescription
idstring | number
eventnumber
config?AxiosRequestConfig

Returns

Promise<any>


revealWebhookSigningSecret()

static revealWebhookSigningSecret(id, config?): Promise<SCWebhookEndpointSecretType>

This endpoint reveals the secret associated with this endpoint.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<SCWebhookEndpointSecretType>


updateASingleWebhookEndpointField()

static updateASingleWebhookEndpointField(id, params, config?): Promise<SCWebhookEndpointType>

This endpoint updates a specific field for a specific webhook endpoint.

Parameters

ParameterTypeDescription
idstring | number
paramsWebhookParamType
config?AxiosRequestConfig

Returns

Promise<SCWebhookEndpointType>


updateASpecificWebhookEndpoint()

static updateASpecificWebhookEndpoint(id, params, config?): Promise<SCWebhookEndpointType>

This endpoint updates a specific webhook endpoint.

Parameters

ParameterTypeDescription
idstring | number
paramsWebhookParamType
config?AxiosRequestConfig

Returns

Promise<SCWebhookEndpointType>