Interface CreateWebhookData

Request body for creating a repository webhook.

interface CreateWebhookData {
    active?: boolean;
    config: {
        content_type?: "json" | "form";
        insecure_ssl?: "0" | "1";
        secret?: string;
        url: string;
    };
    events?: string[];
}

Properties

active?: boolean

Whether the webhook is active. Defaults to true.

config: {
    content_type?: "json" | "form";
    insecure_ssl?: "0" | "1";
    secret?: string;
    url: string;
}

Webhook configuration (required)

Type declaration

  • Optionalcontent_type?: "json" | "form"

    Payload format: 'json' or 'form'. Defaults to 'form'.

  • Optionalinsecure_ssl?: "0" | "1"

    Whether to disable SSL verification. '0' = disabled. Defaults to '1' (enabled).

  • Optionalsecret?: string

    HMAC secret for signature verification

  • url: string

    Payload delivery URL (required)

events?: string[]

Events that trigger this webhook. Defaults to ['push'].