---
title: "Switch auto-renew on or off"
method: PUT
path: "/v1/ports/{id}/auto-renew"
tags: ["ports"]
---

# Switch auto-renew on or off

`PUT /v1/ports/{id}/auto-renew`

## Request

- Base URL: `https://api.portproof.org`
- URL: `https://api.portproof.org/v1/ports/{id}/auto-renew`
- Auth: HTTP bearer

Off means the port ends at the end of its term. Requires an `Idempotency-Key` header (CONTRACT §1): the same key with the same body within 24 h replays the stored response; a different body returns 409 `idempotency_conflict`.

## Path parameters

- `id` string, required

## Request body

- object
  - `enabled` boolean, required

## Response `200`

Default Response

- object
  - `id` string, required
  - `org_id` string, required
  - `port_id` string, required
  - `sku` string, required
  - `term` 'monthly' | 'weekly' | 'daily', required
  - `price_cents` integer, required
  - `currency` 'EUR' | 'USD', required
  - `starts_at` string, date-time, required
  - `ends_at` string, date-time, required
  - `auto_renew` boolean, required
  - `state` 'active' | 'grace' | 'suspended' | 'ended', required
  - `provider_ref` string, nullable, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `404`: Default Response
- `409`: Default Response

---

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