---
title: "CreateRunnerPolicy"
method: POST
path: "/gitpod.v1.RunnerService/CreateRunnerPolicy"
tags: ["gitpod.v1.RunnerService"]
---

# CreateRunnerPolicy

`POST /gitpod.v1.RunnerService/CreateRunnerPolicy`

Creates a new policy for a runner.

 Use this method to:
 - Set up access controls
 - Define group permissions
 - Configure role-based access

 ### Examples

 - Create admin policy:

   Grants admin access to a group.

   ```yaml
   runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
   role: RUNNER_ROLE_ADMIN
   ```

## Request body

- GitpodV1CreateRunnerPolicyRequest — CreateRunnerPolicyRequest creates a Runner Policy.
  - `groupId` string, uuid — group_id specifies the group_id identifier
  - `role` 'RUNNER_ROLE_UNSPECIFIED' | 'RUNNER_ROLE_ADMIN' | 'RUNNER_ROLE_USER'
  - `runnerId` string, uuid — runner_id specifies the project identifier

## Response `200`

Success

- GitpodV1CreateRunnerPolicyResponse
  - `policy` GitpodV1RunnerPolicy, required
    - `groupId` string, uuid
    - `role` 'RUNNER_ROLE_UNSPECIFIED' | 'RUNNER_ROLE_ADMIN' | 'RUNNER_ROLE_USER'

## Other responses

- `default` — Error

## Changes

- **2025-02-21** `3655d5ad0ac3` — 3 breaking, 1 warning, 6 info
  - request property `role` was restricted to a list of enum values
  - the `role` request property type/format changed from ``/`` to `string`/``
  - the `policy` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - removed `#/components/schemas/gitpod.v1.RunnerRole` from the `role` request property `allOf` list
  - …6 more
- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status
- **2025-02-18** `bef0e79f204c` — 1 info
  - the response property `policy` became required for the status `200`

[Change history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.RunnerService/CreateRunnerPolicy/post.md)

---

[API](https://skmtc.dev/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.dev/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/44d50c2ac284/schema)
