# Crea elenco

## **Punto finale:**

`POST https://proxy-seller.com/personal/api/v1/{YourApiKey}/resident/list/add`

### Parametri del percorso

| Nome | Valore | Descrizione |
| --- | --- | --- |
| Autorizzazione | `<Your_API_Key>` | La chiave API personale |

### **Corpo della richiesta**

| Nome | Tipo | Descrizione |
| --- | --- | --- |
| titolo | Stringa | Nome dell'elenco che si sta creando |
| whitelist | Stringa | IP per l'autorizzazione. Lasciare vuoto se si desidera autorizzare con le credenziali di accesso |
|  |  |  |
| geo | **oggetto** | Aggiungere dati GEO all'elenco (paese, regione, città, ISP) |
| paese | Stringa | Paese selezionato dal database GEO**(Il caso è importante)** |
| regione | Stringa | Regione selezionata dal database GEO**(Il caso è importante)** |
| città | Stringa | Città selezionata dal database GEO**(Il caso è importante)** |
| isp | Stringa | ISP selezionati dalla banca dati GEO**(Il caso è importante)** |
|  |  |  |
| **esportazione** | **oggetto** | Qui si specifica il numero di IP dell'elenco e il tipo di esportazione (numeri di porta e formato del file). |
| porti | Numero | Numero di IP (massimo 1000) |
| extra | Stringa | Tipo di esportazione |
|  |  |  |
| rotazione | Numero | "rotazione: '-1' per nessuna rotazione (Sticky), '0' per la rotazione per richiesta, da '1' a '3600' per la rotazione temporale in secondi |

### **Esempio**

```
https://proxy-seller.com/personal/api/v1/fj4948ffhg58gh843gh/resident/list/add
```

### **Risposta**

**200: OK Risposta di successo**

```json
{
  "status": "success",
  "data": {
    "id": 561,
    "title": "US Washington Garfield FIRST-STEP",
    "login": "3c8aa1d4",
    "password": "AZT62Dx3",
    "whitelist": "127.0.0.1,192.168.0.1",
    "rotation": "-1 = sticky, 0 = rotation per request, 1..3600 time in seconds",
    "geo": {
      "country": "US",
      "region": "Washington",
      "city": "Garfield",
      "isp": "FIRST-STEP"
    },
    "export": {
      "ports": 10000,
      "ext": "txt"
    }
  },
  "errors": []
}
```

**200: OK Risposta all'errore Chiave API errata**

```json
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Error api key",
            "code": 503,
            "customData": null
        },
        {
            "message": "IP not allowed",
            "code": 503,
            "customData": null
        },
        {
            "message": "Request limit reached",
            "code": 503,
            "customData": null
        }
    ]
}
```

**200: OK Risposta di errore IP di autorizzazione errato**

```json
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "IP not allowed",
            "code": 503,
            "customData": null
        }
    ]
}
```

**200: OK Risposta all'errore Tarif non trovata**

```json
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Tarif not found",
            "code": 0,
            "customData": null
        }
    ]
}
```

### **Risposte con errore nel corpo della richiesta**

**200: OK Risposta all'errore IP whitelist errato**

```json
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Incorrect IP address 0.0.0.0 entered",
            "code": 409,
            "customData": null
        }
    ]
}
```

**200: OK Risposta di errore IP già collegato**

```json
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "IP 127.0.0.1 already linked",
            "code": 0,
            "customData": null
        }
    ]
}
```

**200: OK Risposta di errore Codice paese non valido**

```json
Same error may be in case with wrong "region", "city", "isp"!
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Invalid country (region,  city, isp) ISO code",
            "code": 400,
            "customData": null
        },
        {
            "message": "Invalid country ISO code (400)",
            "code": 0,
            "customData": null
        }
    ]
}
```