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

# Set auto-renew

> Enable or disable automatic renewal for a proxy.

Toggles automatic renewal on the provider side. When enabled, the proxy subscription renews automatically at expiry.

## Path parameters

<ParamField path="order_id" type="string" required>
  UUID of the order.
</ParamField>

## Request body

<ParamField body="enabled" type="boolean" required>
  `true` to enable auto-renew, `false` to disable it.
</ParamField>

## Response

Updated proxy object. Residential orders return the standard `managed_proxy` shape (see [Get order](/api/orders/get-order#response)).

<Note>
  **Mobile rotating orders** return a live snapshot instead — shape with
  `"type": "mobile"` and mobile-specific fields (`signature`, `tags`,
  `current_ip`). The Python SDK dispatches automatically: `proxyjam.orders.set_auto_renew()`
  returns either a `Proxy` or a `MobileProxy` based on the response shape.
</Note>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.proxyjam.com/public/v1/orders/997b4450-e7ae-4ad9-8a25-996e582049c9/auto-renew" \
    -H "X-API-Key: pj_AbCdEf..." \
    -H "Content-Type: application/json" \
    -d '{"enabled": false}'
  ```

  ```python Python theme={null}
  from proxyjam import ProxyJamClient, MobileProxy

  with ProxyJamClient(api_key="pj_live_...") as proxyjam:
      result = proxyjam.orders.set_auto_renew(
          "997b4450-e7ae-4ad9-8a25-996e582049c9",
          False,
      )
      print(result.auto_renew, result.expires_at)
      if isinstance(result, MobileProxy):
          print("mobile signature:", result.signature)
  ```

  ```json Residential Response theme={null}
  {
    "order_id": "997b4450-e7ae-4ad9-8a25-996e582049c9",
    "provider_proxy_id": "1836367",
    "auto_renew": false,
    "status": "active",
    "expires_at": "2026-03-21T14:22:39Z"
  }
  ```

  ```json Mobile Response theme={null}
  {
    "type": "mobile",
    "id": "997b4450-e7ae-4ad9-8a25-996e582049c9",
    "status": "active",
    "auto_renew": false,
    "expires_at": "2026-03-21T14:22:39Z",
    "host": "gw.proxyjam.com",
    "port": 24534,
    "username": "pj_abc",
    "password": "<proxy-password>",
    "current_ip": "203.0.113.10",
    "signature": "android",
    "tags": ["scrape"],
    "whitelisted_ips": [],
    "order_status": "provisioned",
    "proxy_type": "mobile",
    "ip_version": "IPv4",
    "protocol": "HTTP",
    "country": "US",
    "city": null,
    "isp": "T-Mobile",
    "period_days": 1,
    "bandwidth_gb": null,
    "quantity": 1,
    "total_usd": 1.5,
    "total_amount": "1.50",
    "currency": "USD",
    "promo_code_id": null,
    "discount_usd": null,
    "created_at": "2026-03-20T14:22:39Z",
    "updated_at": "2026-03-21T00:01:11Z",
    "payment_intent_id": null,
    "previous_expires_at": null
  }
  ```
</CodeGroup>
