> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partnero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete program

> Delete a program and all associated data via API. Requires two-step confirmation.

## Endpoint

```
DELETE https://api.partnero.com/v1/program
```

Permanently deletes the program associated with the API key. This is a two-step process that requires confirmation to prevent accidental deletion.

<Warning>
  Deleting a program removes all associated partners, customers, transactions, rewards, and settings. This action cannot be undone.
</Warning>

## How it works

1. **Request a confirmation code** — call the endpoint without a `confirmation_code`. The API returns a unique 8-character code
2. **Confirm deletion** — call the endpoint again with the `confirmation_code` within 20 seconds

If the code expires or doesn't match, the deletion is rejected.

## Request body

| Parameter           | Type   | Required | Description                                                            |
| ------------------- | ------ | -------- | ---------------------------------------------------------------------- |
| `confirmation_code` | string | No       | The confirmation code received from step 1. Omit to request a new code |

## Step 1: Request confirmation code

```bash cURL theme={null}
curl --location --request DELETE 'https://api.partnero.com/v1/program' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

### Response

```json 200 OK theme={null}
{
  "data": {
    "confirmation_code": "aB3xK9mQ"
  }
}
```

## Step 2: Confirm deletion

Send the confirmation code back within 20 seconds to complete the deletion.

```bash cURL theme={null}
curl --location --request DELETE 'https://api.partnero.com/v1/program' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "confirmation_code": "aB3xK9mQ"
  }'
```

### Response

<ResponseExample>
  ```json 200 OK (deleted) theme={null}
  {
    "status": 1,
    "message": "Program deleted successfully"
  }
  ```

  ```json 400 Bad Request (invalid or expired code) theme={null}
  {
    "message": "Invalid confirmation code"
  }
  ```
</ResponseExample>
