---
title: "CreateSCMIntegration"
method: POST
path: "/gitpod.v1.RunnerConfigurationService/CreateSCMIntegration"
tags: ["gitpod.v1.RunnerConfigurationService"]
---

# CreateSCMIntegration

`POST /gitpod.v1.RunnerConfigurationService/CreateSCMIntegration`

Creates a new SCM integration for a runner.

 Use this method to:
 - Configure source control access
 - Set up repository integrations
 - Enable code synchronization

 ### Examples

 - Create GitHub integration:

   Sets up GitHub SCM integration.

   ```yaml
   runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   scmId: "github"
   host: "github.com"
   oauthClientId: "client_id"
   oauthPlaintextClientSecret: "client_secret"
   ```

## Request body

- GitpodV1CreateSCMIntegrationRequest
  - `host` string
  - `oauthClientId` string, nullable — oauth_client_id is the OAuth app's client ID, if OAuth is configured. If configured, oauth_plaintext_client_secret must also be set.
  - `oauthPlaintextClientSecret` string, nullable — oauth_plaintext_client_secret is the OAuth app's client secret in clear text. This will first be encrypted with the runner's public key before being stored.
  - `pat` boolean
  - `runnerId` string, uuid
  - `scmId` string — scm_id references the scm_id in the runner's configuration schema that this integration is for

## Response `200`

Success

- GitpodV1CreateSCMIntegrationResponse
  - `id` string, uuid — id is a uniquely generated identifier for the SCM integration

## Other responses

- `default` — Error

## Changes

- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status

[Change history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.RunnerConfigurationService/CreateSCMIntegration/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/3655d5ad0ac3/schema)
