---
title: "Purge Goal"
method: POST
path: "/api/metrics/goals/{goal_id}/purge"
tags: ["metrics"]
---

# Purge Goal

`POST /api/metrics/goals/{goal_id}/purge`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/metrics/goals/{goal_id}/purge`
- Auth: none declared

Hard delete. Refuses by name (`goals.GoalConstraintViolated`) for
anything but an unagreed, childless, unreferenced test goal -- see
`goals.purge_check` for the exact rule. A receipt (`goal_purges`) is
written before the row goes, because after this call there is nothing
left to read back.

## Path parameters

- `goal_id` string, uuid, required

## Request body

- GoalPurge
  - `note` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
