User API

API Reference NAV
Intermax Cloudsourcing B.V.

    Introduction

    Our HTTP REST API allows you to manage vital details of your account and services in client portal. JSON is used for all API returns

    Use left menu to browse trough available methods, use right menu to check required parameters, data to post and code samples in various languages.

    Swagger Doc: You can download or display the JSON to generate documentation in Swagger.

    Authentication

    JSON Web Token Authentication

    curl 'https://domeinmanager.intermax.nl/api/login' \
        -d username="username"\
        -d password="password"
    
    # grab authentication token from the response and pass it in Authorization header
    curl 'https://domeinmanager.intermax.nl/api/details' \
        -H "Authorization: Bearer $token"
    
    $resp = $client->post('login', [
        'form_params' => [
            'username' => 'username',
            'password' => 'password'
        ]
    ]);
    
    $token = $resp->json()['token'];
    
    $resp = $client->get('details', [
        'headers' => [
            'Authorization' => 'Bearer ' . $token
        ]
    ]);
    
    echo $resp->getBody();
    payload = username
    resp = requests.post('https://domeinmanager.intermax.nl/api/login', data=payload)
    
    headers = {
        'Authorization': 'Bearer ' + req.json().token
    }
    resp = requests.get('https://domeinmanager.intermax.nl/api/details', headers=headers)
    print(resp)

    Make sure to replace username and password with your client area details.

    To authenticate, you need to send a JSON Web Token (JWT) in the authorization header of the HTTP request.

    To obtain the authorization token you need to submit a request with your username and password to POST https://domeinmanager.intermax.nl/api/login API method

    All API calls that require authentication expect HTTP header in the form of Authorization: Bearer <token>.

    For example:
    Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc...

    Basic Authentication

    # pass the correct header with each request (-u option)
    curl 'https://domeinmanager.intermax.nl/api/details' \
        -u "username:password"
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
        'auth' => ['username', 'password']
    ]);
    
    $resp = $client->get('details');
    # python requests module handles basic authentication if provided with auth parameter
    payload = username
    req = requests.get('https://domeinmanager.intermax.nl/api/details', auth=('username', 'password'))
    print(req.json())

    Make sure to replace username and password with your client area details.

    This authentication method requires that you send your client area username (email address) and password with each request.

    API calls that require authentication expect a header in the form of Authorization: Basic <credentials>, where credentials is the Base64 encoding of username and password joined by a single colon :.

    For example:
    Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

    You can find more info on this authentication method here: Basic HTTP Authentication

    Clientarea

    Login

    Generate new authorization token

    POST_DATA="{
        \"username\": \"user@example.com\",
        \"password\": \"secret\"
    }"
    
    curl -X POST "https://domeinmanager.intermax.nl/api/login" \
       -H "Content-Type: application/json" \
       -d "${POST_DATA}"
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
    ]);
    
    $options = [
        'json' => [
            "username" => "user@example.com",
            "password" => "secret"
        ]
    ]
    $resp = $client->post('login', $options);
    echo $resp->getBody();
    payload = {
        'username': "user@example.com",
        'password': "secret"
    }
    
    
    req = requests.post('https://domeinmanager.intermax.nl/api/login', json=payload)
    print(req.json())
    Example Response:
    {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRw(...)5lZ9T79ft9uwOkqRRmIBbtR51_w",
        "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzMD(...)ChwIAb3zvxBu6kvULa2AwAt9U-I"
    }

    HTTP Request

    POST /login

    Query Parameters

    Parameter Type Description
    username string

    Your acount email address

    password string

    Account password

    Logout

    Invalidate authorization token

    
    curl -X POST "https://domeinmanager.intermax.nl/api/logout" \
       -H "Authorization: Bearer $token" 
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
        'headers' => [
            'Authorization' => 'Bearer ' . $token
        ]
    ]);
    
    
    $resp = $client->post('logout');
    echo $resp->getBody();
    
    headers = {
        'Authorization': 'Bearer ' + token
    }
    
    req = requests.post('https://domeinmanager.intermax.nl/api/logout', headers=headers)
    print(req.json())
    Example Response:
    {
        "status": true
    }

    HTTP Request

    POST /logout

    Refresh Token

    Generate new authorization token using refresh token

    POST_DATA="{
        \"refresh_token\": \"refresh_tokenValue\"
    }"
    
    curl -X POST "https://domeinmanager.intermax.nl/api/token" \
       -H "Content-Type: application/json" \
       -d "${POST_DATA}"
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
    ]);
    
    $options = [
        'json' => [
            "refresh_token" => "refresh_tokenValue"
        ]
    ]
    $resp = $client->post('token', $options);
    echo $resp->getBody();
    payload = {
        'refresh_token': "refresh_tokenValue"
    }
    
    
    req = requests.post('https://domeinmanager.intermax.nl/api/token', json=payload)
    print(req.json())
    Example Response:
    {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHR(...)vY2xlYiHGvauCWZD9B0VwXgHEzXDllqY",
        "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJBQ(...)Rmivc_u3YA_kgDqOPtUuGNXOzueXYtZw"
    }

    HTTP Request

    POST /token

    Query Parameters

    Parameter Type Description
    refresh_token string

    Refresh token previously obtained from POST /login

    Revoke Token

    Invalidate authorization and refresh token. Pass refresh token or call this method with valid access token

    POST_DATA="{
        \"refresh_token\": \"refresh_tokenValue\"
    }"
    
    curl -X POST "https://domeinmanager.intermax.nl/api/revoke" \
       -H "Content-Type: application/json" \
       -d "${POST_DATA}"
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
    ]);
    
    $options = [
        'json' => [
            "refresh_token" => "refresh_tokenValue"
        ]
    ]
    $resp = $client->post('revoke', $options);
    echo $resp->getBody();
    payload = {
        'refresh_token': "refresh_tokenValue"
    }
    
    
    req = requests.post('https://domeinmanager.intermax.nl/api/revoke', json=payload)
    print(req.json())
    Example Response:
    {
        "status": true
    }

    HTTP Request

    POST /revoke

    Query Parameters

    Parameter Type Description
    refresh_token string

    User Details

    Return registration details for my account

    
    curl -X GET "https://domeinmanager.intermax.nl/api/details" \
       -H "Authorization: Bearer $token" 
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
        'headers' => [
            'Authorization' => 'Bearer ' . $token
        ]
    ]);
    
    
    $resp = $client->get('details');
    echo $resp->getBody();
    
    headers = {
        'Authorization': 'Bearer ' + token
    }
    
    req = requests.get('https://domeinmanager.intermax.nl/api/details', headers=headers)
    print(req.json())
    Example Response:
    {
        "client": {
            "id": "26",
            "email": "api@example.com",
            "lastlogin": "2016-12-30 12:24:28",
            "ip": "172.100.2.1",
            "host": "hostname",
            "firstname": "Joe",
            "lastname": "Doe",
            "companyname": "",
            "address1": "Pretty View Lane",
            "address2": "3294",
            "city": "Santa Rosa",
            "state": "California",
            "postcode": "95401",
            "country": "US",
            "phonenumber": "+1.24123123"
        }
    }

    HTTP Request

    GET /details

    DNS

    List DNS

    Returns a list of all DNS

    
    curl -X GET "https://domeinmanager.intermax.nl/api/dns" \
       -H "Authorization: Bearer $token" 
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
        'headers' => [
            'Authorization' => 'Bearer ' . $token
        ]
    ]);
    
    
    $resp = $client->get('dns');
    echo $resp->getBody();
    
    headers = {
        'Authorization': 'Bearer ' + token
    }
    
    req = requests.get('https://domeinmanager.intermax.nl/api/dns', headers=headers)
    print(req.json())
    Example Response:
    {
        "service_ids": [
            "10",
            "20"
        ],
        "zones": [
            {
                "domain_id": "60",
                "name": "qwerty.com",
                "service_id": "10"
            },
            {
                "domain_id": "61",
                "name": "bgg12ooble.com",
                "service_id": "20"
            }
        ]
    }

    HTTP Request

    GET /dns

    List DNS for service

    Returns a list of DNS zones under the service

    
    curl -X GET "https://domeinmanager.intermax.nl/api/service/@service_id/dns" \
       -H "Authorization: Bearer $token" 
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
        'headers' => [
            'Authorization' => 'Bearer ' . $token
        ]
    ]);
    
    
    $resp = $client->get('service/@service_id/dns');
    echo $resp->getBody();
    
    headers = {
        'Authorization': 'Bearer ' + token
    }
    
    req = requests.get('https://domeinmanager.intermax.nl/api/service/@service_id/dns', headers=headers)
    print(req.json())
    Example Response:
    {
        "error": [
            "invalid method"
        ]
    }

    HTTP Request

    GET /service/@service_id/dns

    Query Parameters

    Parameter Type Description
    service_id int

    Service ID

    Get DNS details

    Returns details of the DNS zone

    
    curl -X GET "https://domeinmanager.intermax.nl/api/service/@service_id/dns/@zone_id" \
       -H "Authorization: Bearer $token" 
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
        'headers' => [
            'Authorization' => 'Bearer ' . $token
        ]
    ]);
    
    
    $resp = $client->get('service/@service_id/dns/@zone_id');
    echo $resp->getBody();
    
    headers = {
        'Authorization': 'Bearer ' + token
    }
    
    req = requests.get('https://domeinmanager.intermax.nl/api/service/@service_id/dns/@zone_id', headers=headers)
    print(req.json())
    Example Response:
    {
        "service_id": 10,
        "name": "qwerty.com",
        "records": [
          {
            "id":"10",
            "name":"qwerty",
            "ttl":1800,
            "priority":0,
            "content":"127.0.0.1",
            "type":"A"
          },
          {
            "id":"11",
            "name":"qwerty",
            "ttl":1800,
            "priority":0,
            "content":"ns1.qwerty.com",
            "type":"NS"
          }
        ]
    }

    HTTP Request

    GET /service/@service_id/dns/@zone_id

    Query Parameters

    Parameter Type Description
    service_id int

    Service ID

    zone_id int

    Zone ID

    Add DNS Record

    Creates a new record in the DNS zone

    POST_DATA="{
        \"service_id\": \"service_idValue\",
        \"zone_id\": \"zone_idValue\",
        \"name\": \"example.com\",
        \"ttl\": 3600,
        \"priority\": 10,
        \"type\": \"A\",
        \"content\": \"192.168.1.2\"
    }"
    
    # OR ...
    
    POST_DATA="{
        \"service_id\": \"service_idValue\",
        \"zone_id\": \"zone_idValue\",
        \"name\": \"_sip._tcp.example.com\",
        \"ttl\": 3600,
        \"priority\": 10,
        \"type\": \"SRV\",
        \"content\": [
            10,
            5060,
            \"vc01.example.com\"
        ]
    }"
    
    curl -X POST "https://domeinmanager.intermax.nl/api/service/@service_id/dns/@zone_id/records" \
       -H "Authorization: Bearer $token" \
       -H "Content-Type: application/json" \
       -d "${POST_DATA}"
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
        'headers' => [
            'Authorization' => 'Bearer ' . $token
        ]
    ]);
    
    $options = [
        'json' => [
            "service_id" => "service_idValue",
            "zone_id" => "zone_idValue",
            "name" => "example.com",
            "ttl" => 3600,
            "priority" => 10,
            "type" => "A",
            "content" => "192.168.1.2"
        ]
    ]);
    
    // OR ...
    
    $options = [
        'json' => [
            "service_id" => "service_idValue",
            "zone_id" => "zone_idValue",
            "name" => "_sip._tcp.example.com",
            "ttl" => 3600,
            "priority" => 10,
            "type" => "SRV",
            "content" => [
                10,
                5060,
                "vc01.example.com"
            ]
        ]
    ]);
    
    $resp = $client->post('service/@service_id/dns/@zone_id/records', $options);
    echo $resp->getBody();
    payload = {
        'service_id': "service_idValue",
        'zone_id': "zone_idValue",
        'name': "example.com",
        'ttl': 3600,
        'priority': 10,
        'type': "A",
        'content': "192.168.1.2"
    }
    
    # OR ...
    
    payload = {
        'service_id': "service_idValue",
        'zone_id': "zone_idValue",
        'name': "_sip._tcp.example.com",
        'ttl': 3600,
        'priority': 10,
        'type': "SRV",
        'content': [
            10,
            5060,
            "vc01.example.com"
        ]
    }
    
    headers = {
        'Authorization': 'Bearer ' + token
    }
    
    req = requests.post('https://domeinmanager.intermax.nl/api/service/@service_id/dns/@zone_id/records', json=payload, headers=headers)
    print(req.json())
    Example Response:
    {
        "record": {
          "name": "_sip._tcp.example.com",
          "type": "SRV",
          "ttl": "3600",
          "priority": "10",
          "content": [
            10,
            5060,
            "vc01.example.com"
          ]
        },
        "info": [
            "dnsnewrecordadded",
            "SRV"
        ]
    }

    HTTP Request

    POST /service/@service_id/dns/@zone_id/records

    Query Parameters

    Parameter Type Description
    service_id int

    Service ID

    zone_id int

    Zone ID

    name string

    Record name

    ttl int

    Record ttl

    priority int

    Priority of the record

    type string

    Record type

    content string

    Contents of the record

    Edit DNS Record

    Edits the selected DNS zone record

    POST_DATA="{
        \"service_id\": \"service_idValue\",
        \"zone_id\": \"zone_idValue\",
        \"record_id\": \"record_idValue\",
        \"name\": \"example.com\",
        \"ttl\": 3600,
        \"priority\": 10,
        \"type\": \"A\",
        \"content\": \"192.168.1.2\"
    }"
    
    curl -X PUT "https://domeinmanager.intermax.nl/api/service/@service_id/dns/@zone_id/records/@record_id" \
       -H "Authorization: Bearer $token" \
       -H "Content-Type: application/json" \
       -d "${POST_DATA}"
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
        'headers' => [
            'Authorization' => 'Bearer ' . $token
        ]
    ]);
    
    $options = [
        'json' => [
            "service_id" => "service_idValue",
            "zone_id" => "zone_idValue",
            "record_id" => "record_idValue",
            "name" => "example.com",
            "ttl" => 3600,
            "priority" => 10,
            "type" => "A",
            "content" => "192.168.1.2"
        ]
    ]
    $resp = $client->put('service/@service_id/dns/@zone_id/records/@record_id', $options);
    echo $resp->getBody();
    payload = {
        'service_id': "service_idValue",
        'zone_id': "zone_idValue",
        'record_id': "record_idValue",
        'name': "example.com",
        'ttl': 3600,
        'priority': 10,
        'type': "A",
        'content': "192.168.1.2"
    }
    
    headers = {
        'Authorization': 'Bearer ' + token
    }
    
    req = requests.put('https://domeinmanager.intermax.nl/api/service/@service_id/dns/@zone_id/records/@record_id', json=payload, headers=headers)
    print(req.json())
    Example Response:
    {
        "record": {
            "id": "55",
            "type": "A",
            "ttl": "3600",
            "name": "test",
            "priority": 0,
            "content": "192.168.1.2"
        },
        "info": [
            "The record was updated successfully."
        ]
    }

    HTTP Request

    PUT /service/@service_id/dns/@zone_id/records/@record_id

    Query Parameters

    Parameter Type Description
    service_id int

    Service ID

    zone_id int

    Zone ID

    record_id int

    Record ID

    name string

    Record name

    ttl int

    Record ttl

    priority int

    Priority of the record

    type string

    Record type

    content string

    Contents of the record

    Remove DNS Record

    Removes the selected DNS zone record

    
    curl -X DELETE "https://domeinmanager.intermax.nl/api/service/@service_id/dns/@zone_id/records/@record_id" \
       -H "Authorization: Bearer $token" 
    use GuzzleHttp\Client;
    
    $client = new Client([
        'base_uri' => 'https://domeinmanager.intermax.nl/api/',
        'headers' => [
            'Authorization' => 'Bearer ' . $token
        ]
    ]);
    
    
    $resp = $client->delete('service/@service_id/dns/@zone_id/records/@record_id');
    echo $resp->getBody();
    
    headers = {
        'Authorization': 'Bearer ' + token
    }
    
    req = requests.delete('https://domeinmanager.intermax.nl/api/service/@service_id/dns/@zone_id/records/@record_id', headers=headers)
    print(req.json())

    HTTP Request

    DELETE /service/@service_id/dns/@zone_id/records/@record_id

    Query Parameters

    Parameter Type Description
    service_id int

    Service ID

    zone_id int

    Zone ID

    record_id int

    Record ID