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

# Manage IP addresses

> Retrieve a list of IP addresses that can access the API and add new IP addresses.

## List allowed IP addresses

<Note>
  **GET** `/v2/ipaddresses`
</Note>

### Request

Use this request to retrieve a list of IP addresses that are allowed to access the API.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/ipaddresses' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```

  ```bash Request structure theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/ipaddresses' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```
</CodeGroup>

#### Query parameters

<ParamField query="limit" type="integer">
  The maximum number of items to return. For example, `limit=25`. By default, this is set to `100`.

  Allowable values: `[ 1 .. 100000 ]`
</ParamField>

<ParamField query="offset" type="integer">
  The number of items to skip before returning the results. For example, `offset=200`. By default, this is set to `0`.

  Allowable values: A valid integer
</ParamField>

### Response

If your request is successful, you'll receive a `200` response containing a list of the IP addresses that can currently access the API, sorted in numerical order by `ip`.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "limit": 100,
    "offset": 0,
    "count": 2,
    "rows": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "ip": "192.0.2.1",
        "description": "ACME London HQ",
        "createdAt": "2023-08-24T14:15:22Z",
        "updatedAt": "2023-08-24T14:15:22Z"
      },
      {
        "id": "2327f0d0-2cb5-4f31-8de2-b9d04036fdd9",
        "ip": "8.8.8.8",
        "description": "John Smith Home",
        "createdAt": "2023-11-21T09:15:37Z",
        "updatedAt": "2023-11-21T09:15:37Z"
      }
    ]
  }
  ```

  ```json Response structure theme={null}
  {
    "limit": integer,
    "offset": integer,
    "count": integer,
    "rows": [
      {
        "id": "string",
        "ip": "string",
        "description": "string",
        "createdAt": "string",
        "updatedAt": "string"
      },
      {
        "id": "string",
        "ip": "string",
        "description": "string",
        "createdAt": "string",
        "updatedAt": "string"
      }
    ]
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/ip-addresses/list-ip-addresses-allowed-to-access-the-api).

## Add an IP address

<Note>
  **POST** `/v2/ipaddresses`
</Note>

### Request

Use this request to allow a new IP address to access the API.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X POST \
    https://api.equalsmoney.com/v2/ipaddresses \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "ip": "8.8.8.8",
      "description": "John Smith Home"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X POST \
    https://api.equalsmoney.com/v2/ipaddresses \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "ip": "string",
      "description": "string"
    }'
  ```
</CodeGroup>

#### Request body schema

<ParamField body="ip" type="string" required>
  The IP address that you want to add.

  Allowable values: ≤ 50 characters
</ParamField>

<ParamField body="description" type="string" required>
  A description of the IP address.

  Allowable values: ≤ 256 characters
</ParamField>

### Response

If your request is successful, you'll receive a `201` response containing details about the newly-added IP address.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "id": "2327f0d0-2cb5-4f31-8de2-b9d04036fdd9",
    "ip": "8.8.8.8",
    "description": "John Smith Home",
    "ipaddressableType": "product",
    "ipaddressableId": "d926625b-5e11-4ec1-b4cd-0af2a8021efc",
    "createdAt": "2023-11-21T09:15:37Z",
    "updatedAt": "2023-11-21T09:15:37Z"
  }
  ```

  ```json Response structure theme={null}
  {
    "id": "string",
    "ip": "string",
    "description": "string",
    "ipaddressableType": "string",
    "ipaddressableId": "string",
    "createdAt": "string",
    "updatedAt": "string"
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/ip-addresses/create-an-ip-address).
