---
title: "Receive a Git provider push webhook"
method: POST
path: "/v2/git/webhook/{webhook}"
tags: ["Webhooks"]
---

# Receive a Git provider push webhook

`POST /v2/git/webhook/{webhook}`

Public endpoint that receives a `push` event from a Git provider (typically GitHub). The webhook token in the URL path (`:webhook`) authenticates the call; no Authorization header is sent.

Accepts `application/json` only. The optional `branch` query parameter filters which branch triggers a deploy — if present and `body.ref` does not match `refs/heads/<branch>`, the request is accepted with 202 but no deploy is queued. The optional `restart` query parameter (`?restart=false`) skips the post-deploy application restart.

Responses are `text/plain`. Rate limited to 1 push per 15 seconds per webhook token.

## Path parameters

- `webhook` string, required

## Query parameters

- `branch` string
- `restart` 'true' | 'false'

## Request body

- object
  - `repository` object, required
    - `clone_url` string, required
  - `ref` string, required — `refs/heads/<branch>` for push events.

## Response `200`

Webhook received and the deploy job was queued.

## Other responses

- `202` — Accepted but ignored because the pushed branch does not match the configured `branch`.
- `400` — Payload validation failed.
- `404` — Webhook ID is not associated with any application.
- `415` — Content-Type is not `application/json`.
- `429` — The endpoint enforces its own rate limit and the caller hit the cooldown.
- `500` — An unexpected error occurred while processing the request.

---

[API](https://skmtc.dev/squarecloud/apis/square-cloud-api.md) · [All operations](https://skmtc.dev/squarecloud/apis/square-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/squarecloud/square-cloud-api/revisions/54b7733a6b95/schema)
