# Balance renewal settings and eligible periods of selected proxies

`GET /account/api/v1/auto-renewal/options`

## Authorization

`Authorization: Bearer YOUR_ARNPROXY_API_KEY`

`Accept: application/json`

Required permission: `read`

## Parameters

| Name | Type | Required / Conditional | Default | Description |
|---|---|---|---|---|
| `proxy_ids` (query) | string | Required | — | 1–1000 unique comma-separated proxy IDs without spaces: 12345,12346. |

## Request example

### curl

```curl
printf 'Authorization: Bearer %s\n' "$ARNPROXY_API_KEY" |
  curl --silent --show-error --header @- \
    --header 'Accept: application/json' \
    --connect-timeout 10 --max-time 30 \
    'https://www.arnproxy.com/account/api/v1/auto-renewal/options?proxy_ids=YOUR_PROXY_ID'
```

### python

```python
import os, requests

headers = {"Authorization": "Bearer " + os.environ["ARNPROXY_API_KEY"]}
response = requests.get(
    "https://www.arnproxy.com/account/api/v1/auto-renewal/options?proxy_ids=YOUR_PROXY_ID",
    headers=headers,
    timeout=(10, 30), allow_redirects=False
)
print(response.status_code, response.text)
# No automatic write retry.
```

### javascript

```javascript
const headers = { Authorization: `Bearer ${process.env.ARNPROXY_API_KEY}` };
const response = await fetch("https://www.arnproxy.com/account/api/v1/auto-renewal/options?proxy_ids=YOUR_PROXY_ID", {
  method: 'GET', headers, redirect: 'error',
  signal: AbortSignal.timeout(30000)
});
console.log(response.status, await response.text());
// A write timeout is ambiguous; query its saved operation.
```

### php

```php
<?php
$headers = ['Accept: application/json',
    'Authorization: Bearer '.getenv('ARNPROXY_API_KEY')];
$ch = curl_init('https://www.arnproxy.com/account/api/v1/auto-renewal/options?proxy_ids=YOUR_PROXY_ID');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_SSL_VERIFYPEER => true, CURLOPT_SSL_VERIFYHOST => 2,
    CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_TIMEOUT => 30,
]);
$result = curl_exec($ch);
if ($result === false) {
    // Do not repeat a write; use the original operation key.
    throw new RuntimeException('Transport result unknown');
}
echo curl_getinfo($ch, CURLINFO_HTTP_CODE).PHP_EOL.$result;
curl_close($ch);
```

### go

```go
package main

import (
  "fmt"
  "io"
  "net/http"
  "os"
  "time"
)

func main() {
  client := &http.Client{Timeout: 30*time.Second,
    CheckRedirect: func(req *http.Request, via []*http.Request) error {
      return http.ErrUseLastResponse
    }}
  var body io.Reader
  req, err := http.NewRequest("GET", "https://www.arnproxy.com/account/api/v1/auto-renewal/options?proxy_ids=YOUR_PROXY_ID", body)
  if err != nil { panic(err) }
  req.Header.Set("Authorization", "Bearer "+os.Getenv("ARNPROXY_API_KEY"))
  res, err := client.Do(req); if err != nil { panic(err) }
  defer res.Body.Close()
  data, err := io.ReadAll(res.Body); if err != nil { panic(err) }
  fmt.Println(res.StatusCode, string(data))
}
```

### csharp

```csharp
using System;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;

using var handler = new HttpClientHandler { AllowAutoRedirect = false };
using var client = new HttpClient(handler) { Timeout = TimeSpan.FromSeconds(30) };
using var request = new HttpRequestMessage(HttpMethod.Get,
    "https://www.arnproxy.com/account/api/v1/auto-renewal/options?proxy_ids=YOUR_PROXY_ID");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Bearer", Environment.GetEnvironmentVariable("ARNPROXY_API_KEY"));
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
// Never automatically retry an ambiguous write.
```

### java

```java
import java.net.URI;
import java.net.http.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.*;

// Inside your application method:
var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder(URI.create("https://www.arnproxy.com/account/api/v1/auto-renewal/options?proxy_ids=YOUR_PROXY_ID"))
    .header("Authorization", "Bearer " + System.getenv("ARNPROXY_API_KEY"))
    .header("Accept", "application/json")
    .GET()
    .build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
```

## Responses · HTTP 200

```json
{
  "ok": true,
  "data": {
    "proxy_ids": [
      12345
    ],
    "revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "settings": [
      {
        "id": 20,
        "proxy_id": 12345,
        "order_number": null,
        "active": true,
        "payment_method": "balance",
        "time_id": 101,
        "currency": "TRY",
        "next_renewal_date": "2030-02-01",
        "next_attempt_at": null,
        "last_status": "waiting",
        "revision": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "managed_via_website": false,
        "timezone": "Europe/Istanbul"
      }
    ],
    "periods": [
      {
        "id": 101,
        "days": 7,
        "name": "7 days"
      }
    ],
    "configuration_available": true,
    "payment_method": "balance",
    "price_policy": "current_price_at_each_renewal",
    "api_key_revocation_stops_existing_renewals": false,
    "source": "existing_website_auto_renewal"
  },
  "meta": {
    "request_id": "000000000000000000000001",
    "phase": "public_v1",
    "source": "arnproxy_records"
  }
}
```

| Name | Type | Conditional | Description |
|---|---|---|---|
| `ok` | boolean | — | Success envelope flag; on false inspect error.code. |
| `data` | object | — | Operation-specific result; examples are illustrative and synthetic. |
| `data.proxy_ids` | array | — | Proxy IDs in the scope visible to this account. |
| `data.proxy_ids[]` | integer | — | Proxy IDs in the scope visible to this account. |
| `data.revision` | string | — | Freshness fingerprint to copy unchanged to the corresponding write/price confirmation. |
| `data.settings` | array | — | Operation-specific settings value; preserve its demonstrated type and consult the behavior notes. |
| `data.settings[]` | object | — | Operation-specific settings value; preserve its demonstrated type and consult the behavior notes. |
| `data.settings[].id` | integer | — | Relevant ARNPROXY record ID; use it instead of the upstream internal ID. |
| `data.settings[].proxy_id` | integer | — | Relevant ARNPROXY record ID; use it instead of the upstream internal ID. |
| `data.settings[].order_number` | string|null | — | Display order number; not interchangeable with fields requesting an id. |
| `data.settings[].active` | boolean | — | Whether the record is active; inactive historical settings may remain stored. |
| `data.settings[].payment_method` | string | — | Balance/card/PayPal method; API configuration management supports balance only. |
| `data.settings[].time_id` | integer | — | Local period/GB-plan record ID, not a day or GB count. |
| `data.settings[].currency` | string | — | Account transaction currency: TRY or USD. |
| `data.settings[].next_renewal_date` | string | — | Saved renewal day or retry timestamp, not evidence that a debit has occurred. |
| `data.settings[].next_attempt_at` | string|null | — | Saved renewal day or retry timestamp, not evidence that a debit has occurred. |
| `data.settings[].last_status` | string | — | Operation-specific last status value; preserve its demonstrated type and consult the behavior notes. |
| `data.settings[].revision` | string | — | Freshness fingerprint to copy unchanged to the corresponding write/price confirmation. |
| `data.settings[].managed_via_website` | boolean | — | Operation-specific managed via website value; preserve its demonstrated type and consult the behavior notes. |
| `data.settings[].timezone` | string | — | Timezone for related date fields; null means no verified timezone. |
| `data.periods` | array | — | Operation-specific periods value; preserve its demonstrated type and consult the behavior notes. |
| `data.periods[]` | object | — | Operation-specific periods value; preserve its demonstrated type and consult the behavior notes. |
| `data.periods[].id` | integer | — | Relevant ARNPROXY record ID; use it instead of the upstream internal ID. |
| `data.periods[].days` | integer | — | Plan duration in days, separate from a GB plan’s traffic amount. |
| `data.periods[].name` | string | — | Operation-specific name value; preserve its demonstrated type and consult the behavior notes. |
| `data.configuration_available` | boolean | — | Availability under the result’s conditions/permissions, not a stock or provider guarantee. |
| `data.payment_method` | string | — | Balance/card/PayPal method; API configuration management supports balance only. |
| `data.price_policy` | string | — | Operation-specific price policy value; preserve its demonstrated type and consult the behavior notes. |
| `data.api_key_revocation_stops_existing_renewals` | boolean | — | false: revoking a key does not disable existing automatic renewal; disable the setting separately. |
| `data.source` | string | — | Data source; local records and a live provider lookup are different evidence. |
| `meta` | object | — | Request correlation and data-source metadata. |
| `meta.request_id` | string | — | This HTTP request’s correlation ID, not an operation key or order ID. |
| `meta.phase` | string | — | Operation-specific phase value; preserve its demonstrated type and consult the behavior notes. |
| `meta.source` | string | — | Data source; local records and a live provider lookup are different evidence. |

## Behavior & important notes

- These resources only configure existing balance renewal; they do not charge or extend now. The existing cron later renews from balance at the then-current price. Revoking an API key does not disable saved renewal settings; disable them separately. Card/PayPal settings remain website-managed. No promo applies; country-based quantity discounts and full IPv6-order selection remain. Disabling cannot undo started/completed renewals.

Authentication and validation may reject a request before execution. Consult the error reference and retain request_id when contacting support. Never send keys or passwords.

[Errors & limits](https://docs.arnproxy.com/api-v1/errors)
