---
title: "Creates or updates a GitHub MCP integration token"
method: PUT
path: "/v1/integrations/github-mcp/{id}/api-key"
tags: ["GitHub MCP Integration"]
---

# Creates or updates a GitHub MCP integration token

`PUT /v1/integrations/github-mcp/{id}/api-key`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/integrations/github-mcp/{id}/api-key`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Creates a token for a GitHub MCP integration if it doesn't exist and updates it otherwise. If the token is updated while the integration is being used by a pipeline, the new token will be picked at pipeline restart, rescaling or an update.

## Path parameters

- `id` string, required

## Request body

- SecretApi: Secret wrapper for API responses
  - `secret` string, required: The secret value

## Response `204`

Token upserted successfully.

## Other responses

- `401`: Unauthorized
- `404`: Integration not found.

---

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