# Get IP addresses

List your active IP addresses. Same resource (`/ipAddress`), three call modes depending on what you need.

| Mode | Method | Use when |
| --- | --- | --- |
| Get all | GET | You want every IP across all proxy types in one call. |
| Filter by proxy type | GET | You only need one of `IPv4`, `IPv6`, `MOBILE`, or `ISP`. |
| Paginated by proxy type | POST | You have many IPs of one type and want to page through them. |

## **Common to all modes**

Base URL: `/client/api/v1/{apiKey}/ipAddress`

| Name  | Type  | Description |
| --- | --- | --- |
| apiKey* | String | Your personal API key. |

For per-IP field shape, see [Response fields](https://commitdoc.com/s/youproxy/p/get-ip-addresses-9074872962#gen-0000002i). On any error, see [Error response](https://commitdoc.com/s/youproxy/p/get-ip-addresses-9074872962#popvdqsneeko).

## **Get all**  


`GET /client/api/v1/{apiKey}/ipAddress`

No query parameters. Response groups IPs under all four proxyType keys (empty arrays if you have none of a given type).

```
curl https://youproxy.io/client/api/v1/{apiKey}/ipAddress
```

```
{
  "success": true,
  "data": {
    "IPv4": [
      {
        "orderId": "1112223334283d122",
        "ipAddresses": [
          {
            "ipAddressId": "1111111111111111",
            "ipAddressIp": "111.222.333.444",
            "orderId":     "1112223334283d122",
            "country":     "DEU",
            "dateStart":   "2023-10-25T12:17:54.249+00:00",
            "dateEnd":     "2023-11-24T23:59:54.249+00:00",
            "httpsPort":   "49112",
            "socks5Port":  "32456",
            "comment":     "your comment",
            "authInfo":   { "login": "login4444", "password": "password" },
            "extendInfo": { "autoExtend": false, "extendDays": 0 }
          }
        ]
      }
    ],
    "IPv6": [
      {
        "orderId": "45654645634283d122",
        "ipAddresses": [
          {
            "ipAddressId": "2222222222222222",
            "ipAddressIp": "2001:db8:abcd::1",
            "orderId":     "45654645634283d122",
            "country":     "DEU",
            "dateStart":   "2023-10-25T12:17:54.249+00:00",
            "dateEnd":     "2023-11-24T23:59:54.249+00:00",
            "port":        "10012",
            "protocol":    "HTTP",
            "comment":     null,
            "authInfo":   { "login": "login4444", "password": "password" },
            "extendInfo": { "autoExtend": true, "extendDays": 30 }
          }
        ]
      }
    ],
    "MOBILE": [
      {
        "orderId": "65757867887978122",
        "ipAddresses": [
          {
            "ipAddressId":    "3333333333333333",
            "ipAddressIp":    "101.123.234.456",
            "orderId":        "65757867887978122",
            "country":        "GBR",
            "dateStart":      "2023-10-03T13:02:02.432+00:00",
            "dateEnd":        "2023-11-02T23:59:02.432+00:00",
            "httpsPort":      "42443",
            "socks5Port":     "52334",
            "mobileOperator": "kyivstar",
            "rotationTime":   5,
            "rebootLink":     "https://youproxy.io/link",
            "comment":        null,
            "authInfo":      { "login": "login4444", "password": "password" },
            "extendInfo":    { "autoExtend": false, "extendDays": 0 }
          }
        ]
      }
    ],
    "ISP": [
      {
        "orderId": "11122233342835555",
        "ipAddresses": [
          {
            "ipAddressId": "4444444444444444",
            "ipAddressIp": "203.0.113.42",
            "orderId":     "11122233342835555",
            "country":     "DEU",
            "dateStart":   "2023-10-25T12:17:54.249+00:00",
            "dateEnd":     "2023-11-24T23:59:54.249+00:00",
            "httpsPort":   "49112",
            "socks5Port":  "32456",
            "comment":     "your comment",
            "authInfo":   { "login": "login555", "password": "password" },
            "extendInfo": { "autoExtend": false, "extendDays": 0 }
          }
        ]
      }
    ]
  }
}
```

## **Filter by proxy type**

`GET /client/api/v1/{apiKey}/ipAddress?proxyType={type}`

| Name  | Type  | Description |
| --- | --- | --- |
| apiKey* | String | One of: IPv4, IPv6, MOBILE, ISP |

```
curl https://youproxy.io/client/api/v1/{apiKey}/ipAddress?proxyType=IPv4
```

Switch tabs to see the response for each `proxyType`

**IPv4**

```
{
      "success": true,
      "data": {
        "IPv4": [
          {
            "orderId": "1112223334283d122",
            "ipAddresses": [
              {
                "ipAddressId": "1111111111111111",
                "ipAddressIp": "111.222.333.444",
                "orderId":     "1112223334283d122",
                "country":     "DEU",
                "dateStart":   "2023-10-25T12:17:54.249+00:00",
                "dateEnd":     "2023-11-24T23:59:54.249+00:00",
                "httpsPort":   "49112",
                "socks5Port":  "32456",
                "comment":     "your comment",
                "authInfo":   { "login": "login4444", "password": "password" },
                "extendInfo": { "autoExtend": false, "extendDays": 0 }
              }
            ]
          }
        ]
      }
    }
```

**IPv6**

```
{
      "success": true,
      "data": {
        "IPv6": [
          {
            "orderId": "45654645634283d122",
            "ipAddresses": [
              {
                "ipAddressId": "2222222222222222",
                "ipAddressIp": "2001:db8:abcd::1",
                "orderId":     "45654645634283d122",
                "country":     "DEU",
                "dateStart":   "2023-10-25T12:17:54.249+00:00",
                "dateEnd":     "2023-11-24T23:59:54.249+00:00",
                "port":        "10012",
                "protocol":    "HTTP",
                "comment":     null,
                "authInfo":   { "login": "login4444", "password": "password" },
                "extendInfo": { "autoExtend": true, "extendDays": 30 }
              }
            ]
          }
        ]
      }
    }
```

**MOBILE**

```
{
      "success": true,
      "data": {
        "MOBILE": [
          {
            "orderId": "65757867887978122",
            "ipAddresses": [
              {
                "ipAddressId":    "3333333333333333",
                "ipAddressIp":    "101.123.234.456",
                "orderId":        "65757867887978122",
                "country":        "GBR",
                "dateStart":      "2023-10-03T13:02:02.432+00:00",
                "dateEnd":        "2023-11-02T23:59:02.432+00:00",
                "httpsPort":      "42443",
                "socks5Port":     "52334",
                "mobileOperator": "kyivstar",
                "rotationTime":   5,
                "rebootLink":     "https://youproxy.io/link",
                "comment":        null,
                "authInfo":      { "login": "login4444", "password": "password" },
                "extendInfo":    { "autoExtend": false, "extendDays": 0 }
              }
            ]
          }
        ]
      }
    }
```

**ISP**

```
{
      "success": true,
      "data": {
        "ISP": [
          {
            "orderId": "11122233342835555",
            "ipAddresses": [
              {
                "ipAddressId": "4444444444444444",
                "ipAddressIp": "203.0.113.42",
                "orderId":     "11122233342835555",
                "country":     "DEU",
                "dateStart":   "2023-10-25T12:17:54.249+00:00",
                "dateEnd":     "2023-11-24T23:59:54.249+00:00",
                "httpsPort":   "49112",
                "socks5Port":  "32456",
                "comment":     "your comment",
                "authInfo":   { "login": "login555", "password": "password" },
                "extendInfo": { "autoExtend": false, "extendDays": 0 }
              }
            ]
          }
        ]
      }
    }
```

## Paginated by proxy type

`POST /client/api/v1/{apiKey}/ipAddress?proxyType={type}`

**Verify with backend:** in current docs `proxyType` appears in both query string and request body. It should be in one place only — most likely query (matches the GET version).

| Body  | Type  | Description |
| --- | --- | --- |
| page* | number | Page index, starting from 0. |
| size* | number | Number of IPs per page. |

```
curl -X POST "https://youproxy.io/client/api/v1/$KEY/ipAddress?proxyType=IPv4" \
  -H "Content-Type: application/json" \
  -d '{ "page": 0, "size": 50 }'
```

Response is a flat `content` array (not grouped by order) plus pagination metadata. Switch tabs to see per-type response shape.

**IPv4**

```
{
      "success": true,
      "data": {
        "totalElements": 1,
        "totalPages": 1,
        "content": [
          {
            "ipAddressId": "1111111111111111",
            "ipAddressIp": "111.222.333.444",
            "orderId":     "1112223334283d122",
            "country":     "DEU",
            "dateStart":   "2023-10-25T12:17:54.249+00:00",
            "dateEnd":     "2023-11-24T23:59:54.249+00:00",
            "httpsPort":   "49112",
            "socks5Port":  "32456",
            "comment":     "your comment",
            "authInfo":   { "login": "login4444", "password": "password" },
            "extendInfo": { "autoExtend": false, "extendDays": 0 }
          }
        ]
      },
      "error": null
    }
```

**IPv6**

```
{
      "success": true,
      "data": {
        "totalElements": 1,
        "totalPages": 1,
        "content": [
          {
            "ipAddressId": "2222222222222222",
            "ipAddressIp": "2001:db8:abcd::1",
            "orderId":     "45654645634283d122",
            "country":     "DEU",
            "dateStart":   "2023-10-25T12:17:54.249+00:00",
            "dateEnd":     "2023-11-24T23:59:54.249+00:00",
            "port":        "10012",
            "protocol":    "HTTP",
            "comment":     null,
            "authInfo":   { "login": "login4444", "password": "password" },
            "extendInfo": { "autoExtend": true, "extendDays": 30 }
          }
        ]
      },
      "error": null
    }
```

**MOBILE**

```
{
      "success": true,
      "data": {
        "totalElements": 1,
        "totalPages": 1,
        "content": [
          {
            "ipAddressId":    "3333333333333333",
            "ipAddressIp":    "101.123.234.456",
            "orderId":        "65757867887978122",
            "country":        "GBR",
            "dateStart":      "2023-10-03T13:02:02.432+00:00",
            "dateEnd":        "2023-11-02T23:59:02.432+00:00",
            "httpsPort":      "42443",
            "socks5Port":     "52334",
            "mobileOperator": "kyivstar",
            "rotationTime":   5,
            "rebootLink":     "https://youproxy.io/link",
            "comment":        null,
            "authInfo":      { "login": "login4444", "password": "password" },
            "extendInfo":    { "autoExtend": false, "extendDays": 0 }
          }
        ]
      },
      "error": null
    }
```

**ISP**

```
{
      "success": true,
      "data": {
        "totalElements": 1,
        "totalPages": 1,
        "content": [
          {
            "ipAddressId": "4444444444444444",
            "ipAddressIp": "203.0.113.42",
            "orderId":     "11122233342835555",
            "country":     "DEU",
            "dateStart":   "2023-10-25T12:17:54.249+00:00",
            "dateEnd":     "2023-11-24T23:59:54.249+00:00",
            "httpsPort":   "49112",
            "socks5Port":  "32456",
            "comment":     "your comment",
            "authInfo":   { "login": "login555", "password": "password" },
            "extendInfo": { "autoExtend": false, "extendDays": 0 }
          }
        ]
      },
      "error": null
    }
```

### Pagination fields

| Field  | Type  | Description |
| --- | --- | --- |
| totalElements | number | Total IPs matching the filter. |
| totalPages | number | Total page count for the requested `size`. |
| content | array | IPs in this page. |

## Response fields (IP object)

Shape of each IP address object — same across all three modes. Some fields appear only for certain proxy types.

| Field | Type | Present in | Description |
| --- | --- | --- | --- |
| `ipAddressId` | string | All | Unique IP ID. Use it in extend / auto-extend calls. |
| `ipAddressIp` | string | All | The IP address. |
| `orderId` | string | All | Order this IP belongs to. |
| `country` | string | All | ISO 3166-1 alpha-3 country code. |
| `dateStart` / `dateEnd` | string | All | ISO 8601 timestamps for the rental window. |
| `httpsPort` | string | `IPv4` `MOBILE` `ISP` | Port for HTTP/HTTPS connections. |
| `socks5Port` | string | `IPv4` `MOBILE` `ISP` | Port for SOCKS5 connections. |
| `port` | string | `IPv6 only` | Single port. IPv6 supports HTTP only. |
| `protocol` | string | `IPv6 only` | Always HTTP for IPv6. |
| `mobileOperator` | string | `MOBILE only` | Operator tag, e.g. `kyivstar`. |
| `rotationTime` | number | `MOBILE only` | IP rotation interval (units TBD — verify). |
| `rebootLink` | string | `MOBILE only` | URL to manually trigger IP rotation. |
| `comment` | string \| null | All | User-provided comment for this IP. |
| `authInfo` | object | All | `{ login, password }` for proxy auth. |
| `extendInfo` | object | All | `{ autoExtend, extendDays }` — auto-renewal config. |

## Paginated response wrapper

Only the paginated mode wraps results in this envelope. The other two modes return a flat array of IP objects.

| Field | Type | Description |
| --- | --- | --- |
| `totalElements` | number | Total IPs matching the filter. |
| `totalPages` | number | Total page count for the requested `size`. |
| `content` | array | IPs in this page. |

## Error response

Returned when the request can't be processed — invalid API key, malformed parameters, etc. Same shape regardless of mode or `proxyType`.

```
{
  "success": false,
  "data": {},
  "error": {
    "code": 2,
    "message": "Error api key"
  }
}
```

| Field | Type | Description |
| --- | --- | --- |
| success | boolean | Always `false` on error. |
| data | object | Empty object `{}` on error. |
| error.code | number | Error code. See Possible errors. |
| error.message | string | Human-readable message. |