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

# Create an opt-in repository gate definition

`POST /api/v1/cache/r/{repoId}/gates`

## Request

- Base URL: `https://entire.io` (the document declares no server; this is the origin it was published from)
- URL: `https://entire.io/api/v1/cache/r/{repoId}/gates`
- Auth: none declared

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

## Path parameters

- `repoId` 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' | 'plugin' | 'checks' | 'up_to_date' | 'base_checks' | 'eval', required
    - `plugin` object: A plugin gate's catalog name and logo. Absent when the catalog lookup finds nothing or fails; show gate_key then.
      - `name` string, required
      - `logo_url` string, nullable, 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-10-23** `6447945bfd4f`: 1 warning, 1 info
  - added the new `plugin` enum value to the `gate/gate_type` response property for the response status `201`
  - added the optional property `gate/plugin` to the response with the `201` status
- **2026-10-20** `aeb83a0fe3e5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/entire/apis/entire-api/changes/api/v1/cache/r/:repoId/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/a24dfcc828d7?raw)
