Create
Invokes the c1.api.webhooks.v1.WebhooksService.Create method.
Parameters
bodyDisplayNamefieldURLfieldDescriptionfieldWebhookNewParams
Returns
WebhookNewResponsestruct
The WebhooksServiceCreateResponse message.
Request example Go
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/-go"
"github.com/stainless-sdks/-go/option"
)
func main() {
client := conductoronesdk.NewClient(
option.WithAPIKey("My API Key"),
)
webhook, err := client.Webhooks.New(context.TODO(), conductoronesdk.WebhookNewParams{
DisplayName: "displayName",
URL: "url",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", webhook.Webhook)
}
200 Example
{
"webhook": {
"id": "id",
"description": "description",
"displayName": "displayName",
"url": "url"
}
}