Skip to main content
POST
Set GitHub Webhook
string
required
The API key for your account. You can find this in your account settings.
This endpoint connects an application to a GitHub repository the classic way: generate a personal access token (ghp_* or the fine-grained github_pat_* format) and Square Cloud returns a unique webhook URL to register on that repository so pushes trigger a deploy. Sending access_token: "@" instead removes the existing webhook and access token from the application. Configuring or removing a webhook invalidates the cached response from Get Current Deployment. Calls are rate limited to 5 per 60 seconds per user, and on workspace-shared applications the caller needs the Administrator role or ownership. To review deploy attempts triggered by this webhook, use List Deployments.

Parameters

string
required
The ID of the application. You can find this in the URL of your application’s dashboard.
string
required
The access token for your GitHub repository. You can find this in your GitHub Tokens Classic

Response

string
Indicates whether the call was successful.. success if successful, error if not.
object
The contents of the response.

Common errors