---
title: "Create an opt-in repository gate definition"
method: POST
path: "/api/v1/cache/{forge}/{org}/{repo}/gates"
tags: ["Repo Settings"]
---

# Create an opt-in repository gate definition

`POST /api/v1/cache/{forge}/{org}/{repo}/gates`

Creates an opt-in gate (today only `base_checks`). Builtin gates are seeded by entire-api and are toggled through PATCH instead.

## Path parameters

- `forge` string, required
- `org` string, required
- `repo` string, required

## Request body

- object
  - `gate_type` 'base_checks', required
  - `config` object, nullable

## Response `201`

Created gate

- object
  - `gate` object, required
    - `id` string, required
    - `repo_id` string, required
    - `scope_type` string, required
    - `scope_id` string, nullable, required
    - `gate_key` string, required
    - `gate_type` 'approvals' | 'findings' | 'checks' | 'up_to_date' | 'base_checks' | 'eval', required
    - `blocking` boolean, required
    - `enabled` boolean, required
    - `config` object, nullable, required
    - `created_by` string, nullable, required
    - `updated_by` string, nullable, required
    - `created_at` string, required
    - `updated_at` string, required

## Other responses

- `400` — Invalid body
- `404` — Repository not found
- `409` — The gate already exists

## Changes

- **2026-09-24** `ba1409f8f36b` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/entire/apis/entire-api/changes/api/v1/cache/:forge/:org/:repo/gates/post.md)

---

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