CorefinityCorefinityDocs
Open the Control PanelControl Panel
Webhooks · 1 of 1

Receive a push from a git provider

You do not call this endpoint. When you add a repository to an environment that deploys automatically, the Control Panel installs a webhook at your git provider that points here, with a secret of its own, and a push to the branch the repository deploys starts a deployment. A delivery is verified by the provider's signature over the exact bytes of the body, never by a token. Every delivery to a repository that exists is answered 204 with no body, whether or not it started a deployment, so the answer does not say what was done with it: read the repository in the Control Panel to see whether your deliveries arrive. Limited to 120 a minute for one repository and to 600 a minute from one address.

POST/api/{provider}/webhooks/environments/{environment}/repositories/{repository}

Path parameters

providerstringRequired

The git provider that delivers the push.

githubgitlabbitbucket
environmentintegerRequired

The id of the CoreStack Enterprise environment the repository deploys to. At least 1.

repositoryintegerRequired

The id of the environment's repository, as the Control Panel lists it. At least 1.

Body

The body is application/json. The request example shows its shape.

Returns

204 Received. No body, whatever the Control Panel did with the delivery; a delivery that is sent twice is acted on once.

If it is refused

StatusReasonWhat to do
404noneCheck the id. You see only what your account can reach.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X POST https://manage.corefinity.com/api/github/webhooks/environments/1311/repositories/4471 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "after": "abc123def456789012345678901234567890abcd",
    "before": "9999999999999999999999999999999999999999",
    "head_commit": {
      "author": {
        "name": "Daniel Reyes"
      },
      "id": "abc123def456789012345678901234567890abcd",
      "message": "Add the autumn sale banner"
    },
    "pusher": {
      "name": "danielreyes"
    },
    "ref": "refs/heads/main",
    "repository": {
      "full_name": "northwind-digital/harbourandfinch"
    }
  }'
{
  "message": "Not found."
}
Try it

Try it is off for this endpointIt runs commands on a live site. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT