---
title: "Delete a source"
method: DELETE
path: "/gitops/sources/{id}"
tags: ["gitops"]
---

# Delete a source

`DELETE /gitops/sources/{id}`

Deletes an existing GitOps source. Returns 409 if the source is referenced by any workflow or custom template.
**Access policy**: authenticated

## Path parameters

- `id` integer, required

## Response `204`

Source deleted

## Other responses

- `400` — Invalid request
- `403` — Access denied
- `404` — Source not found
- `409` — Source is in use by one or more workflows or custom templates
- `500` — Server error

---

[API](https://skmtc.net/portainer/apis/portainerce-api.md) · [All operations](https://skmtc.net/portainer/apis/portainerce-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portainer/portainerce-api/versions/c0b0975cd11b/schema)
