Update
client.teams.webhookEndpoints.update(stringwebhookEndpointID, WebhookEndpointUpdateParams { teamId, description, enabled, 2 more } params, RequestOptionsoptions?): WebhookEndpointUpdateResponse { webhookEndpoint }
PUT/teams/{teamId}/webhook-endpoints/{webhookEndpointId}
Update
import Scenario from '@scenario-labs/sdk';
const client = new Scenario({
apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});
const webhookEndpoint = await client.teams.webhookEndpoints.update('webhookEndpointId', {
teamId: 'teamId',
});
console.log(webhookEndpoint.webhookEndpoint);{
"webhookEndpoint": {
"id": "id",
"createdAt": "createdAt",
"enabled": true,
"enabledEvents": [
"*"
],
"nbFailedCalls": 0,
"nbTotalCalls": 0,
"ownerId": "ownerId",
"ownerType": "project",
"updatedAt": "updatedAt",
"url": "url",
"description": "description"
}
}Returns Examples
{
"webhookEndpoint": {
"id": "id",
"createdAt": "createdAt",
"enabled": true,
"enabledEvents": [
"*"
],
"nbFailedCalls": 0,
"nbTotalCalls": 0,
"ownerId": "ownerId",
"ownerType": "project",
"updatedAt": "updatedAt",
"url": "url",
"description": "description"
}
}