Skip to main content

update

client.hooks.update(id: string, data: UpdateHookRequest): Promise<Hook>

Updates an existing hook's configuration.

Modifies hook properties such as its name, event trigger, or action. Only the fields provided in the request body are updated.

Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the hook to update
dataUpdateHookRequestYesThe fields to update

Returns

Promise<Hook> — A promise that resolves to the updated

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.hooks.update('id', /* UpdateHookRequest */);
console.log(result);