---
name: "gt-webhook-create"
section: "1"
platform: "linux"
package: "gitea-cli"
version: "1.0.0-1"
release: "Arch Linux 2026-11-07"
platforms: ["linux"]
url: "https://carta.tech/man/gt-webhook-create"
---

# gt-webhook-create(1)

Create a webhook

## NAME

gt-webhook-create - Create a webhook

## SYNOPSIS

**gt webhook create \[\<url\>\] \[flags\]**

## DESCRIPTION

Create a webhook that delivers events to a URL, by default as JSON for push events.

Events: create, delete, fork, push, issues, issues\_only, issue\_assign, issue\_label, issue\_milestone, issue\_comment, pull\_request, pull\_request\_only, pull\_request\_assign, pull\_request\_label, pull\_request\_milestone, pull\_request\_comment, pull\_request\_review, pull\_request\_sync, pull\_request\_review\_request, wiki, repository, release, package, status, workflow\_run, workflow\_job; issues and pull\_request include every issue or pull request event.

Types: gitea, gogs, slack, discord, dingtalk, telegram, msteams, feishu, matrix, wechatwork, packagist. Slack webhooks need --config channel=#name (username, icon\_url and color are optional). Gitea reads no other settings from --config, so set up discord, matrix and packagist webhooks in the web UI.

### JSON FIELDS

```
active, branch_filter, content_type, created_at, events, id, type, updated_at,
url
```

## OPTIONS

**--active**\[=true\]\
 	Deliver events (use --active=false to create the webhook paused)

**--authorization-header**=""\
 	Authorization value (prefer file input)

**--authorization-header-file**=""\
 	Read authorization value from file or -

**--branch-filter**=""\
 	Branch glob for push events

**--clear-authorization**\[=false\]\
 	Send no authorization header; on edit, this removes the stored one

**--config**=\[\]\
 	Adapter-specific configuration, for example channel=alerts

**--events**=\[push\]\
 	Events that trigger the webhook, comma-separated

**-h**, **--help**\[=false\]\
 	help for create

**--secret**=""\
 	Signing secret (prefer --secret-file)

**--secret-file**=""\
 	Read signing secret from file or -

**--type**="gitea"\
 	Webhook adapter type {gitea\|gogs\|slack\|discord\|dingtalk\|telegram\|msteams\|feishu\|matrix\|wechatwork\|packagist}

**--url**=""\
 	Delivery URL

## OPTIONS INHERITED FROM PARENT COMMANDS

**--account**\[=false\]\
 	Manage the webhooks of your account

**--csv**\[=""\]\
 	Output CSV with the specified comma-separated **fields**, or all fields

**--cwd**=""\
 	Working **directory** for repository discovery

**--debug**\[=false\]\
 	Log the method, URL, status, and duration of each HTTP request to stderr

**--global**\[=false\]\
 	Manage the system webhooks of the instance (administrators)

**--host**=""\
 	Gitea instance **URL**, including any base path

**--interactive**\[=false\]\
 	Allow prompts with machine output

**-q**, **--jq**=""\
 	Filter JSON output using a jq **expression**; implies --json

**--json**\[=""\]\
 	Output JSON with the specified comma-separated **fields**, or all fields

**--no-input**\[=false\]\
 	Disable prompts and implicit editor/browser interactions

**--org**=""\
 	Manage the webhooks of an organization

**--remote**=""\
 	Git **remote** used for repository discovery

**-R**, **--repo**=""\
 	Select a repository as **OWNER/REPO** or URL

**--sudo**=""\
 	Perform API requests as this **user** (requires an administrator account)

**--user**=""\
 	Account **name** on the selected instance

## EXAMPLE

```
$ gt webhook create https://ci.example.com/hooks/gitea --events push,pull_request
# sign deliveries with a secret read from a file
$ gt webhook create https://ci.example.com/hooks/gitea --secret-file secret.txt
# notify a Slack channel about releases of an organization's repositories
$ gt webhook create https://hooks.slack.com/services/T0/B0/X --org acme --type slack --config channel=#releases --events release
```

## SEE ALSO

**[gt-webhook(1)](/man/gt-webhook/1.md)**
