code: public function upsertAclItem($aclId, $itemValue, $negated, $comment = 'Added by Magento Module', $subnet = false)
      {
          $body = [
              'ip' => $itemValue,
              'negated' => $negated,
              'comment' => $comment
          ];
  
          if ($subnet) {
              $body['subnet'] = $subnet;
          }
  
          $url = $this->_getApiServiceUri(). 'acl/'. $aclId . '/entry';
          $result = $this->_fetch($url, \Zend_Http_Client::POST, $body);
  
          return $result;
      }
docs: Upsert single ACL entry
  
  @param $aclId
  @param $itemValue
  @param $negated
  @param string $comment
  @param bool $subnet
  @return bool|mixed
  @throws LocalizedException