---
title: "Delete a service account Git credential"
method: DELETE
path: "/api/v0/service-accounts/{serviceAccountId}/git-credentials/{integration}"
tags: ["Service Accounts"]
---

# Delete a service account Git credential

`DELETE /api/v0/service-accounts/{serviceAccountId}/git-credentials/{integration}`

## Request

- Base URL: `https://api.factory.ai`
- URL: `https://api.factory.ai/api/v0/service-accounts/{serviceAccountId}/git-credentials/{integration}`
- Auth: HTTP bearer

Deletes a service account's stored token for one Git provider. Idempotent, and allowed on any plan so a stored token can always be removed. Computers that already copied the token keep it until they are reprovisioned, so also revoke the token at the provider. Requires permission to change this service account. Service account credentials are rejected. Not available on self-hosted deployments.

## Path parameters

- `serviceAccountId` string, required
- `integration` string, required

## Headers

- `X-Factory-Org-Id` string

## Response `200`

Response for status 200

- DeleteServiceAccountGitCredential200ResponseBody
  - `integration` string, required: Git provider whose credential was removed.
  - `deleted` boolean, required: Always `true`.

## Other responses

- `400`: Response for status 400
- `401`: Response for status 401
- `402`: Response for status 402
- `403`: Response for status 403
- `404`: Response for status 404
- `451`: Response for status 451
- `500`: Response for status 500
- `503`: Response for status 503

## Changes

- **2026-11-18** `7767ce7900e0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/factory/apis/factory-public-api/changes/api/v0/service-accounts/:serviceAccountId/git-credentials/:integration/delete.md)

---

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