{"meta":{"title":"Конечные точки REST API для GitHub App вебхуков","intro":"Используйте API REST для взаимодействия с вебхуками OAuth apps","product":"REST API","breadcrumbs":[{"href":"/ru/rest","title":"REST API"},{"href":"/ru/rest/apps","title":"Приложения"},{"href":"/ru/rest/apps/webhooks","title":"Веб-перехватчики"}],"documentType":"article"},"body":"# Конечные точки REST API для {% data variables.product.prodname\\_github\\_app %} вебхуков\n\nИспользуйте API REST для взаимодействия с вебхуками OAuth apps\n\n## О вебхуках для GitHub Apps\n\nВебхук A GitHub Appпозволяет вашему серверу получать HTTP-полезные `POST` нагрузки всякий раз, когда определённые события происходят для .GitHub App Дополнительные сведения см. в разделе \\[AUTOTITLE и [Документация по веб-перехватчикам](/ru/webhooks)]\\(/apps/creating-github-apps/registering-a-github-app/using-webhooks-with-github-apps).\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## Get a webhook configuration for an app\n\n```\nGET /app/hook/config\n```\n\nReturns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see \"Creating a GitHub App.\"\nYou must use a JWT to access this endpoint.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/app/hook/config\n```\n\n**Response schema (Status: 200):**\n\n* `url`: string, format: uri\n* `content_type`: string\n* `secret`: string\n* `insecure_ssl`: one of:\n  * **string**\n  * **number**\n\n## Update a webhook configuration for an app\n\n```\nPATCH /app/hook/config\n```\n\nUpdates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see \"Creating a GitHub App.\"\nYou must use a JWT to access this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Body parameters\n\n* **`url`** (string)\n  The URL to which the payloads will be delivered.\n\n* **`content_type`** (string)\n  The media type used to serialize the payloads. Supported values include json and form. The default is form.\n\n* **`secret`** (string)\n  If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.\n\n* **`insecure_ssl`** (string or number)\n  Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include 0 (verification is performed) and 1 (verification is not performed). The default is 0. We strongly recommend not setting this to 1 as you are subject to man-in-the-middle and other attacks.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PATCH \\\n  https://api.github.com/app/hook/config \\\n  -d '{\n  \"content_type\": \"json\",\n  \"insecure_ssl\": \"0\",\n  \"secret\": \"********\",\n  \"url\": \"https://example.com/webhook\"\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Get a webhook configuration for an app](#get-a-webhook-configuration-for-an-app).\n\n## List deliveries for an app webhook\n\n```\nGET /app/hook/deliveries\n```\n\nReturns a list of webhook deliveries for the webhook configured for a GitHub App.\nYou must use a JWT to access this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`cursor`** (string)\n  Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the link header for the next and previous page cursors.\n\n* **`status`** (string)\n  Returns webhook deliveries filtered by delivery outcome classification based on status\\_code range. A status of success returns deliveries with a status\\_code in the 200-399 range (inclusive). A status of failure returns deliveries with a status\\_code in the 400-599 range (inclusive).\n  Can be one of: `success`, `failure`\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad Request\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/app/hook/deliveries\n```\n\n**Response schema (Status: 200):**\n\nArray of `Simple webhook delivery`:\n\n* `id`: required, integer, format: int64\n* `guid`: required, string\n* `delivered_at`: required, string, format: date-time\n* `redelivery`: required, boolean\n* `duration`: required, number\n* `status`: required, string\n* `status_code`: required, integer\n* `event`: required, string\n* `action`: required, string or null\n* `installation_id`: required, integer or null, format: int64\n* `repository_id`: required, integer or null, format: int64\n* `throttled_at`: string or null, format: date-time\n\n## Get a delivery for an app webhook\n\n```\nGET /app/hook/deliveries/{delivery_id}\n```\n\nReturns a delivery for the webhook configured for a GitHub App.\nYou must use a JWT to access this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`delivery_id`** (integer) (required)\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **400** - Bad Request\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/app/hook/deliveries/DELIVERY_ID\n```\n\n**Response schema (Status: 200):**\n\n* `id`: required, integer\n* `guid`: required, string\n* `delivered_at`: required, string, format: date-time\n* `redelivery`: required, boolean\n* `duration`: required, number\n* `status`: required, string\n* `status_code`: required, integer\n* `event`: required, string\n* `action`: required, string or null\n* `installation_id`: required, integer or null\n* `repository_id`: required, integer or null\n* `throttled_at`: string or null, format: date-time\n* `url`: string\n* `request`: required, object:\n  * `headers`: required, object or null, additional properties allowed\n  * `payload`: required, object or null, additional properties allowed\n* `response`: required, object:\n  * `headers`: required, object or null, additional properties allowed\n  * `payload`: required, string or null, additional properties allowed\n\n## Redeliver a delivery for an app webhook\n\n```\nPOST /app/hook/deliveries/{delivery_id}/attempts\n```\n\nRedeliver a delivery for the webhook configured for a GitHub App.\nYou must use a JWT to access this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`delivery_id`** (integer) (required)\n\n### HTTP response status codes\n\n* **202** - Accepted\n\n* **400** - Bad Request\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/app/hook/deliveries/DELIVERY_ID/attempts\n```\n\n**Response schema (Status: 202):**\n\nobject"}