NAV Navbar
PHP jQuery cURL

Introduction

Welcome to the BoldGrid API! You can use our API to access BoldGrid API end-points, which can get information and statistics of users or manage a users account.

We have language bindings in PHP, JavaScript, and shell! 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.

The following types exist for the BoldGrid API:

Environments

There are two API URL addresses used to prefix the API endpoints:

Authentication

Overview

The BoldGrid API accepts three forms of authentication. A BoldGrid Connect Key (including a reseller key for reseller API calls) as POST parameters or HTTP Basic Authorization header, or an authorization token. All authentication methods accept additional parameters to be transmitted with each request.

Connect Key

To authorize via a Connect Key, use this code:

$data = array(
    'key' => 'my-key-hash',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/api/end-point' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
# With shell, you can just pass the correct header with each request
curl "https://api.boldgrid.com/api/end-point" \
    -d key="my-key-hash"
jQuery.ajax( {
    type: "POST",
    data: {
        "key": "my-key-hash"
    },
    url: "https://api.boldgrid.com/api/end-point"
} );

Make sure to replace my-key-hash with your Connect Key.

Users will be issued a Connect Key that will permit interaction with the standard API. Any request that requires authentication can be authenticated by providing an MD5 hash of a Connect Key as a standard HTTP request parameter.

Authorization Example Url:

GET http://api.boldgrid.com/api/asset/get?id=1&key=my-key-hash

Arguments

Parameter Description
key An MD5 hash representation of your Connect Key.

Reseller Connect Key via POST

To authorize via a Reseller Connect Key, use this code:

$data = array(
    'key' => 'my-key-hash',
    'reseller_key' => 'reseller-key',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/end-point' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
# With shell, you can just pass the correct header with each request
curl "https://api.boldgrid.com/reseller/v2/end-point" \
    -d key="my-key-hash" \
    -d reseller_key="reseller-key"
jQuery.ajax( {
    type: "POST",
    data: {
        "key": "my-key-hash",
        "reseller_key": "reseller-key"
    },
    url: "https://api.boldgrid.com/reseller/v2/end-point"
} );

Make sure to replace my-key-hash with your Connect Key hash, and replace reseller-key with your reseller key.

Users and resellers will be issued a Connect Key that will permit interaction with the standard API. Resellers are issued reseller keys that allow access to the reseller API. Any request that requires authentication can be authenticated by providing an MD5 hash of the Connect Key and the reseller key, as standard HTTP POST request parameters.

Authorization Example Url:

POST http://api.boldgrid.com/reseller/v2/end-point?key=my-key-hash&reseller_key=reseller-key

Arguments

Parameter Description
key An MD5 hash representation of a reseller user’s Connect Key.
reseller_key A reseller authentication key.

Reseller Connect Key via HTTP header

To authorize via a Reseller Connect Key, use this code:

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/end-point' );
curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Authorization: Basic basic.token.goes.here' ) );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
# With shell, you can just pass the correct header with each request
curl "https://api.boldgrid.com/reseller/v2/end-point" \
    -H "Authorization: Basic basic.token.goes.here"
jQuery.ajax( {
    type: "POST",
    headers: {
        "Authorization": "Basic basic.token.goes.here"
    },
    url: "https://api.boldgrid.com/reseller/v2/end-point"
} );

Make sure to replace basic.token.goes.here with a base64-encoded representation of your Connect Key hash and your reseller key, in the format “hash:key”.

Users and resellers will be issued a Connect Key that will permit interaction with the standard API. Resellers are issued reseller keys that allow access to the reseller API. Any request that requires authentication can be authenticated by providing an MD5 hash of the Connect Key and the reseller key, base64-encoded in standard HTTP Basic authorization header, in the format “Authorization: Basic hash:key”.

Authorization Example Url:

POST http://api.boldgrid.com/reseller/v2/end-point

Authorization Token

To authorize via token, use this code:

$data = array(
    'account_id' => 1234,
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Authorization: Bearer token.goes.here' ) );
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/end-point' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
# With shell, you can just pass the correct header with each request
curl "https://api.boldgrid.com/account/v1/end-point" \
    -H "Authorization: Bearer token.goes.here"
    -d account_id="1234"
jQuery.ajax( {
    type: "POST",
    headers: {
        "Authorization": "Bearer token.goes.here"
    },
    data: {
        "account_id": "1234"
    },
    url: "https://api.boldgrid.com/account/v1/end-point"
} );

Make sure to replace token.goes.here with your authentication token.

Alternatively authorization can be performed by providing a JSON Web Token. You can create a token with reseller or account credentials.

Reseller token:

POST http://api.boldgrid.com/reseller/v2/auth/get-token

Arguments

Parameter Description
key An MD5 hash representation of a reseller user’s Connect Key.
reseller_key A reseller authentication key.

Account token:

POST http://api.boldgrid.com/account/v1/auth/get-token

Arguments

Parameter Description
username Email address for which account to receive a token.
password Password related to the account.

Authorization

Attach the token to a header parameter, labeled “Authorization”, for any requests that require authentication. When using the Account API with a reseller token, you’ll also need to pass an “account_id” post parameter.

Authorization: Bearer token.goes.here

Return format

The BoldGrid API accepts a standard HTTP request parameter format in order to specify a certain format for the return data. By default, the data is returned in a JSON Model, which includes status (HTTP status code), message (a friendly status message), and result containing data (the resulting data). All dates in the return data are formatted as ISO 8601.

Accepted values of the format parameter include:

Value Description
JSON Model (default)
json JSON.
serialize PHP serialize.

Official Hosts and Resellers

Access is limited to verified BoldGrid resellers.

List Connect Keys

$data = array(
    'date_from' => 'YYYY-MM-DD',
    'date_to' => 'YYYY-MM-DD',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/key/list' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -s https://api.boldgrid.com/reseller/v2/key/list \
    -d date_from="YYYY-MM-DD" \
    -d date_to="YYYY-MM-DD"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/key/list",
    data: {
        "date_from": "YYYY-MM-DD",
        "date_to": "YYYY-MM-DD"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "date_range": {
                "date_from": "2016-02-09T00:00:00-0500",
                "date_to": "2016-02-10T23:59:59-0500"
            },
            "connect_keys": [
                {
                    "connect_id": "1234",
                    "account_id": "123456",
                    "is_premium": "0",
                    "current_status": "active",
                    "api_key": "45642d14-baa8d5ec-efec7dbb-XXXXXXXX",
                    "is_active": "1",
                    "coin_balance": "0",
                    "first_connect": "2016-02-09T07:39:44-0500",
                    "last_connect": "2016-02-09T08:03:29-0500",
                    "created_at": "2016-02-09T06:04:31-0500"
                },
                {
                    "connect_id": "2345",
                    "account_id": "234567",
                    "is_premium": "1",
                    "current_status": "active",
                    "api_key": "add6eaea-521a1212-075eba45-XXXXXXXX",
                    "is_active": "1",
                    "coin_balance": "10",
                    "first_connect": "2016-02-09T09:12:52-0500",
                    "last_connect": "2016-02-09T10:42:23-0500",
                    "created_at": "2016-02-09T08:32:14-0500"
                }
            ]
        }
    }
}

Description: Retrieve a list of Connect keys. Date ranges are optional.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/key/list

Arguments

Parameter Description
date_from An optional start date.
date_to An optional end date.

Return

Element Path Parameter Description
/date_range date_from Input start date.
/date_range date_to Input end date.
/connecy_keys connect_id Connect Key id.
/connect_keys account_id Account id.
/connect_keys is_premium Whether or not the Connect Key is considered Premium.
/connect_keys current_status Current status of the Connect Key.
/connect_keys api_key A Connect Key.
/connect_keys is_active Whether or not the Connect Key is active.
/connect_keys coin_balance Copyright Coin balance.
/connect_keys first_connect Timestamp when a user first requested a preview build in the Inspiration process.
/connect_keys last_connect Timestamp of the last API connection.
/connect_keys created_at Timestamp of the creation of the Connect Key.

Connect Key details

$data = array(
    'connect_id' => 'connect-id',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/key/details' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -s https://api.boldgrid.com/reseller/v2/key/details \
    -d connect_id="connect-id"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/key/details",
    data: {
        "connect_id": "connect-id"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "connect_id": "1234",
            "api_key": "45642d14-baa8d5ec-efec7dbb-XXXXXXXX",
            "is_active": "1",
            "coin_balance": "0",
            "first_connect": "2016-02-09T07:39:44-0500",
            "last_connect": "2016-02-09T08:03:29-0500",
            "created_at": "2016-02-09T06:04:31-0500",
            "transaction_count": 0,
            "transaction_item_count": 0,
            "api_key_revoked_count": 0,
            "site_count": 2,
            "is_premium": "0",
            "type": "basic",
            "current_status": "active",
            "account_id": "123456"
        }
    }
}

Description: Retrieve details for a Connect Key.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/key/details

Arguments

Parameter Description
connect_id A Connect Key id.

Return

Element Path Parameter Description
/ connect_id Connect Key id.
/ api_key Connect Key.
/ is_active Whether or not the Connect Key is active.
/ coin_balance Copyright Coin balance.
/ first_connect Timestamp when a user first requests a preview build in the Inspiration process.
/ last_connect Timestamp of the last API connection.
/ created_at Timestamp of the creation of the Connect Key.
/ transaction_count Number of Copyright Coin transactions.
/ transaction_item_count Number of Copyright Coin items transacted.
/ api_key_revoked_count Number of times the Connect Key has been revoked.
/ site_count Number of registered websites that have utilized BoldGrid Inspirations.
/ is_premium Whether or not the Connect Key is considered Premium.
/ type Type of Connect Key (basic/premium).
/ current_status Current status of the Connect Key.
/ account_id Account id.

List sites

$data = array(
    'connect_id' => 'connect-id',
    'date_from' => 'YYYY-MM-DD',
    'date_to' => 'YYYY-MM-DD',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/site/list' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -s https://api.boldgrid.com/reseller/v2/site/list \
    -d connect_id="connect-id" \
    -d date_from="YYYY-MM-DD" \
    -d date_to="YYYY-MM-DD"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/site/list",
    data: {
        "date_from": "YYYY-MM-DD",
        "date_to": "YYYY-MM-DD"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "connect_id": "1234",
            "date_range": {
                "date_from": "2015-01-01T00:00:00-0500",
                "date_to": "2016-02-10T23:59:59-0500"
            },
            "site_count": 2,
            "sites": [{
                "site_id": "99999",
                "site_ip": "0.0.0.0",
                "siteurl": "http:\/\/example.com",
                "last_connect": "2016-02-09T06:04:48-0500",
                "created_at": "2016-02-09T06:04:48-0500",
                "first_login": null,
                "last_login": null
            }, {
                "site_id": "99998",
                "site_ip": "0.0.0.0",
                "siteurl": "http:\/\/example.com\/bg1_example.com",
                "last_connect": "2016-02-09T07:43:36-0500",
                "created_at": "2016-02-09T06:13:50-0500",
                "first_login": "2016-02-09T07:38:36-0500",
                "last_login": null
            }]
        }
    }
}

Description: Retrieve a list of sites owned by Connect Key. Date ranges are optional.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/site/list

Arguments

Parameter Description
connect_id A Connect Key id.
date_from An optional start date.
date_to An optional end date.

Return

Element Path Parameter Description
/ account_id An account id.
/ connect_id A Connect Key id.
/ site_count The number of sites returned.
/date_range date_from Input start date.
/date_range date_to Input end date.
/sites site_id Site id.
/sites site_ip Site IP address.
/sites siteurl WordPress siteurl.
/sites last_connect Timestamp of the last API connection from the site.
/sites created_at Timestamp of the creation of the site record.
/sites first_login Timestamp of the first WordPress login after installing BoldGrid Inspirations.
/sites last_login Timestamp of the last WordPress login after installing BoldGrid Inspirations.

Create a Connect Key

$data = array(
    'email' => 'user@example.com',
    'is_premium' => '1',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/key/create' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/key/create \
    -d email="user@example.com" \
    -d is_premium="1"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/key/create",
    data: {
        "email": "user@example.com",
        "is_premium": "1",
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "connect_id": "1234",
            "key": "12345678-12345678-12345678-12345678",
            "is_active": "1",
            "type": "premium"
        }
    }
}

Description: Issue or retrieve a Connect Key. If an activation is made for an existing user, then the existing key is returned.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/key/create

Arguments

Parameter Description
email An optional email address.
is_premium An optional parameter to create a Premium Connect Key; pass 0 or 1.

Return

Element Path Parameter Description
/ account_id An account id.
/ connect_id A Connect Key id.
/ api_key A Connect Key.
/ is_active Whether or not the Connect Key is active.
/ type Type of Connect Key (basic/premium).

Suspend a Connect Key

$data = array(
    'connect_id' => '1234',
    'reason' => 'non-payment',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/key/suspend' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/key/suspend \
    -d connect_id="1234" \
    -d reason="non-payment"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/key/suspend",
    data: {
        "connect_id": "1234",
        "reason": "non-payment"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "connect_id": "1234",
            "type":"basic",
            "is_active": true,
            "current_status": "suspended"
        }
    }
}

Description: Mark a Connect Key as inactive.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/key/suspend

Arguments

Parameter Description
connect_id A Connect Key id.
reason An optional reason for the suspension.

Return

Element Path Parameter Description
/ account_id An account id.
/ connect_id A Connect Key id.
/ type Type of Connect Key (basic/premium).
/ is_active Whether or not the Connect Key is active.
/ current_status Current status of the Connect Key.

Unsuspend a Connect Key

$data = array(
    'connect_id' => '1234',
    'reason' => 'paid',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/key/unsuspend' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/key/unsuspend \
    -d connect_id="1234" \
    -d reason="paid"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/key/unsuspend",
    data: {
        "connect_id": "1234",
        "reason": "paid"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "connect_id": "1234",
            "type":"basic",
            "is_active": true,
            "current_status": "active"
        }
    }
}

Description: Mark a Connect Key as active.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/key/unsuspend

Arguments

Parameter Description
connect_id A Connect Key id.
reason An optional reason for the unsuspension.

Return

Element Path Parameter Description
/ account_id An account id.
/ connect_id A Connect Key id.
/ type Type of Connect Key (basic/premium).
/ is_active Whether or not the Connect Key is active.
/ current_status Current status of the Connect Key.

Revoke/Reissue a Connect Key

$data = array(
    'connect_id' => '1234',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/key/revoke' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/key/revoke \
    -d connect_id="1234"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/key/revoke",
    data: {
        "connect_id": "1234"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "connect_id": "1234",
            "key": "12345678-12345678-12345678-12345678",
            "type":"basic",
            "is_active": true,
            "current_status": "active"
        }
    }
}

Description: If a Connect Key has been compromised, this method may be used to revoke and reissue a new Connect Key.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/key/revoke

Arguments

Parameter Description
connect_id A Connect Key id.

Return

Element Path Parameter Description
/ account_id An account id.
/ connect_id A Connect Key id.
/ api_key A Connect Key.
/ type Type of Connect Key (basic/premium).
/ is_active Whether or not the Connect Key is active.
/ current_status Current status of the Connect Key.
$data = array(
    'connect_id' => '1234',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/coin/balance' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/coin/balance \
    -d connect_id="1234"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/coin/balance",
    data: {
        "connect_id": "1234"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "connect_id": "1234",
            "balance": "20"
        }
    }
}

Description: Retrieve the Copyright Coin balance for a Connect Key.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/coin/balance

Arguments

Parameter Description
connect_id A Connect Key id.

Return

Element Path Parameter Description
/ account_id An account id.
/ connect_id A Connect Key id.
/ balance Copyright Coin balance.
$data = array(
    'connect_id' => '1234',
    'coins' => '20',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/coin/add' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/coin/add \
    -d connect_id="1234" \
    -d coins="20"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/coin/add",
    data: {
        "connect_id": "1234",
        "coins": "20"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "connect_id": "1234",
            "new_balance": "40",
            "old_balance": "20"
        }
    }
}

Description: Add Copyright Coins to a Connect Key. This action will move the requested number of coins from the authenticated reseller account, to the specified Connect Key. There must be sufficient coins in the reseller account to honor the transfer. The Connect Key must also be owned by the authenticated reseller.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/coin/add

Arguments

Parameter Description
connect_id A Connect Key id.
coins A number of Copyright Coins to add.

Return

Element Path Parameter Description
/ account_id An account id.
/ connect_id A Connect Key id.
/ new_balance The new Copyright Coin balance.
/ old_balance The previous Copyright Coin balance.
$data = array(
    'connect_id' => '1234',
    'coins' => '20',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/coin/remove' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/key/suspend \
    -d connect_id="123" \
    -d coins="20"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/key/suspend",
    data: {
        "connect_id": "123",
        "coins": "20"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "connect_id": "1234",
            "new_balance": "20",
            "old_balance": "40"
        }
    }
}

Description: Remove Copyright Coins from a Connect Key. This action will move the requested number of coins from the specified Connect Key, to the authenticated reseller account. There must be sufficient coins assigned to the specified Connect Key to honor the transfer. The Connect Key must also be owned by the authenticated reseller.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/coin/remove

Arguments

Parameter Description
connect_id A Connect Key id.
coins A number of Copyright Coins to add.

Return

Element Path Parameter Description
/ account_id An account id.
/ connect_id A Connect Key id.
/ new_balance The new Copyright Coin balance.
/ old_balance The previous Copyright Coin balance.

Change Connect Key type

$data = array(
    'connect_id' => '1234',
    'type' => 'premium',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/key/change-type' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/key/change-type \
    -d connect_id="1234" \
    -d type="premium"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/key/change-type",
    data: {
        "connect_id": "1234",
        "type": "premium"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "connect_id": "1234",
            "type":"premium",
            "is_active": false,
            "current_status": "active",
            "message": "Success."
        }
    }
}

Description: Change a Connect Key type (Basic/Premium).

HTTP Request

POST https://api.boldgrid.com/reseller/v2/key/change-type

Arguments

Parameter Description
connect_id A Connect Key id.
type The new type: “basic”, “premium”.

Return

Element Path Parameter Description
/ account_id An account id.
/ connect_id A Connect Key id.
/ type Type of Connect Key (basic/premium).
/ is_active Whether or not the Connect Key is active.
/ current_status Current status of the Connect Key.
/ message Message for success or errors.

Update account details

$data = array(
    'account_id' => '123456',
    'email' => 'user@example.com',
    'display_name' => 'Mr. Example',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/user/update' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/user/update \
    -d account_id="123456" \
    -d email="user@example.com" \
    -d display_name="Mr. Example"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/user/update",
    data: {
        "account_id": "123456",
        "email": "user@example.com",
        "display_name": "Mr. Example"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "updated": true
        }
    }
}

Description: Update account details, such as email address and display name. The account must have at least one Connect Key owned by the authenticated reseller.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/user/update

Arguments

Parameter Description
account_id An account id.
email An optional email address.
display_name An optional display name.

Return

Element Path Parameter Description
/ account_id An account id.
/ updated Whether or not any details were updated.

Create a Sub-Reseller Account

$data = array(
    'title' => 'Example Hosting Company',
    'logo_url' => 'https://www.example.com/logo.png',
    'website_url' => 'https://www.example.com/',
    'support_url' => 'https://www.example.com/support',
    'cp_url' => 'https://www.example.com/portal',
    'email' => 'user@example.com',
    'phone' => '1-555-555-5555',
    'is_premium' => '1',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/key/create-reseller' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/key/create-reseller \
    -d title="Example Hosting Company" \
    -d logo_url="https://www.example.com/logo.png" \
    -d website_url="https://www.example.com/" \
    -d support_url="https://www.example.com/support" \
    -d cp_url="https://www.example.com/portal" \
    -d email="user@example.com" \
    -d phone="1-555-555-5555" \
    -d is_premium="1"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/key/create-reseller",
    data: {
        "title" : "Example Hosting Company",
        "logo_url" : "https://www.example.com/logo.png",
        "website_url" : "https://www.example.com/",
        "support_url" : "https://www.example.com/support",
        "cp_url" : "https://www.example.com/portal",
        "email" : "user@example.com",
        "phone" : "1-555-555-5555",
        "is_premium": "1"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "account_id": "123456",
            "connect_id": "1234",
            "key": "12345678-12345678-12345678-12345678",
            "reseller_key":"0123456789abcdefadefe2691aec20ca52d6cbe26a042ff61519146263b498567b37d279afcea39e1eac4d40c269f6ca2ffb4808ed7137ab9fb6b658c0c0f00d",
            "is_active": "1",
            "type": "premium"
        }
    }
}

Description: Create a sub-reseller account and Connect Key.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/key/create-reseller

Arguments

Parameter Description
title Reseller title/name.
logo_url An optional URL address for a logo to display in WordPress.
website_url An optional URL address for the reseller’s website.
support_url An optional URL address for the reseller’s support website.
cp_url An optional URL address for the reseller’s customer control panel.
email An email address.
phone An optional phone number for customers to contact the reseller.
is_premium An optional parameter to create a Premium Connect Key; pass 0 or 1.

Return

Element Path Parameter Description
/ account_id An account id.
/ connect_id A Connect Key id.
/ api_key A Connect Key.
/ reseller_key A reseller key.
/ is_active Whether or not the Connect Key is active.
/ type Type of Connect Key (basic/premium).

Update Reseller Account Details

$data = array(
    'title' => 'Example Hosting Company',
    'logo_url' => 'https://www.example.com/logo.png',
    'website_url' => 'https://www.example.com/',
    'support_url' => 'https://www.example.com/support',
    'cp_url' => 'https://www.example.com/portal',
    'email' => 'user@example.com',
    'phone' => '1-555-555-5555',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/reseller/v2/user/update-reseller' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/reseller/v2/user/update-reseller \
    -d title="Example Hosting Company" \
    -d logo_url="https://www.example.com/logo.png" \
    -d website_url="https://www.example.com/" \
    -d support_url="https://www.example.com/support" \
    -d cp_url="https://www.example.com/portal" \
    -d email="user@example.com" \
    -d phone="1-555-555-5555"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/reseller/v2/user/update-reseller",
    data: {
        "title" : "Example Hosting Company",
        "logo_url" : "https://www.example.com/logo.png",
        "website_url" : "https://www.example.com/",
        "support_url" : "https://www.example.com/support",
        "cp_url" : "https://www.example.com/portal",
        "email" : "user@example.com",
        "phone" : "1-555-555-5555"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "changes":true,
            "updated":true
        }
    }
}

Description: Update reseller account details.

HTTP Request

POST https://api.boldgrid.com/reseller/v2/user/update-reseller

Arguments

Parameter Description
title Reseller title/name.
logo_url An optional URL address for a logo to display in WordPress.
website_url An optional URL address for the reseller’s website.
support_url An optional URL address for the reseller’s support website.
cp_url An optional URL address for the reseller’s customer control panel.
email An email address.
phone An optional phone number for customers to contact the reseller.

Return

Element Path Parameter Description
/ changes Whether or not there were changes requested (differ from old values).
/ updated Whether or not the reseller details were updated.

Account

Manage a user’s BoldGrid account. These API calls are used throughout BoldGrid Central and can be used to manage a single user’s account.

Create Account

$data = array(
    'email' => 'testing@email.com',
    'password' => 'Qjadi!z$',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/auth/create-account' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/auth/create-account \
    -d email="testing@email.com"
    -d password="Qjadi!z$"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/auth/create-account",
    data: {
        "email": "testing@email.com",
        "password": "Qjadi!z$"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true,
            "errors": []
        }
    }
}

Description: Create an account for a user.

HTTP Request

POST https://api.boldgrid.com/account/v1/auth/create-account

Arguments

Parameter Description
email User’s unique email.
password Requested password.

Return

Element Path Type Parameter Description
/ boolean success Request Status
/ array errors Any errors that resulted from the request

Coin Balance

$data = array(
    'connect_id' => '1234',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/coin/balance' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/coin/balance \
    -d connect_id="1234"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/coin/balance",
    data: {
        "connect_id": "1234"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true,
            "balance": "20"
        }
    }
}

Description: Retrieve the Copyright Coin balance for a Connect Key.

HTTP Request

POST https://api.boldgrid.com/account/v1/coin/balance

Arguments

Parameter Description
connect_id Identifier for a Connect Key.

Return

Element Path Type Parameter Description
/ boolean success Request Status
/ integer balance Copyright Coin balance

Connected Sites

$data = array(
    'connect_id' => '1234',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/site/list' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/site/list \
    -d connect_id="1234"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/site/list",
    data: {
        "connect_id": "1234"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true,
            "sites": [
                {
                    "site_id": "122",
                    "site_name": "test-site0.com",
                    "connect_date_iso": "2016-12-21T15:33:07+00:00"
                },
                {
                    "site_id": "123",
                    "site_name": "test-site1.com",
                    "connect_date_iso": "2016-12-22T15:33:07+00:00"
                }
            ]
        }
    }
}

Description: Retrieve a list of sites which the given Connect Id is used on.

HTTP Request

POST https://api.boldgrid.com/account/v1/site/list

Arguments

Parameter Description
connect_id Identifier for a Connect Key.

Return

Element Path Type Parameter Description
/ boolean success Request Status
/sites integer site_id Identifier for this site
/sites string site_name Sites url
/sites string connect_date_iso Timestamp when a user first connected the key to this site

Email - Update

$data = array(
    'email' => 'testing@email.com',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/auth/update-email' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/auth/update-email \
    -d email="testing@email.com"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/auth/update-email",
    data: {
        "email": "testing@email.com",
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true,
            "errors": []
        }
    }
}

Description: Update an account’s email address.

HTTP Request

POST https://api.boldgrid.com/account/v1/auth/update-email

Arguments

Parameter Description
email User’s unique email.

Return

Element Path Type Parameter Description
/ boolean success Request Status
/ array errors Any errors that resulted from the request

Password - Update

$data = array(
    'old_password' => 'UpdatePassword123$',
    'new_password' => 'PasswordUpdate123$',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/auth/change-password' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/auth/change-password \
    -d old_password="UpdatePassword123$"
    -d new_password="PasswordUpdate123$"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/auth/change-password",
    data: {
        "old_password": "UpdatePassword123$",
        "new_password": "PasswordUpdate123$",
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true,
            "errors": []
        }
    }
}

Description: Update an account’s password.

HTTP Request

POST https://api.boldgrid.com/account/v1/auth/change-password

Arguments

Parameter Description
old_password An account’s previous password
new_password An account’s new password

Return

Element Path Type Parameter Description
/ boolean success Request Status
/ array errors Any errors that resulted from the request

Password - Reset

$data = array(
    'email' => 'test1@email.com',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/auth/reset-password' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/auth/reset-password \
    -d email="test1@email.com"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/auth/reset-password",
    data: {
        "email": "test1@email.com",
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true
        }
    }
}

Description: Sends a reset password link to the email address given.

HTTP Request

POST https://api.boldgrid.com/account/v1/auth/reset-password

Arguments

Parameter Description
email Account email address to send password reset link to.

Return

Element Path Type Parameter Description
/ boolean success Request Status

Connect Key - List


$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/key/list' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/key/list
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/key/list"
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true,
            "keys" : [
                {
                    "connect_id": "123",
                    "key": "10351234-56781234-91231234-92341234",
                    "label": "Connect Key",
                    "type": "basic",
                    "status" : "active"
                },
                {
                    "connect_id": "122",
                    "key": "43551234-56781234-91231234-45561234",
                    "label": "Connect Key",
                    "type": "basic",
                    "status" : "inactive-premium"
                },
                {
                    "connect_id": "121",
                    "key": "52541234-56781234-91231344-92341234",
                    "label": "Premium Connect Key",
                    "type": "premium",
                    "status" : "active"
                }
            ]
        }
    }
}

Description: Retrieve a list of connect keys for an account.

HTTP Request

POST https://api.boldgrid.com/account/v1/key/list

Arguments

This call does not require any arguments.

Return

Element Path Type Parameter Description
/ boolean success Request Status
/keys integer connect_id Identifier for a Connect Key
/keys string key Connect Key value
/keys string label Label used to identify a Connect Key
/keys string type Type of Connect Key
/keys string status Current status for the Connect Key

Connect Key - Add

$data = array(
    'connect_key' => '12345678-12345678-12345678-12345678',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/key/add' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/key/add \
    -d connect_key="12345678-12345678-12345678-12345678"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/key/add",
    data: {
        "connect_key": "12345678-12345678-12345678-12345678"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true
        }
    }
}

Description: Transfer an existing Connect Key to this account. This will trigger a confirmation process if the Connect Key is already in use by another email address. The confirmation process must be manually resolved.

This call will return a true success value, only if the transfer could be performed without confirmation. In the case that confirmation is required, it will return an email, the error name “requiresConfirmation”, and success set to false.

HTTP Request

POST https://api.boldgrid.com/account/v1/key/add

Arguments

Parameter Description
connect_key Connect key being transferred to this account.

Return

Note: error, error_name, and email are conditionally returned in the case of an error.

Element Path Type Parameter Description
/ boolean success Request Status
/ array error Error that occurred while trying to add key
/ string error_name Name of error
/ string email Email of user transferring from

Connect Key - Replace

$data = array(
    'connect_id' => '12345',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/key/reissue' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/key/reissue \
    -d connect_id="12345"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/key/reissue",
    data: {
        "connect_id": "12345"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true,
            "new_key": "45564dfdf-45564dfdf-45564dfdf-45564dfdf",
            "error_message": ""
        }
    }
}

Description: Replace the Connect Key value for the given Connect Id.

HTTP Request

POST https://api.boldgrid.com/account/v1/key/reissue

Arguments

Parameter Description
connect_id Identifier for a Connect Key

Return

Element Path Type Parameter Description
/ boolean success Request Status
/ string new_key The new connect key value
/ string error_message An error that occurred from the request

Notification - List

$data = array(
    'type' => 'central',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/notification/list' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/notification/list \
    -d type="central"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/notification/list",
    data: {
        "type": "central"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true,
            "notifications": [
                {
                    "id": 123,
                    "subject": "Connect Key Replaced 2",
                    "body": "<p>Notification HTML</p>",
                    "has_read": false,
                    "date_read": null,
                    "date_sent": "2016-12-23T10:43:58-05:00"
                },
                {
                    "id": 124,
                    "subject": "Connect Key Replaced 3",
                    "body": "<p>Notification HTML</p>",
                    "has_read": true,
                    "date_read": "2016-12-28T10:43:58-05:00",
                    "date_sent": "2016-12-23T10:43:58-05:00"
                }
            ]
        }
    }
}

Description: List notifications for this user.

HTTP Request

POST https://api.boldgrid.com/account/v1/notification/list

Arguments

Type accepts either “central” or “plugin”. Central will return any notifications that should appear in a user’s BoldGrid Account. Plugin will return any notification that should appear in the user’s plugin.

Parameter Description
type Type of notifications to get.

Return

Element Path Type Parameter Description
/ boolean success Request Status
/notifications integer id Identifier for the notification
/notifications string subject Title
/notifications string body Content
/notifications boolean has_read Whether or not notification was read
/notifications string date_read Date the notification was read
/notifications string date_sent Date notification was sent

Notification - Unread

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/notification/unread-count' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/notification/unread-count
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/notification/unread-count"
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true,
            "count" : 2
        }
    }
}

Description: Get a count of notifications that have not been read yet.

HTTP Request

POST https://api.boldgrid.com/account/v1/notification/unread-count

Arguments

This call does not require any arguments.

Return

Element Path Type Parameter Description
/ boolean success Request Status
/ integer count Number of unread notifications

Notification - Read

$data = array(
    'id' => '1234',
);

$curl = curl_init();
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $data );
curl_setopt( $curl, CURLOPT_URL, 'https://api.boldgrid.com/account/v1/notification/mark-as-read' );
$result = curl_exec( $curl );
curl_close( $curl );

print_r( $result );
exit();
curl -sk https://api.boldgrid.com/account/v1/notification/mark-as-read \
    -d id="1234"
jQuery.ajax( {
    type: "POST",
    url: "https://api.boldgrid.com/account/v1/notification/mark-as-read",
    data: {
        "id": "1234"
    }
} );

The above command returns JSON structured like this:

{
    "status": 200,
    "message": "OK",
    "result": {
        "data": {
            "success": true
        }
    }
}

Description: Mark a notification Id as read.

HTTP Request

POST https://api.boldgrid.com/account/v1/notification/mark-as-read

Arguments

Parameter Description
id Notification Identifier.

Return

Element Path Type Parameter Description
/ boolean success Request Status

Errors

The BoldGrid API uses the following error codes:

Error Code Meaning
400 Bad Request – Your request was invalid.
401 Unauthorized – Your API key or token was invalid.
403 Forbidden – You were not permitted to perform that request.
404 Not Found – The specified request url could not be found.
405 Method Not Allowed – The request method is not allowed.
406 Not Acceptable – You requested a format that isn’t correct.
410 Gone – The url requested has been removed from our servers.
412 Precondition Failed – A precondition was not met. Reevaluate the request.
422 Unprocessable Entity – The operation could not be completed due to the state of an entity.
429 Too Many Requests – You have exceeded that request limit.
500 Internal Server Error – We had a problem with our server. Try again later.
502 Bad Gateway – The HTTP gateway failed. Please try again later.
503 Service Unavailable – We’re temporarily offline for maintenance. Please try again later.
504 Gateway Timeout – The HTTP gateway timed-out. Please try again later.