Helper/Data.php
public function saveApiEndpoint($apiEndpoint, $websiteId)
    {
        if ($websiteId > 0) {
            $scope = \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE;
        } else {
            $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT;
        }
        $this->writer->save(
            \Dotdigitalgroup\Email\Helper\Config::PATH_FOR_API_ENDPOINT,
            $apiEndpoint,
            $scope,
            $websiteId
        );
    }
public function saveApiEndpoint($apiEndpoint, $websiteId)
    {
        if ($websiteId > 0) {
            $scope = \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE;
        } else {
            $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT;
        }
        $this->writer->save(
            \Dotdigitalgroup\Email\Helper\Config::PATH_FOR_API_ENDPOINT,
            $apiEndpoint,
            $scope,
            $websiteId
        );
    }
public function saveApiEndpoint ( $ apiEndpoint , $ websiteId ) { if ( $ websiteId > 0 ) { $ scope = \ Magento \ Store \ Model \ ScopeInterface :: SCOPE_WEBSITE ; } else { $ scope = ScopeConfigInterface :: SCOPE_TYPE_DEFAULT ; } $ this -> writer -> save ( \ Dotdigitalgroup \ Email \ Helper \ Config :: PATH_FOR_API_ENDPOINT , $ apiEndpoint , $ scope , $ websiteId ) ; }
Save api endpoint into config.

@param string $apiEndpoint
@param  int $websiteId

@return null
Save api endpoint into config .