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

# Delete Offer

> Archive an offer (soft delete). The offer is not permanently removed.

Soft-deletes an offer by setting its status to `archived`. The offer is not permanently removed from the system and can be restored by updating its status back to `active` or `paused` via the [Update Offer](/api-reference/v2/offers/update-offer) endpoint.

Archived offers are excluded from the default [List Offers](/api-reference/v2/offers/list-offers) response unless you explicitly filter by `status=archived`.

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the offer to archive.
</ParamField>

## Response Fields

<ResponseField name="success" type="boolean">
  Indicates whether the offer was archived successfully.
</ResponseField>

<ResponseField name="archived" type="boolean">
  Confirms the offer has been set to archived status.
</ResponseField>

## Examples

<RequestExample>
  <CodeGroup>
    ```bash cURL theme={null}
    curl -X DELETE "https://api.tracklysms.com/api/v2/offers/664f1a2b3c4d5e6f7a8b9c0d" \
      -H "X-Api-Key: trk_your_api_key_here"
    ```

    ```python Python theme={null}
    import requests

    offer_id = "664f1a2b3c4d5e6f7a8b9c0d"

    response = requests.delete(
        f"https://api.tracklysms.com/api/v2/offers/{offer_id}",
        headers={"X-Api-Key": "trk_your_api_key_here"}
    )

    data = response.json()
    print(data)  # {"success": True, "archived": True}
    ```

    ```javascript Node.js theme={null}
    const offerId = "664f1a2b3c4d5e6f7a8b9c0d";

    const response = await fetch(
      `https://api.tracklysms.com/api/v2/offers/${offerId}`,
      {
        method: "DELETE",
        headers: {
          "X-Api-Key": "trk_your_api_key_here"
        }
      }
    );

    const data = await response.json();
    console.log(data);  // { success: true, archived: true }
    ```
  </CodeGroup>
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "success": true,
    "archived": true
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "error": "Offer not found",
    "code": "not_found"
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "error": "Invalid credentials",
    "code": "invalid_credentials"
  }
  ```
</ResponseExample>

## Error Codes

| HTTP Status | Error Code            | Description                                                                |
| ----------- | --------------------- | -------------------------------------------------------------------------- |
| 401         | `invalid_credentials` | API key is missing or invalid.                                             |
| 403         | `account_suspended`   | Your account is suspended. Resolve outstanding billing or contact support. |
| 429         | `rate_limited`        | Request throttled; retry with exponential backoff after the window resets. |
| 404         | `not_found`           | No offer exists with the specified ID.                                     |
| 500         | `server_error`        | An unexpected error occurred on the server.                                |

## Next Steps

<CardGroup cols={2}>
  <Card title="Offers Overview" icon="tag" href="/guides/offers/overview">
    Manage offers and payouts
  </Card>

  <Card title="Record Revenue" icon="dollar-sign" href="/api-reference/v2/revenue/record-revenue">
    Track offer revenue
  </Card>
</CardGroup>
