Integrate DigitalPrank tools into your application
All API requests require authentication using your Affiliate ID and API Key.
curl -X GET https://digitalprank.com/api/tools \
-H "X-Affiliate-ID: TEST123" \
-H "X-API-Key: aff_test_c220484957a..."
curl "https://digitalprank.com/api/tools?affiliate_id=TEST123&api_key=aff_test_c220484957a..."
| Method | Endpoint | Description |
|---|---|---|
| GET | /api |
API information and status |
| GET | /api/tools |
List all available tools |
| GET | /api/tools/{id} |
Get specific tool information |
| GET | /api/tools/{slug}/embed |
Get embed code for a tool |
Retrieve a list of all available tools with affiliate tracking URLs.
Request:curl -X GET https://digitalprank.com/api/tools \
-H "X-Affiliate-ID: TEST123" \
-H "X-API-Key: aff_test_c220484957a..."
Response:
{
"success": true,
"count": 5,
"tools": [
{
"tool_id": 1,
"name": "Fake Text Message Generator",
"slug": "fake-text-message",
"subdomain": "fake-text-message-generator",
"url": "https://fake-text-message-generator.digitalprank.com",
"affiliate_url": "https://fake-text-message-generator.digitalprank.com?ref=TEST123",
"embed_url": "https://fake-text-message-generator.digitalprank.com?ref=TEST123&embed=1"
}
],
"affiliate": {
"code": "TEST123",
"commission_rate": "30%"
}
}
Get detailed information about a specific tool.
Request:curl -X GET https://digitalprank.com/api/tools/1 \
-H "X-Affiliate-ID: TEST123" \
-H "X-API-Key: aff_test_c220484957a..."
Response:
{
"success": true,
"tool": {
"tool_id": 1,
"name": "Fake Text Message Generator",
"slug": "fake-text-message",
"subdomain": "fake-text-message-generator",
"category": "messaging",
"credit_cost": 1,
"is_active": 1,
"url": "https://fake-text-message-generator.digitalprank.com",
"affiliate_url": "https://fake-text-message-generator.digitalprank.com?ref=TEST123",
"embed_url": "https://fake-text-message-generator.digitalprank.com?ref=TEST123&embed=1"
}
}
Get ready-to-use embed code for a tool.
Request:curl -X GET https://digitalprank.com/api/tools/fake-text-message/embed \
-H "X-Affiliate-ID: TEST123" \
-H "X-API-Key: aff_test_c220484957a..."
Response:
{
"success": true,
"tool": {
"name": "Fake Text Message Generator",
"slug": "fake-text-message",
"url": "https://fake-text-message-generator.digitalprank.com?ref=TEST123"
},
"embed_code": "<iframe src=\"...\" width=\"100%\" height=\"600\" frameborder=\"0\"></iframe>",
"iframe_src": "https://fake-text-message-generator.digitalprank.com?ref=TEST123"
}
const axios = require('axios');
const API_URL = 'https://digitalprank.com/api';
const AFFILIATE_ID = 'TEST123';
const API_KEY = 'aff_test_c220484957a...';
async function getTools() {
try {
const response = await axios.get(`${API_URL}/tools`, {
headers: {
'X-Affiliate-ID': AFFILIATE_ID,
'X-API-Key': API_KEY
}
});
console.log(response.data);
return response.data.tools;
} catch (error) {
console.error('API Error:', error.message);
}
}
getTools();
import requests
API_URL = 'https://digitalprank.com/api'
AFFILIATE_ID = 'TEST123'
API_KEY = 'aff_test_c220484957a...'
def get_tools():
headers = {
'X-Affiliate-ID': AFFILIATE_ID,
'X-API-Key': API_KEY
}
response = requests.get(f'{API_URL}/tools', headers=headers)
if response.status_code == 200:
data = response.json()
return data['tools']
else:
print(f'Error: {response.status_code}')
return None
tools = get_tools()
print(tools)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://digitalprank.com/api/tools');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-Affiliate-ID: TEST123',
'X-API-Key: aff_test_c220484957a...'
]);
$response = curl_exec($ch);
$statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($statusCode === 200) {
$data = json_decode($response, true);
print_r($data['tools']);
}
# Get all tools
curl -X GET https://digitalprank.com/api/tools \
-H "X-Affiliate-ID: TEST123" \
-H "X-API-Key: aff_test_c220484957a..."
# Get specific tool
curl -X GET https://digitalprank.com/api/tools/1 \
-H "X-Affiliate-ID: TEST123" \
-H "X-API-Key: aff_test_c220484957a..."
# Get embed code
curl -X GET https://digitalprank.com/api/tools/fake-text-message/embed \
-H "X-Affiliate-ID: TEST123" \
-H "X-API-Key: aff_test_c220484957a..."
X-RateLimit-Remaining shows remaining quotaNeed help? Here's how to get support: