---
title: "Delete a source connection"
method: DELETE
path: "/v1/spaces/{spaceId}/source/connection"
tags: ["Git"]
---

# Delete a source connection

`DELETE /v1/spaces/{spaceId}/source/connection`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/spaces/{spaceId}/source/connection`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.spacefast.com/v1/auth/oauth2/authorize`, token URL `https://api.spacefast.com/v1/auth/oauth2/token`; client credentials, token URL `https://api.spacefast.com/v1/auth/oauth2/token`, scopes: `spaces:write`)

Deletes one source connection and stops future repository builds. Close its source workspaces before deletion.

## Path parameters

- `spaceId` string, required

## Query parameters

- `connectionType` 'connected' | 'hosted': Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.

## Response `204`

The source connection was deleted.

---

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