Interface WebhookResources
- Namespace
- Smartsheet.Api
- Assembly
- smartsheet-csharp-sdk.dll
Interface used to encapsulate webhook resources.
public interface WebhookResources
Methods
CreateWebhook(Webhook)
Creates a new Webhook.
The request body is limited to name(required), callbackUrl (required), scope (required) scopeObjectId (required), events(required), version(required)
It mirrors to the following Smartsheet REST API method:POST /webhooks
Webhook CreateWebhook(Webhook webhook)
Parameters
webhookWebhookthe webhook to be created
Returns
- Webhook
the created webhook
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
DeleteWebhook(long)
Delete a webhook.
It mirrors to the following Smartsheet REST API method: DELETE /webhooks/{webhookId}
void DeleteWebhook(long webhookId)
Parameters
webhookIdlongthe webhook Id
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
GetWebhook(long)
Gets the Webhook specified in the URL.
It mirrors to the following Smartsheet REST API method: GET /webhooks/{webhookId}
Webhook GetWebhook(long webhookId)
Parameters
webhookIdlongthe Id of the webhook
Returns
- Webhook
the webhook resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
ListWebhooks(PaginationParameters?)
Gets the list of all Webhooks that the user owns (if a user generated token was used to make the request) or the list of all Webhooks associated with the third-party app (if a third-party app made the request).
It mirrors to the following Smartsheet REST API method: GET /webhooks
Note: as of the Jun-03-2026 sunset date:
IncludeAllis no longer honored by the server for this endpoint and is ignored if set on PaginationParameters. PaginationParameters remains a shared class — other endpoints still supportIncludeAll.PageSizeis server-capped at 10,000.TotalCountandTotalPageson the response are returned as-1.- Webhooks are sorted by creation date (most recent first), no longer by name.
PaginatedResult<Webhook> ListWebhooks(PaginationParameters? paging = null)
Parameters
pagingPaginationParameters
Returns
- PaginatedResult<Webhook>
PaginatedResult object containing an array of Webhook objects
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
ResetSharedSecret(long)
Resets the shared secret for the specified Webhook. For more information about how a shared secret is used, see Authenticating Callbacks.
The request body should be empty
It mirrors to the following Smartsheet REST API method: POST /webhooks/{webhookId}/resetsharedsecret
WebhookSharedSecret ResetSharedSecret(long webhookId)
Parameters
webhookIdlongthe webhook Id
Returns
- WebhookSharedSecret
the Webhook shared secret
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
UpdateWebhook(Webhook)
Updates the Webhook specified in the URL.
The request body is limited to the name, events, callbackUrl, enabled and version attributes.
It mirrors to the following Smartsheet REST API method: PUT /webhooks/{webhookId}
Webhook UpdateWebhook(Webhook webhook)
Parameters
webhookWebhookthe webhook to update
Returns
- Webhook
the updated webhook
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation