跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support
This is the documentation of 21.11.0, which is no longer the latest release. See the latest release.

Update a hook

PATCH
/orgs/{org}/hooks/{id}
curl --request PATCH \
--url https://gitea.example.com/api/v1/orgs/example/hooks/1 \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "active": true, "authorization_header": "example", "branch_filter": "example", "config": { "additionalProperty": "example" }, "events": [ "example" ] }'
org
required
string

Name of the organization

id
required
integer format: int64

Id of the hook to update

Media typeapplication/json

EditHookOption options when modify one hook

object
active
boolean
authorization_header
string
branch_filter
string
config
object
key
additional properties
string
events
Array<string>
Examplegenerated
{
"active": true,
"authorization_header": "example",
"branch_filter": "example",
"config": {
"additionalProperty": "example"
},
"events": [
"example"
]
}

Hook

Media typeapplication/json

Hook a hook is a web hook when one repository changed

object
active
boolean
authorization_header
string
branch_filter
string
config
object
key
additional properties
string
created_at
string format: date-time
events
Array<string>
id
integer format: int64
type
string
updated_at
string format: date-time
Examplegenerated
{
"active": true,
"authorization_header": "example",
"branch_filter": "example",
"config": {
"additionalProperty": "example"
},
"created_at": "2026-04-15T12:00:00Z",
"events": [
"example"
],
"id": 1,
"type": "example",
"updated_at": "2026-04-15T12:00:00Z"
}

APINotFound is a not found empty response

Media typeapplication/json