Platform

Rotate the git credential of a private-repo deployment

Replaces the credential this deployment uses to clone its private repo, without recreating the app — before this existed, a revoked token meant deleting the deployment and losing its domain, port and environment variables.

Which credential is rotated follows how the deployment was created:

  • deploy_key — send an empty body. A new keypair is generated and the new public key comes back; install it on the repo (GitHub → Deploy keys) and the next deploy uses it.
  • pat — send git_pat. It is verified against the repo before it is stored, so a typo fails here instead of at deploy time.

This is not the auto-deploy webhook secret. That is a separate credential with its own endpoints under /platform/deployments/custom/{id}/git-webhook/*; rotating one does not touch the other.

post/platform/deployments/custom/{id}/git-auth

Request

  • Base URL: https://api.imprezahost.com/v1
  • URL: https://api.imprezahost.com/v1/platform/deployments/custom/{id}/git-auth
  • Auth: API key in header X-API-Key and API key in header X-API-Secret

Path parameters

idstring required

Request body

git_patstring

New fine-grained personal access token, for a pat deployment. Verified against the repo before it is stored, then encrypted at rest. Omit for deploy_key.

Response

Credential rotated

successboolean

Example response

{
  "success": true,
  "meta": {
    "request_id": "req_a1b2c3d4e5f6g7h8",
    "timestamp": "2026-03-30T14:05:00Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.