curl --request PATCH \
--url https://api.gcore.com/iam/clients/{clientId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"companyName": "<string>",
"custom_id": "<string>",
"name": "<string>",
"phone": "<string>",
"reseller": 123,
"seller": 123,
"is_test": true
}
'import requests
url = "https://api.gcore.com/iam/clients/{clientId}"
payload = {
"email": "jsmith@example.com",
"companyName": "<string>",
"custom_id": "<string>",
"name": "<string>",
"phone": "<string>",
"reseller": 123,
"seller": 123,
"is_test": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
companyName: '<string>',
custom_id: '<string>',
name: '<string>',
phone: '<string>',
reseller: 123,
seller: 123,
is_test: true
})
};
fetch('https://api.gcore.com/iam/clients/{clientId}', 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://api.gcore.com/iam/clients/{clientId}",
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([
'email' => 'jsmith@example.com',
'companyName' => '<string>',
'custom_id' => '<string>',
'name' => '<string>',
'phone' => '<string>',
'reseller' => 123,
'seller' => 123,
'is_test' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.gcore.com/iam/clients/{clientId}"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"custom_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"reseller\": 123,\n \"seller\": 123,\n \"is_test\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.gcore.com/iam/clients/{clientId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"custom_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"reseller\": 123,\n \"seller\": 123,\n \"is_test\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/iam/clients/{clientId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"custom_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"reseller\": 123,\n \"seller\": 123,\n \"is_test\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"email": "jsmith@example.com",
"name": "<string>",
"status": "new",
"companyName": "<string>",
"currentUser": 123,
"capabilities": [
"CDN"
],
"serviceStatuses": {
"CDN": {
"status": "new",
"enabled": true
},
"CLOUD": {
"status": "new",
"enabled": true
},
"DDOS": {
"status": "new",
"enabled": true
},
"DNS": {
"status": "new",
"enabled": true
},
"STORAGE": {
"status": "new",
"enabled": true
},
"STREAMING": {
"status": "new",
"enabled": true
}
},
"paidFeatures": {
"CDN": [
{
"feature_id": 1,
"name": "paid feature name",
"service": "CDN"
}
],
"STREAMING": [
{
"feature_id": 2,
"name": "another paid feature name",
"service": "STREAMING"
}
]
},
"freeFeatures": {
"CDN": [
{
"feature_id": 1,
"name": "free feature name",
"service": "CDN"
}
],
"STREAMING": [
{
"feature_id": 2,
"name": "another free feature name",
"service": "STREAMING"
}
]
},
"entryBaseDomain": "<string>",
"deleted": true,
"bill_type": "<string>",
"is_test": true,
"has_active_admin": true,
"users": [
{
"id": 123,
"email": "jsmith@example.com",
"name": "<string>",
"lang": "de",
"phone": "<string>",
"company": "<string>",
"reseller": 123,
"client": 123,
"deleted": true,
"groups": [
{
"id": 1,
"name": "Administrators"
}
],
"activated": true,
"sso_auth": true,
"two_fa": true,
"auth_types": [
"password"
]
}
],
"phone": "<string>",
"website": "<string>",
"signup_process": "sign_up_full",
"custom_id": "<string>",
"country_code": "<string>",
"seller": 123,
"resellers": 123,
"client_type": "common",
"owner": 123
}{
"errors": {}
}Update client's details
curl --request PATCH \
--url https://api.gcore.com/iam/clients/{clientId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"companyName": "<string>",
"custom_id": "<string>",
"name": "<string>",
"phone": "<string>",
"reseller": 123,
"seller": 123,
"is_test": true
}
'import requests
url = "https://api.gcore.com/iam/clients/{clientId}"
payload = {
"email": "jsmith@example.com",
"companyName": "<string>",
"custom_id": "<string>",
"name": "<string>",
"phone": "<string>",
"reseller": 123,
"seller": 123,
"is_test": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'jsmith@example.com',
companyName: '<string>',
custom_id: '<string>',
name: '<string>',
phone: '<string>',
reseller: 123,
seller: 123,
is_test: true
})
};
fetch('https://api.gcore.com/iam/clients/{clientId}', 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://api.gcore.com/iam/clients/{clientId}",
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([
'email' => 'jsmith@example.com',
'companyName' => '<string>',
'custom_id' => '<string>',
'name' => '<string>',
'phone' => '<string>',
'reseller' => 123,
'seller' => 123,
'is_test' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.gcore.com/iam/clients/{clientId}"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"custom_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"reseller\": 123,\n \"seller\": 123,\n \"is_test\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://api.gcore.com/iam/clients/{clientId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"custom_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"reseller\": 123,\n \"seller\": 123,\n \"is_test\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/iam/clients/{clientId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"companyName\": \"<string>\",\n \"custom_id\": \"<string>\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"reseller\": 123,\n \"seller\": 123,\n \"is_test\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"email": "jsmith@example.com",
"name": "<string>",
"status": "new",
"companyName": "<string>",
"currentUser": 123,
"capabilities": [
"CDN"
],
"serviceStatuses": {
"CDN": {
"status": "new",
"enabled": true
},
"CLOUD": {
"status": "new",
"enabled": true
},
"DDOS": {
"status": "new",
"enabled": true
},
"DNS": {
"status": "new",
"enabled": true
},
"STORAGE": {
"status": "new",
"enabled": true
},
"STREAMING": {
"status": "new",
"enabled": true
}
},
"paidFeatures": {
"CDN": [
{
"feature_id": 1,
"name": "paid feature name",
"service": "CDN"
}
],
"STREAMING": [
{
"feature_id": 2,
"name": "another paid feature name",
"service": "STREAMING"
}
]
},
"freeFeatures": {
"CDN": [
{
"feature_id": 1,
"name": "free feature name",
"service": "CDN"
}
],
"STREAMING": [
{
"feature_id": 2,
"name": "another free feature name",
"service": "STREAMING"
}
]
},
"entryBaseDomain": "<string>",
"deleted": true,
"bill_type": "<string>",
"is_test": true,
"has_active_admin": true,
"users": [
{
"id": 123,
"email": "jsmith@example.com",
"name": "<string>",
"lang": "de",
"phone": "<string>",
"company": "<string>",
"reseller": 123,
"client": 123,
"deleted": true,
"groups": [
{
"id": 1,
"name": "Administrators"
}
],
"activated": true,
"sso_auth": true,
"two_fa": true,
"auth_types": [
"password"
]
}
],
"phone": "<string>",
"website": "<string>",
"signup_process": "sign_up_full",
"custom_id": "<string>",
"country_code": "<string>",
"seller": 123,
"resellers": 123,
"client_type": "common",
"owner": 123
}{
"errors": {}
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234_abcdef
Path Parameters
Account ID.
Body
The account email.
The company name.
The account custom ID.
Name of a user who registered the requested account.
Phone of a user who registered the requested account.
ID of the Reseller.
ID of the Seller.
System field:
true— a test account;false— a production account.
Response
OK.
The account ID.
The account email.
Name of a user who registered the requested account.
Status of the account.
new, trial, trialend, active, integration, paused, preparation, ready The company name.
ID of the current user.
System field. List of services available for the account.
Service's name.
CDN, STORAGE, STREAMING, DNS, DDOS, CLOUD An object of arrays which contains information about all services available for the requested account.
Show child attributes
Show child attributes
An object of arrays which contains information about paid features available for the requested account.
Show child attributes
Show child attributes
{
"CDN": [
{
"feature_id": 1,
"name": "paid feature name",
"service": "CDN"
}
],
"STREAMING": [
{
"feature_id": 2,
"name": "another paid feature name",
"service": "STREAMING"
}
]
}
An object of arrays which contains information about free features available for the requested account.
Show child attributes
Show child attributes
{
"CDN": [
{
"feature_id": 1,
"name": "free feature name",
"service": "CDN"
}
],
"STREAMING": [
{
"feature_id": 2,
"name": "another free feature name",
"service": "STREAMING"
}
]
}
System field. Control panel domain.
The field shows the status of the account:
true– the account has been deletedfalse– the account is not deleted
System field. Billing type of the account.
System field:
true— a test account;false— a production account.
System field.
List of account users.
Show child attributes
Show child attributes
Phone of a user who registered the requested account.
The company website.
System field. Type of the account registration process.
sign_up_full, sign_up_simple The account custom ID.
System field. The company country (ISO 3166-1 alpha-2 format).
ID of the Seller.
ID of the Reseller.
Client's type.
common, reseller, sales Id of the user, who created client.
Was this page helpful?