---
title: "Configure automatic GitHub push deployment"
method: PUT
path: "/v1/projects/{project_id}/source/auto-deploy"
---

# Configure automatic GitHub push deployment

`PUT /v1/projects/{project_id}/source/auto-deploy`

## Request

- Base URL: `https://app.ohmyho.st`
- URL: `https://app.ohmyho.st/v1/projects/{project_id}/source/auto-deploy`
- Auth: HTTP bearer

Configures exactly one Git branch whose signed pushes deploy immutable commits to dev. Production remains an explicit promotion.

## Path parameters

- `project_id` string, required

## Headers

- `X-Request-Id` string
- `Idempotency-Key` string, required

## Request body

- ConfigureSourceAutoDeployRequest
  - `branch` string, required: Exact Git branch accepted by Git check-ref-format branch rules; control/space, dot-lock, reflog, range and metacharacter forms are rejected.
  - `enabled` boolean, required

## Response `200`

The current automatic deployment configuration.

- SourceAutoDeploy: Push-to-deploy configuration. Generation 0 with null branch, ref, grant_status and updated_at means auto-deploy was never configured for this project.
  - `branch` string, nullable, required
  - `ref` string, nullable, required
  - `environment` 'dev', required
  - `enabled` boolean, required
  - `generation` integer, required
  - `grant_status` 'active' | 'revoked' | 'null', nullable, required
  - `updated_at` string, date-time, nullable, required

## Other responses

- `400`: The request failed.
- `401`: The request failed.
- `403`: The request failed.
- `404`: The resource does not exist or is not visible to the authenticated principal.
- `429`: The request failed.
- `503`: The request failed.

---

[API](https://skmtc.dev/ohmyho/apis/ohmyho-st-api.md) · [All operations](https://skmtc.dev/ohmyho/apis/ohmyho-st-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ohmyho/apis/ohmyho-st-api/revisions/d069888c0017?raw)
