Create
teams.webhook_endpoints.create(strteam_id, WebhookEndpointCreateParams**kwargs) -> WebhookEndpointCreateResponse
POST/teams/{teamId}/webhook-endpoints
Register a new webhook endpoint for the team, at most 10 of them. The response carries the secret, which is never returned again
Create
import os
from scenario_sdk import Scenario
client = Scenario(
api_key=os.environ.get("SCENARIO_SDK_API_KEY"), # This is the default and can be omitted
api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"), # This is the default and can be omitted
)
webhook_endpoint = client.teams.webhook_endpoints.create(
team_id="teamId",
enabled_events=["*"],
url="url",
)
print(webhook_endpoint.webhook_endpoint){
"webhookEndpoint": {
"id": "id",
"createdAt": "createdAt",
"enabled": true,
"enabledEvents": [
"*"
],
"nbFailedCalls": 0,
"nbTotalCalls": 0,
"ownerId": "ownerId",
"ownerType": "project",
"secret": "secret",
"updatedAt": "updatedAt",
"url": "url",
"description": "description"
}
}Returns Examples
{
"webhookEndpoint": {
"id": "id",
"createdAt": "createdAt",
"enabled": true,
"enabledEvents": [
"*"
],
"nbFailedCalls": 0,
"nbTotalCalls": 0,
"ownerId": "ownerId",
"ownerType": "project",
"secret": "secret",
"updatedAt": "updatedAt",
"url": "url",
"description": "description"
}
}