Skip to main content
POST
/
hooks
/
{hook_id}
/
edit
JavaScript
import DroidrunCloud from 'droidrun-cloud';

const client = new DroidrunCloud({
  apiKey: 'My API Key',
});

const hook = await client.hooks.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(hook.id);
{
  "events": [
    "<string>"
  ],
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "state": "<string>",
  "updated": true,
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token via Authorization header

Path Parameters

hook_id
string<uuid>
required

Body

application/json

Request model for editing hook (events or state).

events
string[] | null

Updated list of events to subscribe to

state
string | null

Updated hook state (active, disabled, deleted)

Response

Successful Response

Response model after successfully editing a hook.

id
string<uuid>
required

The subscription ID

state
string
required

The hook state

updated
boolean
required

Whether the hook was updated

url
string
required

The webhook URL

events
string[] | null

List of subscribed events