NAV navbar
bash php python

Introductions

Welcome to the IRSFA API! You can use our API to access Irsfa API endpoints.

We have language bindings in Shell, PHP, Python! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

Overview of Irsfa APIs

Method Endpoint Usage
POST /oauth/token Get Access Token for Oauth2.0
POST /rest/v2/registrant/create Create New Contact Registrant
PUT /rest/v2/registrant/update Update Contact Registrant
GET /rest/v2/registrant Get List Contact Registrant
POST /rest/v2/domain/create Register New Domain
POST /rest/v2/domain/renew Renew Domain
POST /rest/v2/domain/transfer Transfer Domain
POST /rest/v2/domain/restore Restore Domain
POST /rest/v2/domain/togel/lock Toogle Domain Lock (Lock or Unlock Domain Transfer Porhibited)
POST /rest/v2/domain/get/info Get Domian Info
POST /rest/v2/domain/whois Get Domian Whois
POST /rest/v2/domain/get/eppcode Get Epp Code Domain
POST /rest/v2/domain/check/availability Domain Availability
POST /rest/v2/domain/upload/terms Upload Document Domain Terms
POST /rest/v2/domain/nameserver/update Update Nameserver Domain
PUT /rest/v2/domain/nameserver/update Update Domain Nameserver
POST /rest/v2/child/nameserver/create Register New Child Nameserver
PUT /rest/v2/child/nameserver/update Update Child Nameserver
DELETE /rest/v2/child/nameserver/delete Delete Child Nameserver
POST /rest/v2/dnsmanager/create Create DNS Manager
POST /rest/v2/dnsmanager/add Add record DNS Manager
PUT /rest/v2/dnsmanager/update Update DNS Manager
DELETE /rest/v2/dnsmanager/delete Delete DNS Manager
DELETE /rest/v2/dnsmanager/terminate Terminate DNS Manager
GET /rest/v2/office365/product Get Product Office365
POST /rest/v2/office365/customer/create Create Customer Office365
POST /rest/v2/office365/tenant/create Create Tenant Office365
POST /rest/v2/office365/agreement/create Create Agreement Office365
POST /rest/v2/office365/order Order Office365
POST /rest/v2/office365/detail Get Detail Office365
POST /rest/v2/office365/suspend/subscription Suspend Subscription Office365
POST /rest/v2/office365/unsuspend/subscription Unsuspend Subscription Office365
GET /rest/v2/hosting Get Product Hosting
POST /rest/v2/hosting/create Create Hosting
POST /rest/v2/hosting/detail Get Detail Hosting
POST /rest/v2/hosting/suspend Suspend Hosting
POST /rest/v2/hosting/unsuspend Unsuspend Hosting
POST /rest/v2/hosting/change-password Change Password Hosting
POST /rest/v2/vps Get VPS
POST /rest/v2/vps/create Create VPS
POST /rest/v2/vps/stop Stop VPS
POST /rest/v2/vps/start Start VPS
POST /rest/v2/vps/restart Restart VPS
POST /rest/v2/vps/poweroff Power off VPS
POST /rest/v2/vps/suspend Suspend VPS
POST /rest/v2/vps/unsuspend Unsuspend VPS
POST /rest/v2/vps/rebuild Rebuild VPS

Authentication

OAuth2.0

Irsfa APIs is using OAuth 2.0 as the authorization framework. To get the access token, you need to be authorized by client_id and client_secret. To learn more about the OAuth 2.0 authorization framework, you can read the RFC6749 Documentation.

Access Token

access_token is an opaque string token that identify the user of the API. This token is required each time an application call API. There are several way to obtain an access_token, which will be described bellow.

Access Token :

POST /oauth/token

curl -X POST \
  https://api.irsfa.id/oauth/token \
  -F grant_type=client_credentials \
  -F client_id=client_id \
  -F client_secret=client_secret \
  -F scope=
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/oauth/token",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "grant_type=client_credentials&client_id=client_id&client_secret=client_secret&scope="
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/oauth/token"

payload = "grant_type=client_credentials&client_id=client_id&client_secret=client_secret&scope="

response = requests.request("POST", url, data=payload)

print(response.text)

The above command returns Success JSON structured like this:

{
    "token_type": "Bearer",
    "expires_in": 31622400,
    "access_token": "your access_token"
}

The above command returns Failed JSON structured like this:

{
    "error": "invalid_client",
    "message": "Client authentication failed"
}

Obtaining Access Token

Access token can be obtained in many way, depend on the grant_type of the application. To access all the services in this sandbox, you will need the access token with grant_type = client_credentials.

Client Credentials Grant

client_credentials grant will provide application access to API without requiring any user credential. Any call requested using access_token obtained using this method are made on behalf of the application instead of the user.

This grant type is designed to be used by server to server call. In order to obtain access_token a request must be made with following specification

HTTP Request

POST https://api.irsfa.id/oauth/token

Payload

Field Data Type Mandatory Description
grant_type String Yes value = client_credentials
client_id String Yes your client_id
client_secret String Yes your client_secret
scope String No null

Response

Field Data Type Description
token_type String default is Bearer
expires_in String access_token validity, in seconds
access_token String your access_token

Contact

Create Registrant / Create Contact

Create Registrat/Contact :

POST /rest/v2/registrant/create

curl -X POST \
  https://api.irsfa.id/rest/v2/registrant/create \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "company_name" : "Your Company",
    "initial" : "J.D",
    "first_name" : "Jhon",
    "last_name" : "Doe",
    "gender" : "M",
    "telephone_number" : "+628111111111",
    "street" : "Your Street Address",
    "number" : "19",
    "zip_code" : "41111",
    "city" : "Jakarta Selatan",
    "state" : "DKI Jakarta",
    "country" : "ID",
    "email" : "yourvalidemail@example.com",
    "locale" : "en_GB"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/registrant/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n    \"company_name\" : \"Your Company\",\n    \"initial\" : \"J.D\",\n    \"first_name\" : \"Jhon\",\n    \"last_name\" : \"Doe\",\n    \"gender\" : \"M\",\n    \"telephone_number\" : \"+628111111111\",\n    \"street\" : \"Your Street Address\",\n    \"number\" : \"19\",\n    \"zip_code\" : \"41111\",\n    \"city\" : \"Jakarata Selatan\",\n    \"state\" : \"DKI Jakarata\",\n    \"country\" : \"ID\",\n    \"email\" : \"yourvalidemail@example.com\",\n    \"locale\" : \"en_GB\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/registrant/create"

payload = "{\n    \"company_name\" : \"Your Company\",\n    \"initial\" : \"J.D\",\n    \"first_name\" : \"Jhon\",\n    \"last_name\" : \"Doe\",\n    \"gender\" : \"M\",\n    \"telephone_number\" : \"+628111111111\",\n    \"street\" : \"Your Street Address\",\n    \"number\" : \"19\",\n    \"zip_code\" : \"41111\",\n    \"city\" : \"Jakarata Selatan\",\n    \"state\" : \"DKI Jakarata\",\n    \"country\" : \"ID\",\n    \"email\" : \"yourvalidemail@example.com\",\n    \"locale\" : \"en_GB\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 201,
    "message": "Successfull Create Contact!",
    "data": {
        "no_contact": "contact_id"
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint create new registrant/contact in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/registrant/create

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
company_name String Yes Name of your company or organization.
initial String Yes First letter of a word of your full name e.g J.D.
first_name String Yes First of your name e.g Jhon.
last_name String Yes Last of your name e.g Doe.
gender String Yes Your gender e.g M (for male), F (for female).
telephone_number String Yes Your valid telephone number e.g +6282111111111.
street String Yes Street your residence.
number Integer Yes Number of your residence.
zip_code Integer Yes Postal code of your residence.
city String Yes City of your residence.
state String Yes Provice/State of your residence
country String Yes Country ID of your residence e.g ID (for Indonesia).
email String Yes Your valid email.
locale String Yes Your language code e.g en_GB (for English).

Response

Field Data Type Description
CreateRegistrant/Contact Successfull
code Integer 201
message String Successfull Create Contact!.
data Array no_contact : Registrant/Contact Id.
CreateRegistrant/Contact Failed
code Integer Error Code.
message String Error message.

Update Registrant / Update Contact

Update Registrat/Contact :

PUT /rest/v2/registrant/update

curl -X PUT \
  https://api.irsfa.id/rest/v2/registrant/update \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "contact_id" : "Your Contact Id",
    "telephone_number" : "+628111111111",
    "street" : "Your Street Address",
    "number" : "19",
    "zip_code" : "41111",
    "city" : "Jakarta Selatan",
    "state" : "DKI Jakarta",
    "country" : "ID",
    "email" : "yourvalidemail@example.com"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/registrant/update",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n    \"contact_id\" : \"Your Contatc Id\",\n   \"telephone_number\" : \"+628111111111\",\n    \"street\" : \"Your Street Address\",\n    \"number\" : \"19\",\n    \"zip_code\" : \"41111\",\n    \"city\" : \"Jakarata Selatan\",\n    \"state\" : \"DKI Jakarata\",\n    \"country\" : \"ID\",\n    \"email\" : \"yourvalidemail@example.com\",\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/registrant/update"

payload = "{\n    \"contact_id\" : \"Your Contatc Id\",\n   \"telephone_number\" : \"+628111111111\",\n    \"street\" : \"Your Street Address\",\n    \"number\" : \"19\",\n    \"zip_code\" : \"41111\",\n    \"city\" : \"Jakarata Selatan\",\n    \"state\" : \"DKI Jakarata\",\n    \"country\" : \"ID\",\n    \"email\" : \"yourvalidemail@example.com\",\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "messgae": "Successfull Modify Contact Registrant!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint update registrant/contact in your account. Your Request must contain following information:

HTTP Request

PUT https://api.irsfa.id/rest/v2/registrant/update

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
contact_id String Yes Your Contatc id.
telephone_number String Yes Your valid telephone number e.g +6282111111111.
street String Yes Street your residence.
number Integer Yes Number of your residence.
zip_code Integer Yes Postal code of your residence.
city String Yes City of your residence.
state String Yes Provice/State of your residence
country String Yes Country ID of your residence e.g ID (for Indonesia).
email String Yes Your valid email.

Response

Field Data Type Description
UpdateRegistrant/Contact Successfull
code Integer 200
message String Successfull Modify Contact Registrant!.
UpdateRegistrant/Contact Failed
code Integer Error Code.
message String Error message.

Get Contact/Registrant List

Get Contact/Registrant List :

GET rest/v2/registrant

curl -X GET \
  https://api.irsfa.id/rest/v2/registrant \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/registrant",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/registrant"

payload = ""
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfully Procces The Request!",
    "data": {
        "current_page": 1,
        "data": [
            {
                "client_contact_id": "2019CCT0000021",
                "contact_first_name": "Jhon",
                "contact_last_name": "Doe",
                "contact_company_name": "Your Company",
                "contact_initial": "J.D",
                "contact_gender": "M",
                "contact_country_code": "+62",
                "contact_area_code": "811",
                "contact_subscriber_number": "11111111",
                "contact_street": "Setra Indah",
                "contact_number": "19",
                "contact_zip_code": "43262",
                "contact_city": "Bandung",
                "contact_state": "West Java",
                "contact_country": "ID",
                "contact_phone": "+628111111111",
                "contact_email": "yourvalidemail@qexample.com",
                "contact_locale": "en_GB"
            }
        ],
        "first_page_url": "https://api.irsfa.id/rest/v2/registrant?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "https://api.irsfa.id/rest/v2/registrant?page=1",
        "next_page_url": null,
        "path": "https://api.irsfa.id/rest/v2/registrant",
        "per_page": 10,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get list contact in your account. Your Request must contain following information:

HTTP Request

GET https://api.irsfa.id/rest/v2/registrant

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Response

Field Data Type Description
GetRegistrant/Contact Successfull
code Integer 200
message String Successfully Procces The Request!.
data array Data Your contact/registrant with pagination.
GetRegistrant/Contact Failed
code Integer Error Code.
message String Error message.

Domain

Register Domain

Register Domain :

POST /rest/v2/domain/create

curl -X POST \
  https://api.irsfa.id/rest/v2/domain/create \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain":"yourdomain.id",
    "period":1,
    "contact_id":"your_contact_id",
    "nameserver":["ns1.yourns.id","ns2.yourdomain.id"],
    "currency_id":1,
    "description":"Register Domain"
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/domain/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\":\"yourdomain.id\",\n\t\"period\":1,\n\t\"contact_id\":\"your_contact_id\",\n\t\"nameserver\":[\"ns1.yourns.id\",\"ns1.yourns.id\"],\n\t\"currency_id\":1,\n\t\"description\":\"Register Domain\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/domain/create"

payload = "{\n\t\"domain\":\"yourdomain.id\",\n\t\"period\":1,\n\t\"contact_id\":\"your_contact_id\",\n\t\"nameserver\":[\"ns1.yourns.id\",\"ns2.yourns.id\"],\n\t\"currency_id\":1,\n\t\"description\":\"Register Domain\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Order!",
    "data": {
        "name": "yourdomain.id",
        "crDate": "2019-04-10T03:27:22.0Z",
        "exDate": "2020-04-10T23:59:59.0Z"
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint create new Domain in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/domain/create

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Domain name and extension you want to register.
period String Yes Domain registration period.
contact_id String Yes Contact ID that you have created e.g 2019CCT1234521.
nameserver array Yes Registered nameservers e.g [ns1.registeredns.id,ns2.registeredns.id].
currency_id String Yes Currency id e.g 1 (IDR), 2 (USD).
description String Yes Description of your register.

Response

Field Data Type Description
RegisterDomain Successfull
code Integer 200
message String Successfull Create Contact!.
data Array name : Domain name.
RegisterDomain Failed
code Integer Error Code.
message String Error message.

Renew Domain

Renew Domain :

POST /rest/v2/domain/renew

curl -X POST \
  https://api.irsfa.id/rest/v2/domain/renew \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest'
  -d '{
    "domain":"yourdomain.id",
    "period":1,
    "expirationdate":"expirationdate_your_domain",
    "currency_id":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/domain/renew",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\":\"yourdomain.id\",\n\t\"period\":1,\n\t\"expirationdate\":\"expirationdate_your_domain\",\n\t\"currency_id\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/domain/renew"

payload = "{\n\t\"domain\":\"yourdomain.id\",\n\t\"period\":1,\n\t\"expirationdate\":\"expirationdate_your_domain\",\n\t\"currency_id\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Renew Domain!",
    "data": {
        "name": "yourdomain.id",
        "exDate": "2022-04-10T23:59:59.0Z"
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint renew Domain in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/domain/renew

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Domain name and extension you want to renew.
period String Yes Domain registration period in year.
expirationdate String Yes Expiration date of domain e.g 2021-04-10.
currency_id String Yes Currency id e.g 1 (IDR), 2 (USD).

Response

Field Data Type Description
Renew Successfull
code Integer 200
message String Successfull Renew Domain!.
data Array name : Domain name.
Renew Failed
code Integer Error Code.
message String Error message.

Transfer Domain

Transfer Domain :

POST rest/v2/domain/transfer

curl -X POST \
  https://api.irsfa.id/rest/v2/domain/transfer \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain":"yourdomain.co.id",
    "auth_code":"290vzs9gjb3",
    "period":1,
    "contact_id":"2019CCT1234521",
    "nameserver":["ns1.yourns.co.id","ns2.yourns.co.id"],
    "currency_id":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/domain/transfer",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\":\"yourdomain.co.id\",\n\t\"auth_code\":\"290vzs9gjb3\",\n\t\"period\":1,\n\t\"contact_id\":\"2019CCT1234521\",\n\t\"nameserver\":[\"ns1.yourns.co.id\",\"ns2.yourns.co.id\"],\n\t\"currency_id\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/domain/transfer"

payload = "{\n\t\"domain\":\"aepsjuara.co.id\",\n\t\"auth_code\":\"290vzs9gjb3\",\n\t\"period\":1,\n\t\"contact_id\":\"2019CCT0000021\",\n\t\"nameserver\":[\"ns2.hamdan.co.id\",\"ns2.hamdans.co.id\"],\n\t\"currency_id\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Request Transfer Domain!",
    "data": {
        "name": "yourdomain.co.id",
        "trStatus": "pending",
        "reID": "H5562016-H4606103",
        "reDate": "2019-04-11T02:07:50.0Z",
        "acID": "H5562016-H4606103",
        "acDate": "2019-04-16T02:07:50.0Z",
        "exDate": "2021-03-15T00:00:00.0Z"
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint transfer Domain in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/domain/transfer

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Domain name and extension you want to transfer.
auth_code String Yes Epp/auth code of your domain.
period String Yes Domain registration period in year.
contact_id String Yes Contact ID that you have created e.g 2019CCT1234521.
nameserver array Yes Registered nameservers e.g [ns1.registeredns.id,ns2.registeredns.id].
currency_id String Yes Currency id e.g 1 (IDR), 2 (USD).

Response

Field Data Type Description
Transfer Successfull
code Integer 200
message String Successfull Create Contact!.
data Array name : Domain name.
Transfer Failed
code Integer Error Code.
message String Error message.

Restore Domain

Restore Domain :

POST /rest/v2/domain/restore

curl -X POST \
  https://api.irsfa.id/rest/v2/domain/restore \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest'
  -d '{
    "domain":"yourdomain.id"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/domain/restore",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\":\"yourdomain.id\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/domain/restore"

payload = "{\n\t\"domain\":\"yourdomain.id\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Restore Domain!",
    "data": {
        "name": "yourdomain.id",
        "exDate": "2022-04-10T23:59:59.0Z"
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint restore Domain in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/domain/restore

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Domain name and extension you want to renew.

Response

Field Data Type Description
Restore Successfull
code Integer 200
message String Successfull Restore Domain!.
data Array name : Domain name.
Renew Failed
code Integer Error Code.
message String Error message.

Toogle Domain Lock

Toogle Domain Lock :

POST /rest/v2/domain/togel/lock

curl -X POST \
  https://api.irsfa.id/rest/v2/domain/togel/lock \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain": " yourdomain.id",
    "status": "lock"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/domain/togel/lock",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\": \" yourdomain.id\",\n\t\"status\": \"lock\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/domain/togel/lock"

payload = "{\n\t\"domain\": \" yourdomain.id\",\n\t\"status\": \"lock\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Lock Domain Successfull"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint lock or unlock Domain in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/domain/togel/lock

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Domain name and extension.
status String Yes Command status lock or unlock domain.

Response

Field Data Type Description
ToogleDomainLock Successfull
code Integer 200
message String Lock/Unlock Domain Successfull.
ToogleDomainLock Failed
code Integer Error Code.
message String Error message.

Domain Info

Domain Info :

POST /rest/v2/domain/get/info

curl -X POST \
  https://api.irsfa.id/rest/v2/domain/get/info \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain":"yourdomain.co.id"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/domain/get/info",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\":\"yourdomain.co.id\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/domain/get/info"

payload = "{\n\t\"domain\":\"yourdomain.co.id\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Proccess The Request!",
    "data": {
        "domain": "yourdomain.id",
        "status_domain": "Active",
        "register_day": "2019-04-10 00:00:00",
        "expiration_day": "2022-04-10 00:00:00",
        "transfer_day": null,
        "protect": 0,
        "epp": "gX5WZpobsQBJo",
        "nameserver": "ns1.yourns.id,ns2.yourns.id",
        "registrant": "H8512132",
        "admin_contact": "H8512132",
        "tech_contact": "H8512132",
        "billing_contact": "H8512132",
        "suspend_reason": "1",
        "auto_provisioning": 1,
        "proxy_option": 0,
        "thief_protection": 0
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get Domain Info in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/domain/get/info

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Domain name and extension.

Response

Field Data Type Description
DomainInfo Successfull
code Integer 200
message String Successfull Proccess The Request!.
data array Info data your domain.
DomainInfo Failed
code Integer Error Code.
message String Error message.

Get Epp Code

Get Epp Code :

POST /rest/v2/domain/get/eppcode

curl -X POST \
  https://api.irsfa.id/rest/v2/domain/get/eppcode \
  -H 'Authorization: Bearer your_access_code' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain":"yourdomain.com"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/domain/get/eppcode",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\":\"testregisterrest2.com\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_code",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/domain/get/eppcode"

payload = "{\n\t\"domain\":\"testregisterrest2.com\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Proccess The Request!",
    "data": "T4EhE$n7TxQ"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get Domain Info in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/domain/get/eppcode

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Domain name and extension.

Response

Field Data Type Description
GetEppCode Successfull
code Integer 200
message String Successfull Proccess The Request!.
data string Your epp code/auth code domain.
GetEppCode Failed
code Integer Error Code.
message String Error message.

Domain Availability

Domain Availability :

POST /rest/v2/domain/get/availability

curl -X POST \
  https://api.irsfa.id/rest/v2/domain/check/availability \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain": "yourdomain.id"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/domain/check/availability",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\": \"yourdomain.id\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_code",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/domain/check/availability"

payload = "{\n\t\"domain\": \"yourdomain.id\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Process The Request!",
    "data": [
        {
            "domain": "yourdomain.id",
            "status": "Free",
            "is_premium": 0,
            "price": 27000
        }
        
    ]
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get Domain Info in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/domain/check/availability

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Domain name and extension you want to check.

Response

Field Data Type Description
LookUpDomain Successfull
code Integer 200
message String Successfull Proccess The Request!.
data array Data domain with tld, status free or not free (exists), if domain is premium domain is_premium = 1 otherwise is_premium = 0, and price
LookUpDomain Failed
code Integer Error Code.
message String Error message.

Upload Document Domain Terms

Upload Document Domain Terms :

POST /rest/v2/domain/upload/terms

curl -X POST \
  https://api.irsfa.id/rest/v2/domain/upload/terms \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -H 'content-type: multipart/form-data' \
  -F 'domain=yourdomain.id' \
  -F 'document_id=1' \
  -F 'document_name=KTP' \
  -F 'document_description=your KTP' \
  -F 'file= @/path/to/yourfile.jpg' \
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/domain/upload/terms",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"domain\"\r\n\r\yourdomain.id\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"document_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"document_name\"\r\n\r\nKTP\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"document_description\"\r\n\r\nyour KTP\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@/path/to/yourfile.jpg\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest",
    "content-type: multipart/form-data"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/domain/upload/terms"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"domain\"\r\n\r\yourdomain.id\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"document_id\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"document_name\"\r\n\r\nKTP\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"document_description\"\r\n\r\nyour KTP\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n@/path/to/yourfile.jpg\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token",
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Success Upload Domain Client Terms!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint upload domain document terms in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/domain/upload/terms

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Domain name and extension you want to check.
document_id Integer Yes Document Id e.g 1 (For KTP).
document_name String Yes Nameof your document.
document_description String Yes Description of your document.
file File Yes File your upload (real path file your upload).

Response

Field Data Type Description
UploadDocumentDomainTerms Successfull
code Integer 200
message String Success Upload Domain Client Terms!
UploadDocumentDomainTerms Failed
code Integer Error Code.
message String Error message.

Update Domain Nameserver

Update Domain Nameserver :

POST /rest/v2/domain/nameserver/update

curl -X POST \
  https://api.irsfa.id/rest/v2/nameserver/update \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain":"yourdomain.id",
    "nameserver":["ns1.yourns.id","ns2.yourdomain.id"]
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/domain/nameserver/update",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\":\"yourdomain.id\",\n\t\"nameserver\":[\"ns1.yourns.id\",\"ns1.yourns.id\"]\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/domain/create"

payload = "{\n\t\"domain\":\"yourdomain.id\",\n\t\"nameserver\":[\"ns1.yourns.id\",\"ns2.yourns.id\"]\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Update Nameserver!",
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint update domain nameserver in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/domain/nameserver/update

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Domain name and extension you want to register.
nameserver array Yes Registered nameservers e.g [ns1.registeredns.id,ns2.registeredns.id].

Response

Field Data Type Description
Update Successfull
code Integer 200
message String Successfull Update Nameserver!.
Update Failed
code Integer Error Code.
message String Error message.

Office365

Get Product Office365

Get Product Office365 :

GET rest/v2/office365/product

curl -X GET \
  https://api.irsfa.id/rest/v2/office365/product \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/office365/product",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/office365/product"

payload = ""
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfully Procces The Request!",
    "data": [
        {
            "product_type": "Office365",
            "product_id": "PR00053",
            "product_name": "Basic"
        },
        {
          "product_type": "Office365",
          "product_id": "PR00054",
          "product_name": "Business"
        },
        {
          "product_type": "Office365",
          "product_id": "PR00055",
          "product_name": "Business Premium"
        }
    ]
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get list product office365. Your Request must contain following information:

HTTP Request

GET https://api.irsfa.id/rest/v2/office365/product

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Response

Field Data Type Description
Get Product Office365 Successfull
code Integer 200
message String Successfully Procces The Request!.
data array Data product office365.
Get Product Office365 Failed
code Integer Error Code.
message String Error message.

Create Customer Office365

Create Customer Office365 :

POST /rest/v2/office365/customer/create

curl -X POST \
  https://api.irsfa.id/rest/v2/office365/customer/create \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "client_contact_id":"2019CCT0000001"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/office365/customer/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"client_contact_id\":\"2019CCT0000001\"\n}"
  ,
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/office365/customer/create"

payload = "{\n\t\"client_contact_id\":\"2019CCT0000001\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Create Customer!",
    "data": {
        "customer_id": "314736a5-90f4-4feb-a7a2-29fa28392211"
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint create new customer for office365 in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/office365/customer/create

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
client_contact_id String Yes Your client contact id. You can get client contact id from API contact

Response

Field Data Type Description
Create Customer Successfull
code Integer 200
message String Successfull Create Customer!.
data array customer_id : customer id office365.
Create Customer Failed
code Integer Error Code.
message String Error message.

Create Tenant Office365

Create Tenant Office365 :

POST /rest/v2/office365/tenant/create

curl -X POST \
  https://api.irsfa.id/rest/v2/office365/tenant/create \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domainprefix":"yourdomainprefix",
    "password":"yourpassword",
    "client_contact_id":"2019CCT0000001"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa/rest/v2/office365/tenant/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domainprefix\":"yourdomainprefix\",\n\t\"password\":\"yourpassword\",\n\t\"client_contact_id\":\"2019CCT0000001\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/office365/tenant/create"

payload = "{\n\t\"domainprefix\":"yourdomainprefix\",\n\t\"password\":\"yourpassword\",\n\t\"client_contact_id\":\"2019CCT0000001\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Create New Tenant Office!",
    "data": {
      "TenantId": "ece6c57d-a7ad-4c63-b35b-9aba408b6411",
      "LongRunningTaskRef": {
        "LongRunningTaskId": "ece6c57d-a7ad-4c63-b35b-9aba408b6411",
        "Url": "/api/v2/longrunningtasks/ece6c57d-a7ad-4c63-b35b-9aba408b6411"
      }
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint create new tenant for office365 in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/office365/tenant/create

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domainprefix String Yes The domain prefix.
password String Yes Your password. Password must be between 8 and 12 characters, contain at least 2 non alphanumeric characters, an uppercase character, and a number
client_contact_id String Yes Your client contact id. You can get client contact id from API contact.

Response

Field Data Type Description
Create Tenant Successfull
code Integer 200
message String Successfull Create New Tenant Office!.
data Array Detail data tenant.
Create Tenant Failed
code Integer Error Code.
message String Error message.

Create Agreement Office365

Create Agreement Office365 :

POST /rest/v2/office365/agreement/create

curl -X POST \
  https://api.irsfa.id/rest/v2/office365/agreement/create \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "tenant_id":"ece6c57d-a7ad-4c63-b35b-9aba408b6411",
    "email":"yourmailname@domain.tld",
    "first_name":"yourfirstname",
    "last_name":"yourlastname",
    "phone_number":"+628041808808"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/office365/agreement/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"tenant_id\":"ece6c57d-a7ad-4c63-b35b-9aba408b641\",\n\t\"email\":\"yourmailname@domain.tld\",\n\t\"first_name\":\"yourfirstname\",\n\t\"last_name\":\"yourlastname\",\n\t\"phone_number\":\"+628041808808\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/office365/agreement/create"

payload = "{\n\t\"tenant_id\":"ece6c57d-a7ad-4c63-b35b-9aba408b641\",\n\t\"email\":\"yourmailname@domain.tld\",\n\t\"first_name\":\"yourfirstname\",\n\t\"last_name\":\"yourlastname\",\n\t\"phone_number\":\"+628041808808\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Signing Microsoft CSP Microsoft Customer Agreement has been processing!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint create agreement office365 in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/office365/agreement/create

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
tenant_id String Yes Your tenant id.
email String Yes Your valid email.
first_name String Yes First of your name e.g Jhon.
last_name String Yes Last of your name e.g Doe.
phone_number String Yes Your valid telephone number e.g +6282111111111.

Response

Field Data Type Description
Create Agreement Successfull
code Integer 200
message String Signing Microsoft CSP Microsoft Customer Agreement has been processing!
Create Agreement Failed
code Integer Error Code.
message String Error message.

Order Office365

Order Office365 :

POST /rest/v2/office365/order

curl -X POST \
  https://api.irsfa.id/rest/v2/office365/order \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "product_id":"PR00053",
    "contact_id":"2019CCT0000001",
    "tenant_id":"ece6c57d-a7ad-4c63-b35b-9aba408b6411"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/office365/order",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"product_id\":"PR00053\",\n\t\"contact_id\":\"2019CCT0000001\",\n\t\"tenant_id\":\"ece6c57d-a7ad-4c63-b35b-9aba408b6411\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/office365/order"

payload = "{\n\t\"product_id\":"PR00053\",\n\t\"contact_id\":\"2019CCT0000001\",\n\t\"tenant_id\":\"ece6c57d-a7ad-4c63-b35b-9aba408b6411\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Order Office 365!",
    "data": {
      "TenantId": "ece6c57d-a7ad-4c63-b35b-9aba408b6411",
      "OrderId": "828fb80f-4c2d-4fdd-a12b-19dc9638b811",
      "LongRunningTaskRef": {
        "LongRunningTaskId": "828fb80f-4c2d-4fdd-a12b-19dc9638b811",
        "Url": "/api/v2/longrunningtasks/828fb80f-4c2d-4fdd-a12b-19dc9638b811"
      },
      "Office365ClientId": "0x11e02d0beb4ebf436811d16061e40ef3"
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint order office365 in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/office365/order

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
product_id String Yes Id product office365.
client_contact_id String Yes Your client contact id. You can get client contact id from API contact
tenant_id String Yes Your tenant id.

Response

Field Data Type Description
Order Office365 Successfull
code Integer 200
message String Successfull Order Office 365!
data Array Detail order office365 info.
Order Office365 Failed
code Integer Error Code.
message String Error message.

Get Detail Office365

Get Detail Office365 :

POST rest/v2/office365/detail

curl -X POST \
  https://api.irsfa.id/rest/v2/office365/detail \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "office365_client_id":"0x11e02d0beb4ebf436811d16061e40ef3"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/office365/detail",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"office365_client_id\":\"0x11e02d0beb4ebf436811d16061e40ef3\"\n}"
  ,
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/office365/detail"

payload = "{\n\t\"office365_client_id\":\"0x11e02d0beb4ebf436811d16061e40ef3\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfully Procces The Request!",
    "data": [
        {
            "office365_client_id": "0x11e02d0beb4ebf436811d16061e40ef3",
            "product_id": "PR00053",
            "productid_office": "bd938f12-058f-4927-bba3-ae36b1d25011",
            "product_name": "Microsoft 365 Business Basic",
            "customer_id": "6a4a2e3f-79de-4971-a18e-aa3b14a04011",
            "customer_name": "Customer Name",
            "tenant_id": "41f72f7a-ef2c-4e26-a356-5a3cff7a3a11",
            "contract_id": "a9aa36fc-a411-e611-8106-3863bb2e9d11",
            "subscription_id": "12ce9539-e3c7-40e4-95e8-c8ee7564f911",
            "status": "Active",
            "next_renewal_date": "2022-10-15 07:00:00",
            "billing_cycle": "Monthly",
            "billing_cycle_duration": 1,
            "created_at": 2021-10-13 08:13:08
        }
    ]
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get detail office365. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/office365/detail

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
office365_client_id String Yes Your order office365 client id. You can get office365 client id from API order office365

Response

Field Data Type Description
Get Detail Office365 Successfull
code Integer 200
message String Successfully Procces The Request!.
data array Detail your office365 service.
Get Detail Office365 Failed
code Integer Error Code.
message String Error message.

Suspend Subscription Office365

Suspend Subscription Office365 :

POST /rest/v2/office365/suspend/subscription

curl -X POST \
  https://api.irsfa.id/rest/v2/office365/suspend/subscription \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "subscription_id":"12ce9539-e3c7-40e4-95e8-c8ee7564f911"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/office365/suspend/subscription",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"subscription_id\":\"12ce9539-e3c7-40e4-95e8-c8ee7564f911\"\n}"
  ,
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/office365/suspend/subscription"

payload = "{\n\t\"subscription_id\":\"12ce9539-e3c7-40e4-95e8-c8ee7564f911\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Suspend Subscription!",
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint suspend subscription office365 in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/office365/suspend/subscription

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
subscription_id String Yes Your subscription_id office365

Response

Field Data Type Description
Suspend Subscription Successfull
code Integer 200
message String Successfull Suspend Subscription!.
Suspend Subscription Failed
code Integer Error Code.
message String Error message.

Unsuspend Subscription Office365

Unsuspend Subscription Office365 :

POST /rest/v2/office365/unsuspend/subscription

curl -X POST \
  https://api.irsfa.id/rest/v2/office365/suspend/unsubscription \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "subscription_id":"12ce9539-e3c7-40e4-95e8-c8ee7564f911"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/office365/unsuspend/subscription",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"subscription_id\":\"12ce9539-e3c7-40e4-95e8-c8ee7564f911\"\n}"
  ,
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/office365/unsuspend/subscription"

payload = "{\n\t\"subscription_id\":\"12ce9539-e3c7-40e4-95e8-c8ee7564f911\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Unsuspend Subscription!",
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint unsuspend subscription office365 in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/office365/unsuspend/subscription

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
subscription_id String Yes Your subscription_id office365

Response

Field Data Type Description
Unsuspend Subscription Successfull
code Integer 200
message String Successfull Unsuspend Subscription!.
Unsuspend Subscription Failed
code Integer Error Code.
message String Error message.

Hosting

Get Hosting Product

Get Hosting Product :

GET rest/v2/hosting/product

curl -X GET \
  https://api.irsfa.id/rest/v2/hosting/product \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/hosting/product",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/hosting/product"

payload = ""
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfully Procces The Request!",
    "data": [
        {
          "product_type": "Hosting",
          "product_id": "PR00072",
          "product_name": "Value Hybrid Performance 1 (DA)",
          "panel": "directadmin"
        },
        {
          "product_type": "Hosting",
          "product_id": "PR00073",
          "product_name": "Value Hybrid Performance 2 (DA)",
          "panel": "directadmin"
        },
        {
          "product_type": "Hosting",
          "product_id": "PR00074",
          "product_name": "Value Hybrid Performance 3 (DA)",
          "panel": "directadmin"
        },
        {
          "product_type": "Hosting",
          "product_id": "PR00075",
          "product_name": "Value Hybrid Performance 4 (DA)",
          "panel": "directadmin"
        },
        {
          "product_type": "Hosting",
          "product_id": "PR00076",
          "product_name": "Value Hybrid Performance 1 (Cpanel)",
          "panel": "cpanel"
        },
        {
          "product_type": "Hosting",
          "product_id": "PR00077",
          "product_name": "Value Hybrid Performance 2 (Cpanel)",
          "panel": "cpanel"
        },
        {
          "product_type": "Hosting",
          "product_id": "PR00078",
          "product_name": "Value Hybrid Performance 3 (Cpanel)",
          "panel": "cpanel"
        },
        {
          "product_type": "Hosting",
          "product_id": "PR00079",
          "product_name": "Value Hybrid Performance 4 (Cpanel)",
          "panel": "cpanel"
        }
    ]
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get list product hosting. Your Request must contain following information:

HTTP Request

GET https://api.irsfa.id/rest/v2/hosting/product

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Response

Field Data Type Description
Get Product Hosting Successfull
code Integer 200
message String Successfully Procces The Request!.
data array Data product hosting.
Get Product Hosting Failed
code Integer Error Code.
message String Error message.

Create Hosting

Create Hosting :

POST /rest/v2/hosting/create

curl -X POST \
  https://api.irsfa.id/rest/v2/hosting/create \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "product_id":"PR00072",
    "domain":"yourdomainname.tld",
    "username":"yourusername",
    "email":"youremail@domain.tld,
    "password":"yourpassword",
    "period":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa/rest/v2/hosting/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"product_id\":"PR00072\",\n\t\"domain\":\"yourdomainname.tld\",\n\t\"username\":\"yourusername\",\n\t\"email\":\"youremail@domain.tld\",\n\t\"password\":\"yourpassword\",\n\t\"period\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/hosting/create"

payload = "{\n\t\"product_id\":"PR00072\",\n\t\"domain\":\"yourdomainname.tld\",\n\t\"username\":\"yourusername\",\n\t\"email\":\"youremail@domain.tld\",\n\t\"password\":\"yourpassword\",\n\t\"period\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Create Hosting!",
    "data": {
      "serviceID": 1,
      "username": "yourusername",
      "password": "yourpassword"
      "ip": "103.28.12.111",
      "nameserver1": "dnsiix1.domainname.net",
      "nameserver2": "dnsiix2.domainname.net",
      "nameserver3": "dnsiix3.domainname.net",
      "nameserver4": "dnsiix4.domainname.net"
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint create new order hosting. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/hosting/create

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
product_id String Yes Id product hosting.
domain String Yes Your domain name (yourdomainname.tld).
username String Yes Your username is alphanumeric string
email String Yes Your valid email.
password String Yes Your password. Password must be between 8 and 12 characters, contain at least 2 non alphanumeric characters, an uppercase character, and a number
period Integer Yes Hosting registration period. The period in Monthly e.g 1 (1 Month)

Response

Field Data Type Description
Create Hosting Successfull
code Integer 200
message String Successfull Create Hosting!.
data Array Detail order hosting info.
Create Hosting Failed
code Integer Error Code.
message String Error message.

Get Hosting Detail

Get Hosting Detail :

POST rest/v2/hosting/detail

curl -X POST \
  https://api.irsfa.id/rest/v2/hosting/detail \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "serviceID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/hosting/detail",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"serviceID\":1\n}"
  ,
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/hosting/detail"

payload = "{\n\t\"serviceID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfully Procces The Request!",
    "data": [
        {
            "serviceID": 1,
            "server_id": 2,
            "product_id": "PR00053",
            "username": "yourusername",
            "product_name": "Value Hybrid Performance 1 (DA)",
            "domain": "yourdomainname.tld,
            "termin": "month",
            "period": 1,
            "expired": "2022-02-06",
            "status": 1,
            "created_at": 2022-01-06 13:59:55,
            "created_at": 2022-01-06 13:59:55,
            "ip": popcorn5.fastcloud.id
        }
    ]
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get detail hosting. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/hosting/detail

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
serviceID Integer Yes Your order serviceID. You can get serviceID from API create hosting

Response

Field Data Type Description
Get Hosting Detail Successfull
code Integer 200
message String Successfully Procces The Request!.
data array Detail your hosting service.
Get Hosting Detail Failed
code Integer Error Code.
message String Error message.

Suspend Hosting

Suspend Hosting :

POST /rest/v2/hosting/suspend

curl -X POST \
  https://api.irsfa.id/rest/v2/hosting/suspend \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "serviceID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/hosting/suspend",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"serviceID\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/hosting/suspend"

payload = "{\n\t\"serviceID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Suspend Hosting!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint suspend hosting in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/hosting/suspend

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
serviceID Integer Yes Your order serviceID. You can get serviceID from API create hosting

Response

Field Data Type Description
Suspend Hosting Successfull
code Integer 200
message String Successfull Suspend Hosting!.
Suspend Hosting Failed
code Integer Error Code.
message String Error message.

Unsuspend Hosting

Unsuspend Hosting :

POST /rest/v2/hosting/unsuspend

curl -X POST \
  https://api.irsfa.id/rest/v2/hosting/unsuspend \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "serviceID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/hosting/unsuspend",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"serviceID\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/hosting/unsuspend"

payload = "{\n\t\"serviceID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Unsuspend Hosting!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint unsuspend hosting in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/hosting/unsuspend

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
serviceID Integer Yes Your order serviceID. You can get serviceID from API create hosting

Response

Field Data Type Description
Unsuspend Hosting Successfull
code Integer 200
message String Successfull Unsuspend Hosting!.
Unsuspend Hosting Failed
code Integer Error Code.
message String Error message.

Change Password Hosting

Change password Hosting :

POST /rest/v2/hosting/change-password

curl -X POST \
  https://api.irsfa.id/rest/v2/hosting/change-password \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "serviceID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/hosting/change-password",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"serviceID\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/hosting/change-password"

payload = "{\n\t\"serviceID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Change Password Hosting!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint change password hosting in your account. Your Request must contain following information:

HTTP Request

PUT https://api.irsfa.id/rest/v2/hosting/change-password

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
serviceID Integer Yes Your order serviceID. You can get serviceID from API create hosting
password String Yes Your New Password

Response

Field Data Type Description
Change Password Successfull
code Integer 200
message String Successfull Change Password Hosting!.
Change Password Failed
code Integer Error Code.
message String Error message.

VPS

Get VPS Product

Get VPS Product :

GET rest/v2/vps/product

curl -X GET \
  https://api.irsfa.id/rest/v2/vps/product \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/vps/product",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/product"

payload = ""
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfully Procces The Request!",
    "data": [
        {
          "product_type": "VPS",
          "product_id": "PR00067",
          "product_name": "Cloud VPS KVM SC1"
        },
        {
          "product_type": "VPS",
          "product_id": "PR00068",
          "product_name": "Cloud VPS KVM SC2"
        },
        {
          "product_type": "VPS",
          "product_id": "PR00069",
          "product_name": "Cloud VPS KVM SC4"
        },
        {
          "product_type": "VPS",
          "product_id": "PR00070",
          "product_name": "Cloud VPS KVM SC8"
        },
        {
          "product_type": "VPS",
          "product_id": "PR00071",
          "product_name": "Cloud VPS KVM SC16"
        }
    ]
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get list product vps. Your Request must contain following information:

HTTP Request

GET https://api.irsfa.id/rest/v2/vps/product

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Response

Field Data Type Description
Get Product VPS Successfull
code Integer 200
message String Successfully Procces The Request!.
data array Data product VPS.
Get Product VPS Failed
code Integer Error Code.
message String Error message.

Get Operating System (OS) VPS

Get Operating System (OS) VPS :

GET rest/v2/vps/os-list

curl -X GET \
  https://api.irsfa.id/rest/v2/vps/os-list \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/vps/os-list",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/os-list"

payload = ""
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfully Procces The Request!",
    "data": [
        {
          "osid": "812",
          "osname": "ubuntu-18.04-x86_64"
        },
        {
          "osid": "883",
          "osname": "centos-7.7-x86_64"
        },
        {
          "osid": "895",
          "osname": "centos-8-x86_64"
        },
        {
          "osid": "889",
          "osname": "ubuntu-19.04-x86_64"
        },
        {
          "osid": "909",
          "osname": "ubuntu-20.04-x86_64"
        },
        {
          "osid": "914",
          "osname": "fedora-30-x86_64"
        },
        {
          "osid": "979",
          "osname": "debian-11-x86_64"
        },
        {
          "osid": "878",
          "osname": "debian-10-x86_64"
        }
    ]
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get list operating system (OS) VPS. Your Request must contain following information:

HTTP Request

GET https://api.irsfa.id/rest/v2/vps/os-list

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Response

Field Data Type Description
Get OS VPS Successfull
code Integer 200
message String Successfully Procces The Request!.
data array Data OS VPS.
Get OS VPS Failed
code Integer Error Code.
message String Error message.

Create VPS

Create VPS :

POST /rest/v2/vps/create

curl -X POST \
  https://api.irsfa.id/rest/v2/vps/create \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "product_id":"PR00067",
    "rootpass":"yourpassword",
    "osid":883,
    "hostname":"yourdomainname.tld",
    "period":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa/rest/v2/vps/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"product_id\":"PR00067\",\n\t\"rootpass\":\"yourpassword\",\n\t\"osid\":883,\n\t\"hostname\":\"yourdomainname.tld",\n\t\"period\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/create"

payload = "{\n\t\"product_id\":"PR00067\",\n\t\"rootpass\":\"yourpassword\",\n\t\"osid\":883,\n\t\"hostname\":\"yourdomainname.tld",\n\t\"period\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Create VPS!",
    "data": {
      "serviceID": 1,
      "vpsID": "860"
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint create new order vps. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/vps/create

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
product_id String Yes Id product vps.
rootpass String Yes Your password root. Password must be between 8 and 12 characters, contain at least 2 non alphanumeric characters, an uppercase character, and a number
osid Integer Yes Select the operating system to use
hostname String Yes Your valid hostname.
period Integer Yes Hosting registration period. The period in Monthly e.g 1 (1 Month)

Response

Field Data Type Description
Create VPS Successfull
code Integer 200
message String Successfull Create VPS!.
data Array Detail order vps info.
Create VPS Failed
code Integer Error Code.
message String Error message.

Get VPS Detail

Get VPS Detail :

POST rest/v2/vps/detail

curl -X POST \
  https://api.irsfa.id/rest/v2/vps/detail \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "serviceID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/vps/detail",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"serviceID\":1\n}"
  ,
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/detail"

payload = "{\n\t\"serviceID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfully Procces The Request!",
    "data": [
        {
            "serviceID": 1,
            "vpsID": 860,
            "product_id": "PR00067",
            "product_name": "Cloud VPS KVM SC1",
            "hostname": "yourdomainname.tld",
            "os": "centos-7.7-x86_64",
            "termin": "month",
            "period": 1,
            "expired": "2022-01-08 13:14:24",
            "status": "Active",
            "power": "ON/Start"
        }
    ]
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get detail vps. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/vps/detail

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
serviceID Integer Yes Your order serviceID. You can get serviceID from API create VPS

Response

Field Data Type Description

Start VPS

Start VPS :

POST /rest/v2/vps/start

curl -X POST \
  https://api.irsfa.id/rest/v2/vps/start \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "vpsID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/vps/start",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"vpsID\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/start"

payload = "{\n\t\"vpsID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "VPS has been started successfully!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint start vps in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/vps/start

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
vpsID Integer Yes Your order vpsID. You can get vpsID from API create vps

Response

Field Data Type Description
Start VPS Successfull
code Integer 200
message String VPS has been started successfully!.
Start VPS Failed
code Integer Error Code.
message String Error message.

Stop VPS

Stop VPS :

POST /rest/v2/vps/stop

curl -X POST \
  https://api.irsfa.id/rest/v2/vps/stop \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "vpsID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/vps/stop",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"vpsID\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/stop"

payload = "{\n\t\"vpsID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "VPS has been stopped successfully!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint stop vps in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/vps/stop

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
vpsID Integer Yes Your order vpsID. You can get vpsID from API create vps

Response

Field Data Type Description
Stop VPS Successfull
code Integer 200
message String VPS has been stopped successfully!.
Stop VPS Failed
code Integer Error Code.
message String Error message.

Restart VPS

Restart VPS :

POST /rest/v2/vps/restart

curl -X POST \
  https://api.irsfa.id/rest/v2/vps/restart \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "vpsID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/vps/restart",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"vpsID\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/restart"

payload = "{\n\t\"vpsID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Restart signal has been sent to the VPS"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint restart vps in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/vps/restart

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
vpsID Integer Yes Your order vpsID. You can get vpsID from API create vps

Response

Field Data Type Description
Restart VPS Successfull
code Integer 200
message String Restart signal has been sent to the VPS!.
Restart VPS Failed
code Integer Error Code.
message String Error message.

Poweroff VPS

Poweroff VPS :

POST /rest/v2/vps/poweroff

curl -X POST \
  https://api.irsfa.id/rest/v2/vps/poweroff \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "vpsID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/vps/poweroff",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"vpsID\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/poweroff"

payload = "{\n\t\"vpsID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "VPS has been powered off successfully!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint poweroff vps in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/vps/poweroff

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
vpsID Integer Yes Your order vpsID. You can get vpsID from API create vps

Response

Field Data Type Description
Poweroff VPS Successfull
code Integer 200
message String VPS has been powered off successfully!.
Poweroff VPS Failed
code Integer Error Code.
message String Error message.

Suspend VPS

Suspend VPS :

POST /rest/v2/vps/suspend

curl -X POST \
  https://api.irsfa.id/rest/v2/vps/suspend \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "vpsID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/vps/suspend",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"vpsID\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/suspend"

payload = "{\n\t\"vpsID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "VPS Suspended!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint suspend vps in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/vps/suspend

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
vpsID Integer Yes Your order vpsID. You can get vpsID from API create vps

Response

Field Data Type Description
Suspend VPS Successfull
code Integer 200
message String VPS Suspended!.
Suspend VPS Failed
code Integer Error Code.
message String Error message.

Unsuspend VPS

Unsuspend VPS :

POST /rest/v2/vps/unsuspend

curl -X POST \
  https://api.irsfa.id/rest/v2/vps/unsuspend \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "vpsID":1
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/vps/unsuspend",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"vpsID\":1\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/unsuspend"

payload = "{\n\t\"vpsID\":1\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "VPS Unsuspended!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint unsuspend vps in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/vps/unsuspend

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
vpsID Integer Yes Your order vpsID. You can get vpsID from API create vps

Response

Field Data Type Description
Unsuspend VPS Successfull
code Integer 200
message String VPS Unsuspended!.
Unsuspend VPS Failed
code Integer Error Code.
message String Error message.

Rebuild VPS

Rebuild VPS :

POST /rest/v2/vps/rebuild

curl -X POST \
  https://api.irsfa.id/rest/v2/vps/rebuild \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "vpsID" : 1,
    "osid"  : 883,
    "newpass" : "yourpassword",
    "confirmation_new_pass" : "yourpassword"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/vps/rebuild",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"vpsID\":1,\n\t\"osid\":883,\n\t\"newpass\":\"yourpassword\",\n\t\"confirmation_new_pass\":\"yourpassword\",\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/vps/rebuild"

payload = "{\n\t\"vpsID\":1,\n\t\"osid\":883,\n\t\"newpass\":\"yourpassword\",\n\t\"confirmation_new_pass\":\"yourpassword\",\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfully rebuild VPS!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint rebuild vps in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/vps/rebuild

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
vpsID Integer Yes Your order vpsID. You can get vpsID from API create vps
osid Integer Yes Your osid VPS
newpass String Yes Your new password. Password must be between 8 and 12 characters, contain at least 2 non alphanumeric characters, an uppercase character, and a number
confirmation_new_pass String Yes Your new password. Password must be between 8 and 12 characters, contain at least 2 non alphanumeric characters, an uppercase character, and a number

Response

Field Data Type Description
Rebuild VPS Successfull
code Integer 200
message String Successfully rebuild VPS!.
Rebuild VPS Failed
code Integer Error Code.
message String Error message.

Child Nameserver

Register Child Nameserver

Register Child Nameserver :

POST /rest/v2/child/nameserver/create

curl -X POST \
  https://api.irsfa.id/rest/v2/child/nameserver/create \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "name":"ns1.yourdomain.co.id",
    "ip":"89.255.0.13",
    "ip6":"2a01:4f8:200:73ab::172"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/child/nameserver/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"name\":\"ns1.yourdomain.co.id\",\n\t\"ip\":\"89.255.0.13\",\n\t\"ip6\":\"2a01:4f8:200:73ab::172\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/child/nameserver/create"

payload = "{\n\t\"name\":\"ns1.yourdomain.co.id\",\n\t\"ip\":\"89.255.0.13\",\n\t\"ip6\":\"2a01:4f8:200:73ab::172\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Create Nameserver!",
    "data": {
        "name": "ns1.yourdomain.co.id",
        "crDate": "2019-04-11T00:00:00.0Z"
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint create child nameserver in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/child/nameserver/create

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
name String Yes Name of your nameserver e.g ns1.yourdomain.co.id.
ip String Yes Valid ip4.
ip6 String No Valid ip6.

Response

Field Data Type Description
RegisterChildNameserver Successfull
code Integer 200
message String Successfull Create Nameserver!.
data array name : name of nameserver.
RegisterChildNameserver Failed
code Integer Error Code.
message String Error message.

Update Child Nameserver

Update Child Nameserver :

PUT /rest/v2/child/nameserver/update

curl -X PUT \
  https://api.irsfa.id/rest/v2/child/nameserver/update \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "nameserver_id":9,
    "ip":"66.255.0.57",
    "ip6":"2a00:1450:4009:809::1001"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa/rest/v2/child/nameserver/update",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\n\t\"nameserver_id\":9,\n\t\"ip\":\"66.255.0.57\",\n\t\"ip6\":\"2a00:1450:4009:809::1001\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/child/nameserver/update"

payload = "{\n\t\"nameserver_id\":9,\n\t\"ip\":\"66.255.0.57\",\n\t\"ip6\":\"2a00:1450:4009:809::1001\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("PUT", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfull Update Nameserver!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint update child nameserver in your account. Your Request must contain following information:

HTTP Request

PUT https://api.irsfa.id/rest/v2/child/nameserver/update

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
nameserver_id String Yes The nameserver id that you want to update.
ip String Yes Valid ip4 that you want to update.
ip6 String No Valid ip6 that you want to update.

Response

Field Data Type Description
UpdateChildNameserver Successfull
code Integer 200
message String Successfull Update Nameserver!.
UpdateChildNameserver Failed
code Integer Error Code.
message String Error message.

Delete Child Nameserver

Delete Child Nameserver :

DELETE /rest/v2/child/nameserver/delete

curl -X DELETE \
  https://api.irsfa.id/rest/v2/child/nameserver/delete \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "nameserver_id":9
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/child/nameserver/delete",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "{\n\t\"nameserver_id\":9\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/child/nameserver/delete"

payload = "{\n\t\"nameserver_id\":9\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("DELETE", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successfully Delete Nameserver!"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint delete child nameserver in your account. Your Request must contain following information:

HTTP Request

PUT https://api.irsfa.id/rest/v2/child/nameserver/delete

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
nameserver_id String Yes The nameserver id that you want to delete.

Response

Field Data Type Description
DeleteChildNameserver Successfull
code Integer 200
message String Successfully Delete Nameserver!.
DeleteChildNameserver Failed
code Integer Error Code.
message String Error message.

DNS Manager

Create DNS Manager

Create DNS Manager :

POST /rest/v2/dnsmanagerv2/create

curl -X POST \
  https://api.irsfa.id/rest/v2/dnsmanagerv2/create \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain":"domaintest.web.id",
  "ip" : "123.123.123.123"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/dnsmanagerv2/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\":\"domaintest.web.id\", \"ip\" : \"123.123.123.123\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/dnsmanagerv2/create"

payload = "{\n\t\"domain\":\"domaintest.web.id\", \"ip\" : \"123.123.123.123\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "data": {
        "result": [
            {
                "statusmsg": "Added example.or.id ok belonging to user system",
                "status": 1
            }
        ]
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "data": "Error Message"
}

This endpoint create dns manager in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/dnsmanagerv2/create

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Your domain name e.g domaintest.web.id.
ip String Yes Your ip address e.g 123.123.123.123.

Response

Field Data Type Description
CreateDNSManager Successfull
code Integer 200
data array Success message.
CreateDNSManager Failed
code Integer Error Code.
data String Error message.

Add Record DNS Manager

Add record DNS Manager :

POST /rest/v2/dnsmanagerv2/add

curl -X POST \
  https://api.irsfa.id//rest/v2/dnsmanagerv2/add \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain":"domaintest.web.id",
    "name":"sftp",
  "class":"IN",
    "type":"A",
    "ttl":6400,
    "values":{
        "address" : "192.168.0.20"
    }
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/dnsmanagerv2/add",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n\t\"domain\":\"example.com\",\r\n\t\"name\":\"wow\",\r\n\t\"class\":\"IN\",\r\n\t\"ttl\":\"86400\",\r\n\t\"type\":\"A\",\r\n\t\"values\": {\r\n\t\t\"address\" : \"192.168.0.20\"\r\n\t}\r\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/dnsmanagerv2/add"

payload = "{\r\n\t\"domain\":\"example.com\",\r\n\t\"name\":\"wow\",\r\n\t\"class\":\"IN\",\r\n\t\"ttl\":\"86400\",\r\n\t\"type\":\"A\",\r\n\t\"values\": {\r\n\t\t\"address\" : \"192.168.0.20\"\r\n\t}\r\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "data": "Success Message",
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "data": "Error Message"
}

This endpoint add record dns manager in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/dnsmanagerv2/add

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes Your domain name e.g domaintest.web.id.
name String Yes name of record that you want to add.
class String Yes class of record that you want to add.
type String Yes type of record that you want to add.
ttl Integer Yes time of record to live that you want to add.
values String Yes value of record to live that you want to add.

Response

Field Data Type Description
AddRecordDNSManager Successfull
code Integer 200
message String Success Message.
AddRecordDNSManager Failed
code Integer Error Code.
message String Error message.

Update DNS Manager

Update DNS Manager :

POST /rest/v2/dnsmanagerv2/update

curl -X POST \
  https://api.irsfa.id/rest/v2/dnsmanagerv2/update \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain":"example.com",
    "line":15,
    "name":"example.com.",
    "class":"IN",
    "ttl":"86400",
    "type":"A",
    "values": {
        "address" : "192.168.0.20"
    }
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa/rest/v2/dnsmanagerv2/update",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
   CURLOPT_POSTFIELDS => "{\r\n\t\"domain\":\"example.com\",\r\n\t\"line\":15,\r\n\t\"name\":\"example.com.\",\r\n\t\"class\":\"IN\",\r\n\t\"ttl\":\"86400\",\r\n\t\"type\":\"A\",\r\n\t\"values\": {\r\n\t\t\"address\" : \"192.168.0.20\"\r\n\t}\r\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/dnsmanagerv2/update"

payload = "{\r\n\t\"domain\":\"example.com\",\r\n\t\"line\":15,\r\n\t\"name\":\"example.com.\",\r\n\t\"class\":\"IN\",\r\n\t\"ttl\":\"86400\",\r\n\t\"type\":\"A\",\r\n\t\"values\": {\r\n\t\t\"address\" : \"192.168.0.20\"\r\n\t}\r\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "data": "Success Message"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "data": "Error Message"
}

This endpoint update record dns manager in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/dnsmanagerv2/update

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain Integer Yes domain that you want to update.
line Integer Yes line id that you want to update.
name String Yes name of record that you want to update.
class String Yes class of record that you want to update.
type String Yes type of record that you want to update.
ttl Integer Yes time of record to live that you want to update.
value String Yes value of record to live that you want to update.

Response

Field Data Type Description
UpdateDNSManager Successfull
code Integer 200
data String Success message!.
UpdateDNSManager Failed
code Integer Error Code.
data String Error message.

Delete DNS Manager

Delete DNS Manager :

POST /rest/v2/dnsmanagerv2/delete

curl -X POST \
  https://api.irsfa.id/rest/v2/dnsmanagerv2/delete \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "line":7,
  "domain":"example.com"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/dnsmanagerv2/delete",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\r\n\t\"line\":21,\r\n\t\"domain\":\"example.com\"\r\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/dnsmanagerv2/delete"

payload = "{\r\n\t\"line\":21,\r\n\t\"domain\":\"example.com\"\r\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Success Message"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint delete dns manager record in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/dnsmanagerv2/delete

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
line Integer Yes The dns manager record id that you want to delete.
domain String Yes Domain that you want to delete.

Response

Field Data Type Description
DeleteDNSManager Successfull
code Integer 200
message String Successful message.
DeleteDNSManager Failed
code Integer Error Code.
message String Error message.

Terminate DNS Manager

Terminate DNS Manager :

POST /rest/v2/dnsmanagerv2/terminate

curl -X POST \
  https://api.irsfa.id/rest/v2/dnsmanagerv2/terminate \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain":"domaintest.web.id"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/dnsmanagerv2/terminate",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\":\"domaintest.web.id\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/dnsmanagerv2/terminate"

payload = "{\n\t\"domain\":\"domaintest.web.id\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "message": "Successful Message"
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint terminate all dns record in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/dnsmanagerv2/terminate

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes The domain of dns record that you want to terminate.

Response

Field Data Type Description
TerminateDNSManager Successfull
code Integer 200
message String Successful Message.
TerminateDNSManager Failed
code Integer Error Code.
message String Error message.

List DNS Manager

List DNS Manager :

POST /rest/v2/dnsmanagerv2/list

curl -X POST \
  https://api.irsfa.id/rest/v2/dnsmanagerv2/list \
  -H 'Authorization: Bearer your_access_token' \
  -H 'Content-Type: application/json' \
  -H 'X-Requested-With: XMLHttpRequest' \
  -d '{
    "domain":"domaintest.web.id"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.irsfa.id/rest/v2/dnsmanagerv2/list",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"domain\":\"domaintest.web.id\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer your_access_token",
    "Content-Type: application/json",
    "X-Requested-With: XMLHttpRequest"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
import requests

url = "https://api.irsfa.id/rest/v2/dnsmanagerv2/list"

payload = "{\n\t\"domain\":\"domaintest.web.id\"\n}"
headers = {
    'Content-Type': "application/json",
    'X-Requested-With': "XMLHttpRequest",
    'Authorization': "Bearer your_access_token"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

The above command returns Success JSON structured like this:

{
    "code": 200,
    "data": {
        "metadata": {
            "result": 1,
            "command": "dumpzone",
            "version": 1,
            "reason": "Zone Serialized"
        },
        "data": {
            "zone": [
                {
                    "record": [
                        {
                            "raw": "; cPanel first:84.0.18 (update_time):1577088187 84.0.18: Cpanel::ZoneFile::VERSION:1.3 hostname:armadillo2.privatens.id latest:84.0.18",
                            "ttl": "86400",
                            "Line": 1,
                            "type": ":RAW"
                        },
                        {
                            "raw": "; Zone file for example.or.id",
                            "Line": 2,
                            "ttl": "86400",
                            "type": ":RAW"
                        },
                        {
                            "ttl": "14400",
                            "Line": 3,
                            "type": "$TTL"
                        },
                        {
                            "serial": "2019122301",
                            "Lines": 6,
                            "minimum": "86400",
                            "retry": "1800",
                            "Line": 4,
                            "class": "IN",
                            "name": "example.or.id.",
                            "ttl": "86400",
                            "mname": "armadillo.privatens.id",
                            "refresh": "3600",
                            "type": "SOA",
                            "rname": "teknis.examples.co.id",
                            "expire": "1209600"
                        },
                        {
                            "ttl": "86400",
                            "Line": 10,
                            "raw": "",
                            "type": ":RAW"
                        },
                        {
                            "class": "IN",
                            "ttl": "86400",
                            "Line": 11,
                            "name": "example.or.id.",
                            "nsdname": "armadillo.privatens.id",
                            "type": "NS"
                        },
                        {
                            "Line": 12,
                            "ttl": "86400",
                            "name": "example.or.id.",
                            "class": "IN",
                            "type": "NS",
                            "nsdname": "crocodile.privatens.id"
                        },
                        {
                            "ttl": "86400",
                            "Line": 13,
                            "raw": "",
                            "type": ":RAW"
                        },
                        {
                            "type": ":RAW",
                            "raw": "",
                            "Line": 14,
                            "ttl": "86400"
                        },
                        {
                            "Line": 15,
                            "ttl": "14400",
                            "name": "example.or.id.",
                            "class": "IN",
                            "address": "123.123.123.123",
                            "type": "A"
                        },
                        {
                            "raw": "",
                            "Line": 16,
                            "ttl": "86400",
                            "type": ":RAW"
                        },
                        {
                            "ttl": "14400",
                            "name": "example.or.id.",
                            "Line": 17,
                            "class": "IN",
                            "preference": "0",
                            "exchange": "example.or.id",
                            "type": "MX"
                        },
                        {
                            "raw": "",
                            "Line": 18,
                            "ttl": "86400",
                            "type": ":RAW"
                        },
                        {
                            "Line": 19,
                            "type": "CNAME",
                            "name": "mail.example.or.id.",
                            "ttl": "14400",
                            "class": "IN",
                            "cname": "example.or.id"
                        },
                        {
                            "name": "www.example.or.id.",
                            "ttl": "14400",
                            "class": "IN",
                            "cname": "example.or.id",
                            "Line": 20,
                            "type": "CNAME"
                        },
                        {
                            "ttl": "14400",
                            "name": "ftp.example.or.id.",
                            "class": "IN",
                            "cname": "example.or.id",
                            "Line": 21,
                            "type": "CNAME"
                        }
                    ]
                }
            ]
        }
    }
}

The above command returns Failed JSON structured like this:

{
    "code": "Error Code",
    "message": "Error Message"
}

This endpoint get list dns record in your account. Your Request must contain following information:

HTTP Request

POST https://api.irsfa.id/rest/v2/dnsmanagerv2/list

Header

Name Type Description
Authorization Alphanumeric OAuth2.0 Token Format value: Bearer {access_token}
Content-Type Alphanumeric Content of your request body e.g. application/json
X-Requested-With Alphanumeric Type of your request e.g. XMLHttpRequest

Request

Field Data Type Mandatory Description
domain String Yes The domain of dns record that you want to terminate.

Response

Field Data Type Description
TerminateDNSManager Successfull
code Integer 200
message String Successful Message.
TerminateDNSManager Failed
code Integer Error Code.
message String Error message.

DNS record Type

For all reference record type you can access here .

Errors

Here is the list of error codes that can be returned:

Error Code Meaning
400 Bad Request -- Your request is wrong.
401 Unauthorized -- Your API key is wrong
403 Forbidden -- The irsfa data requested is hidden for administrators only
404 Not Found -- The specified data could not be found
405 Method Not Allowed -- You tried to access a irsfa data with an invalid method
406 Not Acceptable -- You requested a format that isn't json
410 Gone -- The irsfa data requested has been removed from our servers
418 I'm a teapot
429 Too Many Requests -- You're requesting too many! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarially offline for maintanance. Please try again later.