# Liste erstellen

## **Endpunkt:**

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

### Pfadparameter

| Name | Wert | Beschreibung |
| --- | --- | --- |
| Autorisierung | `<Your_API_Key>` | Ihr persönlicher API-Schlüssel |

### **Körper der Anfrage**

| Name | Typ | Beschreibung |
| --- | --- | --- |
| titel | Zeichenfolge | Name der Liste, die Sie erstellen |
| whitelist | Zeichenfolge | IPs für die Autorisierung. Leer lassen, wenn Sie mit Anmeldedaten autorisieren möchten |
|  |  |  |
| geo | **objekt** | Hinzufügen von GEO-Daten zu Ihrer Liste (Land, Region, Stadt, ISP) |
| land | Zeichenfolge | Aus der GEO-Datenbank ausgewähltes Land**(Der Fall ist wichtig)** |
| region | Zeichenfolge | Aus der GEO-Datenbank ausgewählte Region**(Der Fall ist wichtig)** |
| stadt | Zeichenfolge | Aus der GEO-Datenbank ausgewählte Stadt**(Der Fall ist wichtig)** |
| isp | Zeichenfolge | ISP ausgewählt aus der GEO-Datenbank**(Der Fall ist wichtig)** |
|  |  |  |
| **exportieren** | **objekt** | Hier geben Sie die Anzahl der IPs in Ihrer Liste und den Exporttyp (Portnummern und Dateiformat) an. |
| häfen | Nummer | Anzahl der IPs (maximal 1000) |
| ext | Zeichenfolge | Art der Ausfuhr |
|  |  |  |
| rotation | Nummer | "Rotation: '-1' für keine Rotation (Sticky), '0' für Rotation pro Anfrage, '1' bis '3600' für zeitbasierte Rotation in Sekunden |

### **Beispiel**

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

### **Antwort**

**200: OK Erfolgsmeldung**

```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 Fehlerantwort Falscher API-Schlüssel**

```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 Fehlerantwort Falsche Autorisierungs-IP**

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

**200: OK Fehlerantwort Tarif nicht gefunden**

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

### **Antworten mit Fehler im Body der Anfrage**

**200: OK Fehlerantwort Falsche Whitelist-IP**

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

**200: OK Fehlerantwort IP bereits verlinkt**

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

**200: OK Fehlerantwort Ungültiger Ländercode**

```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
        }
    ]
}
```