MENU navbar-image
php bash javascript

Introduction

Welcome to our API documentation!

Base URL

http://localhost

Authenticating requests

This API is not authenticated.

Accounts API

APIs for interacting with a TrustedLogin SaaS account, also known as a Team.

Verify Team Account.

Verifies that the settings on a Vendor's site are correct, and updates the API endpoint for this account.

Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/accounts/deleniti',
    [
        'headers' => [
            'Accept' => 'application/json',
            'X-TL-TOKEN' => 'SHA-256 hash of the public key and API key for this team',
        ],
        'json' => [
            'api_endpoint' => 'https://example.com/wp-json/',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost/api/v1/accounts/deleniti" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-TL-TOKEN: SHA-256 hash of the public key and API key for this team" \
    --data "{
    \"api_endpoint\": \"https:\\/\\/example.com\\/wp-json\\/\"
}"
const url = new URL(
    "http://localhost/api/v1/accounts/deleniti"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-TL-TOKEN": "SHA-256 hash of the public key and API key for this team",
};

let body = {
    "api_endpoint": "https:\/\/example.com\/wp-json\/"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
       "id": 4,
       "name": "sdsdf",
       "status": "active",
}
 

Example response (402):


{
    "error": "true",
    "message": "You do not have a valid TrustedLogin subscription"
}
 

Example response (403):


{
    "error": "true",
    "message": "You can not access this team"
}
 

Example response (404):


{
    "error": "true",
    "message": "Team Not Found"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "api_endpoint": [
            "The api endpoint field is required."
        ]
    }
}
 

Request      

POST api/v1/accounts/{accountId}

URL Parameters

accountId  string  

Body Parameters

api_endpoint  string optional  

The URL to the Vendor's WordPress REST API Endpoint.

Endpoints

POST api/v1/sites/{secret_id}/verify-identifier

Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/sites/11/verify-identifier',
    [
        'headers' => [
            'Accept' => 'application/json',
        ],
        'json' => [
            'timestamp' => 19,
            'user_agent' => 'qncokaujoszhfztrlfjpkfpgxobtpzssxlclwpqcwsgwhjvizeppqiqoywervmuycoguntkltyhzymlkarygukgclnpydbbruydkxrcdbhimvywyytlybjhjnkqojvutywgvteocygusoywdjjyawjqtuhalikuedlesvrxcedacjnvbxgsmmdmmrkzvjoiagwykutmftzbwtnukynypjsqkcwooluxgxoiciiwswpabuyxmgqzxnpq',
            'user_ip' => '179.246.69.83',
            'site_url' => 'eos',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost/api/v1/sites/11/verify-identifier" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"timestamp\": 19,
    \"user_agent\": \"qncokaujoszhfztrlfjpkfpgxobtpzssxlclwpqcwsgwhjvizeppqiqoywervmuycoguntkltyhzymlkarygukgclnpydbbruydkxrcdbhimvywyytlybjhjnkqojvutywgvteocygusoywdjjyawjqtuhalikuedlesvrxcedacjnvbxgsmmdmmrkzvjoiagwykutmftzbwtnukynypjsqkcwooluxgxoiciiwswpabuyxmgqzxnpq\",
    \"user_ip\": \"179.246.69.83\",
    \"site_url\": \"eos\"
}"
const url = new URL(
    "http://localhost/api/v1/sites/11/verify-identifier"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "timestamp": 19,
    "user_agent": "qncokaujoszhfztrlfjpkfpgxobtpzssxlclwpqcwsgwhjvizeppqiqoywervmuycoguntkltyhzymlkarygukgclnpydbbruydkxrcdbhimvywyytlybjhjnkqojvutywgvteocygusoywdjjyawjqtuhalikuedlesvrxcedacjnvbxgsmmdmmrkzvjoiagwykutmftzbwtnukynypjsqkcwooluxgxoiciiwswpabuyxmgqzxnpq",
    "user_ip": "179.246.69.83",
    "site_url": "eos"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/sites/{secret_id}/verify-identifier

URL Parameters

secret_id  integer  

The ID of the secret.

Body Parameters

timestamp  integer  

user_agent  string  

Must not be greater than 255 characters.

user_ip  string  

Must be a valid IP address.

site_url  string  

Report Brute Force Attempt.

Report that someone has tripped the lockdown on a client site.

Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/report-brute-force',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Authorization' => 'Public Key as Bearer Token',
        ],
        'json' => [
            'timestamp' => 'iure',
            'user_agent' => 'ea',
            'user_ip' => 'qui',
            'site_url' => 'https://example.com/',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost/api/v1/report-brute-force" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: Public Key as Bearer Token" \
    --data "{
    \"timestamp\": \"iure\",
    \"user_agent\": \"ea\",
    \"user_ip\": \"qui\",
    \"site_url\": \"https:\\/\\/example.com\\/\"
}"
const url = new URL(
    "http://localhost/api/v1/report-brute-force"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Public Key as Bearer Token",
};

let body = {
    "timestamp": "iure",
    "user_agent": "ea",
    "user_ip": "qui",
    "site_url": "https:\/\/example.com\/"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (204):

[Empty response]
 

Example response (422):


{
    "errors": {
        "identifier": [
            "The identifier field is required."
        ]
    }
}
 

Example response (500):


{
    "message": "Description of error"
}
 

Request      

POST api/v1/report-brute-force

Body Parameters

timestamp  timestamp optional  

The timestamp when the lockdown was initiated

user_agent  string optional  

The HTTP User Agent reported by the user

user_ip  string optional  

The user's IP address

site_url  string optional  

The URL of the site.

GET api/v1/logs/logins/{teamId}

Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost/api/v1/logs/logins/minima',
    [
        'headers' => [
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/v1/logs/logins/minima" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/logs/logins/minima"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (405):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
 

{
    "message": "Endpoint disabled",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Application.php",
    "line": 1118,
    "trace": [
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php",
            "line": 44,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/app/Http/Middleware/NotImplemented.php",
            "line": 24,
            "function": "abort"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "App\\Http\\Middleware\\NotImplemented",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 127,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 103,
            "function": "handleRequest",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 55,
            "function": "handleRequestUsingNamedLimiter",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 697,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 672,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 636,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 625,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 166,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
            "line": 40,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
            "line": 86,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/fruitcake/laravel-cors/src/HandleCors.php",
            "line": 52,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fruitcake\\Cors\\HandleCors",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/fideloper/proxy/src/TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fideloper\\Proxy\\TrustProxies",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 141,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 110,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 299,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 287,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 89,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 45,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 222,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 179,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 116,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 118,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 75,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 51,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
            "line": 46,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Container/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 653,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 136,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/symfony/console/Command/Command.php",
            "line": 299,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 121,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/symfony/console/Application.php",
            "line": 978,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/symfony/console/Application.php",
            "line": 295,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/symfony/console/Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Console/Application.php",
            "line": 94,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
            "line": 129,
            "function": "run",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/artisan",
            "line": 37,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/v1/logs/logins/{teamId}

URL Parameters

teamId  string  

GET api/v1/logs/logins/{teamId}/site/{siteId}

Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'http://localhost/api/v1/logs/logins/quis/site/15',
    [
        'headers' => [
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/v1/logs/logins/quis/site/15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/logs/logins/quis/site/15"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (405):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
 

{
    "message": "Endpoint disabled",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Application.php",
    "line": 1118,
    "trace": [
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php",
            "line": 44,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/app/Http/Middleware/NotImplemented.php",
            "line": 24,
            "function": "abort"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "App\\Http\\Middleware\\NotImplemented",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 127,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 103,
            "function": "handleRequest",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 55,
            "function": "handleRequestUsingNamedLimiter",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 697,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 672,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 636,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 625,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 166,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
            "line": 40,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
            "line": 86,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/fruitcake/laravel-cors/src/HandleCors.php",
            "line": 52,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fruitcake\\Cors\\HandleCors",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/fideloper/proxy/src/TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fideloper\\Proxy\\TrustProxies",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 141,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 110,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 299,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 287,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 89,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 45,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 222,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 179,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 116,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 118,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 75,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 51,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
            "line": 46,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Container/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 653,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 136,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/symfony/console/Command/Command.php",
            "line": 299,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 121,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/symfony/console/Application.php",
            "line": 978,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/symfony/console/Application.php",
            "line": 295,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/symfony/console/Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Console/Application.php",
            "line": 94,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
            "line": 129,
            "function": "run",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/josh/trustedlogin-ecommerce/artisan",
            "line": 37,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/v1/logs/logins/{teamId}/site/{siteId}

URL Parameters

teamId  string  

siteId  integer  

Sites API

The Site API is the interface between the Vendor and Client plugins, the SaaS, and the Vault.

POST api/v1/accounts/{accountId}/support-url

Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/accounts/provident/support-url',
    [
        'headers' => [
            'Accept' => 'application/json',
        ],
        'json' => [
            'reason' => 'minus',
            'meta_data' => '["laborum","sunt"]',
            'team' => 2,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost/api/v1/accounts/provident/support-url" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"minus\",
    \"meta_data\": \"[\\\"laborum\\\",\\\"sunt\\\"]\",
    \"team\": 2
}"
const url = new URL(
    "http://localhost/api/v1/accounts/provident/support-url"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "reason": "minus",
    "meta_data": "[\"laborum\",\"sunt\"]",
    "team": 2
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/accounts/{accountId}/support-url

URL Parameters

accountId  string  

Body Parameters

reason  string  

meta_data  string optional  

Must be a valid JSON string.

team  integer optional  

Create a site.

Adds a site to the SaaS and the Vault, associated with the vendor

Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/sites',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Authorization' => 'Public Key as Bearer Token',
        ],
        'json' => [
            'accessKey' => '69a41a5d53dd23ae',
            'secretId' => 'nobis',
            'siteUrl' => 'https://example.com/',
            'identifier' => 'qguuiuseiiltrmfclelqeeglnorblbee',
            'team' => 1,
            'nonce' => 'expedita',
            'clientPublicKey' => 'alias',
            'metaData' => [
                'accusantium',
            ],
            'version' => 'spbgurdjmwfwsb',
            'wpUserId' => 14,
            'expiresAt' => 13,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost/api/v1/sites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: Public Key as Bearer Token" \
    --data "{
    \"accessKey\": \"69a41a5d53dd23ae\",
    \"secretId\": \"nobis\",
    \"siteUrl\": \"https:\\/\\/example.com\\/\",
    \"identifier\": \"qguuiuseiiltrmfclelqeeglnorblbee\",
    \"team\": 1,
    \"nonce\": \"expedita\",
    \"clientPublicKey\": \"alias\",
    \"metaData\": [
        \"accusantium\"
    ],
    \"version\": \"spbgurdjmwfwsb\",
    \"wpUserId\": 14,
    \"expiresAt\": 13
}"
const url = new URL(
    "http://localhost/api/v1/sites"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Public Key as Bearer Token",
};

let body = {
    "accessKey": "69a41a5d53dd23ae",
    "secretId": "nobis",
    "siteUrl": "https:\/\/example.com\/",
    "identifier": "qguuiuseiiltrmfclelqeeglnorblbee",
    "team": 1,
    "nonce": "expedita",
    "clientPublicKey": "alias",
    "metaData": [
        "accusantium"
    ],
    "version": "spbgurdjmwfwsb",
    "wpUserId": 14,
    "expiresAt": 13
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "success": true
}
 

Example response (422):


{
    "errors": {
        "identifier": [
            "The identifier field is required."
        ]
    }
}
 

Example response (500):


{
    "message": "Description of error"
}
 

Request      

POST api/v1/sites

Body Parameters

accessKey  string  

The site's license key or other customer identifier.

secretId  string  

A unique string representing the client site. Stored outside the Vault.

siteUrl  url optional  

The URL of the site.

identifier  string  

Must not be greater than 255 characters.

team  integer  

ID of account/team.

nonce  string  

A unique string used to validate that the request is coming from the client

clientPublicKey  required optional  

The public key of the client site

metaData  string[] optional  

version  string optional  

Must not be greater than 50 characters.

wpUserId  integer optional  

The User ID of the WordPress user on the client site who made this request

expiresAt  integer optional  

The timestamp when this support account should expire

Lookup Site by Access Key(s) or Hashed Licesne Keys.

Retrieve an array of sites' secretIds by querying one or more access keys or hashed license keys

Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/accounts/in/sites',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Authorization' => 'Private Key as Bearer Token',
        ],
        'json' => [
            'searchKeys' => [
                'accessKey1',
                'accessKey2',
                'licenseKey1',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost/api/v1/accounts/in/sites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: Private Key as Bearer Token" \
    --data "{
    \"searchKeys\": [
        \"accessKey1\",
        \"accessKey2\",
        \"licenseKey1\"
    ]
}"
const url = new URL(
    "http://localhost/api/v1/accounts/in/sites"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Private Key as Bearer Token",
};

let body = {
    "searchKeys": [
        "accessKey1",
        "accessKey2",
        "licenseKey1"
    ]
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"accessKey1": [
"secretId1"
],
"accessKey2": [
"secretId2",
"secretId3"
]
"accessKey2": [
"secretId2",
"secretId3"
]
}
 

Example response (204, No sites):

[Empty response]
 

Example response (400, no access key provided):


{
    "message": "Missing searchKeys parameter in body"
}
 

Example response (400, access key provided, but not an array):


{
    "message": "searchKeys parameter must be an array"
}
 

Example response (401):


Unauthenticated.
 

Example response (500):


{
    "message": "Description of error"
}
 

Request      

POST api/v1/accounts/{accountId}/sites

URL Parameters

accountId  string  

Body Parameters

searchKeys  string[]  

The access key(s) or hashed license keys to query

Delete a site.

The url param secretId is the secretId the client used to create the site

DELETE /api/sites/<secretId>

Example request:
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'http://localhost/api/v1/sites/7',
    [
        'headers' => [
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request DELETE \
    "http://localhost/api/v1/sites/7" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/sites/7"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (201):


{
    "deleted": "true"
}
 

Example response (200):


{
    "deleted": "false"
}
 

Example response (404):


{
    "message": "Site not found"
}
 

Request      

DELETE api/v1/sites/{secretId}

URL Parameters

secretId  integer  

Get Site Envelope.

Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'http://localhost/api/v1/sites/2/neque/get-envelope',
    [
        'headers' => [
            'Accept' => 'application/json',
            'Authorization' => 'Private Key as Bearer Token',
            'X-TL-TOKEN' => 'SHA-256 hash of the public key and API key for this team',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost/api/v1/sites/2/neque/get-envelope" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "Authorization: Private Key as Bearer Token" \
    --header "X-TL-TOKEN: SHA-256 hash of the public key and API key for this team"
const url = new URL(
    "http://localhost/api/v1/sites/2/neque/get-envelope"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Private Key as Bearer Token",
    "X-TL-TOKEN": "SHA-256 hash of the public key and API key for this team",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (401, Invalid Authorization header):


Unauthenticated.
 

Example response (401, Invalid X-TL-TOKEN header):


Unauthenticated.
 

Example response (401, Invalid nonce):


Invalid signature - identity of vendor not validate
 

Example response (404, Unable to verify team):



 

Example response (500):


{
    "message": "Description of error"
}
 

Request      

POST api/v1/sites/{accountId}/{secret_id}/get-envelope

URL Parameters

accountId  integer  

secret_id  string  

The ID of the secret.