---
title: "Add login security record to list with comment"
method: POST
path: "/batch_create_cphulk_records"
tags: ["cPHulk", "Management"]
---

# Add login security record to list with comment

`POST /batch_create_cphulk_records`

This function adds one or more records to cPHulk's whitelist or blacklist. The function includes the option to add unique comments for each IP address that you add.

## Request body

- object
  - `api.version` 1, required — The WHM API version number.
  - `list_name` 'black' | 'white', required — The cPHulk list's name. * `black` - Add a new record or records to the blacklist. * `white` - Add a new record or records to the whitelist.
  - `records` object[], required — The list of records to add to the whitelist or blacklist.
    - `comment` string
    - `ip` union, required
      - string, ipv4
      - string, cidr
      - string, ipv4-ipv4
      - string, ipv6
      - string, cidr
      - string, ipv6-ipv6
  - `skip_enabled_check` 0 | 1 — Whether to skip checking if cPHulk runs on the server. * `1` - Do **not** check if cPHulk is running. * `0` - Check if cPHulk is running. **Note:** If cPHulk is disabled and you check its status, the function returns the following message: `cPHulk is disabled on the server.`

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `comment` string — The comment that you included when you called the function.
    - `ip_blocks_removed` integer — The number of IP address blocks that the function deleted.
    - `ips_added` IpAddress[] — An array of IP addresses that the function added from the list. This function will always returns ranges in the IP1-IP2 format.
      - union
        - string, ipv4
        - string, cidr
        - string, ipv4-ipv4
        - string, ipv6
        - string, cidr
        - string, ipv6-ipv6
    - `ips_failed` object — An object of IP addresses that the system failed to add to the list. This object contains one or more IP address returns.
    - `iptable_bans_removed` integer — The number of `iptables` temporary block rules that the function deleted.
    - `list_name` 'black' | 'white' — The cPHulk list's name. * `black` * `white`
    - `original_ips_added` IpAddress[] — An array of IP addresses that the function added from the list. The system will return the one of the following formats: - A IPv4 address (192.168.0.1). - A simple IPv4 address range (192.168.1.1-192.168.1.4). - A CIDR IPv4 address range (192.168.1.0/30).
      - union
        - string, ipv4
        - string, cidr
        - string, ipv4-ipv4
        - string, ipv6
        - string, cidr
        - string, ipv6-ipv6
    - `requester_ip` union — The IP address of the user or system that requested the addition.
      - string, ipv4
      - string, ipv6
    - `requester_ip_is_whitelisted` 0 | 1 — Whether the requester's IP address exists on cPHulk's whitelist. * `1` - Whitelisted. * `0` - Not whitelisted.
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is 0. This field may display a success message when a function succeeds.
    - `result` 0 | 1 — * `1` - Success. * `0` - Failed. Check the reason field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
