---
title: "Edit a git token"
method: PUT
path: "/organization/{organizationId}/gitToken/{gitTokenId}"
tags: ["Organization Main Calls"]
---

# Edit a git token

`PUT /organization/{organizationId}/gitToken/{gitTokenId}`

## Request

- Base URL: `https://api.qovery.com`
- URL: `https://api.qovery.com/organization/{organizationId}/gitToken/{gitTokenId}`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/qovery/apis/qovery-api/docs/organization/:organizationId/gitToken/:gitTokenId/put.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `organizationId` string, uuid, required
- `gitTokenId` string, uuid, required

## Request body

- GitTokenRequest
  - `name` string, required
  - `description` string
  - `type` 'BITBUCKET' | 'GITHUB' | 'GITLAB', required
  - `token` string, required: The token from your git provider side
  - `workspace` string: Mandatory only for BITBUCKET git provider, to allow us to fetch repositories at creation/edition of a service
  - `git_api_url` string, uri: custom git api url for the given git provider/type. I.e: Self-hosted version of Gitlab

## Response `200`

Git token edited

- GitTokenResponse
  - `id` string, uuid, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time
  - `name` string, required
  - `description` string
  - `type` 'BITBUCKET' | 'GITHUB' | 'GITLAB', required
  - `expired_at` string, date
  - `workspace` string: Mandatory only for BITBUCKET git provider
  - `associated_services_count` number, required: The number of services using this git token
  - `git_api_url` string, uri, required

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: Access forbidden
- `404`: Resource not found

---

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