Update auto renew
curl --request PATCH \
--url https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {},
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": {}
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": {}
}Update auto renew
Developer endpoint. Send a KmerHosting API key as Authorization: Bearer <key>. Every resource is scoped to the API key owner and protected by explicit scopes and rate limits.
Use this services endpoint for the operation described in the summary. The server validates authorization, ownership, and input before accessing MySQL or external providers.
PATCH
/
api
/
v1
/
sdk
/
services
/
{type}
/
{serviceId}
/
auto-renew
Update auto renew
curl --request PATCH \
--url https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://kmerhosting.com/api/v1/sdk/services/{type}/{serviceId}/auto-renew")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {},
"message": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": {}
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Create an API key in Console > Account > API Keys. Use the full key only in trusted server-side environments.
Body
application/json
Was this page helpful?
⌘I

