v54

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-06178189573.7 KB
Functions

Link a GitHub repository

Bind a repository to this function so every push to branch deploys it. A function holds at most one link; linking again returns 400.

The server decides how the link authenticates. If the project has the Zavu GitHub App installed, the link uses that installation: private repositories work and there is nothing to configure in the repository. Otherwise it falls back to a manual link and the response carries a webhookSecret you add to the repository yourself. connection says which one you got.

The repository is not checked against GitHub here, because it cannot be: an owner/repo that does not exist, or that the installation cannot see, is accepted and fails on the first deploy with a fetch error.

post/v1/functions/{functionId}/git-link

Path parameters

functionIdstring required

Zavu Function ID.

Request body

ownerstring required
repostring required
branchstring
rootDirstring

Subdirectory holding the project, for monorepos.

autoDeployboolean

Example request

{
  "owner": "acme",
  "repo": "order-bot",
  "rootDir": "apps/bot"
}

Response

Link created. The only response that ever carries webhookSecret.

webhookUrlstring uri required

Endpoint that receives GitHub's push deliveries. Only needed on a manual link, where you add it to the repository yourself.

webhookSecretstring

Shared secret for the repository's webhook. Returned only when creating a manual link, and only there — every later read strips it, and re-linking mints a new one. Absent entirely on an app link, which needs no secret of its own.

Example response

{
  "link": {
    "owner": "acme",
    "repo": "order-bot",
    "branch": "main"
  },
  "webhookSecret": "ghs_a1b2c3..."
}