Skip to main content

API Integration

API Overview​

TDS.SO provides a REST API for programmatically managing all system features. The API supports creating redirects, managing domains, retrieving statistics, and other operations.

Base URL​

https://dashboard.tds.so/api/v2/

Authentication​

All API requests must include the token parameter — your API key, which can be obtained in the settings section of the dashboard.

Important

Store your API key securely and do not share it with third parties.

API Methods​

Create Template​

Endpoint: POST /create/template

Parameters:

ParameterRequiredTypeDescription
tokenYesstringAPI key
setting_nameYesstringTemplate name
setting_descriptionNostringTemplate description
redirect_typeNostringRedirect type (meta, js, 301, 302, iframe, etc.)
redirect_delayNointegerRedirect delay (1-10 sec)
POST /api/v2/create/template
token=your_api_key&setting_name=Test_Template&redirect_type=meta

Create Redirect​

Endpoint: POST /create/redirect

Parameters:

ParameterRequiredTypeDescription
tokenYesstringAPI key
redirect_domainsYesstringRedirect domains (comma-separated)
link_listsYesstringTarget URLs (comma-separated)
templateNostring/intTemplate ID or name
POST /api/v2/create/redirect
token=your_api_key&redirect_domains=domain1.com,domain2.com&link_lists=https://target1.com

Retrieve Data​

Endpoint: GET /get/links

Parameters:

ParameterRequiredTypeDescription
tokenYesstringAPI key
offsetNointegerNumber of records (1-100)
template_idNointegerTemplate ID

Domain List​

Endpoint: GET /get/domains

Parameters:

ParameterRequiredTypeDescription
tokenYesstringAPI key
template_idNointegerTemplate ID

Domain Management​

Check Domains​

Endpoint: POST /domains/check

Parameters:

ParameterRequiredTypeDescription
tokenYesstringAPI key
domains_listYesstringDomain list (comma-separated)
check_vkNobooleanVK ban check

Delete Domains​

Endpoint: POST /domains/delete

Parameters:

ParameterRequiredTypeDescription
tokenYesstringAPI key
domains_listYesstringDomain list (comma-separated)

Error Handling​

All errors are returned in JSON format with error and error_id fields:

{
"error": "Invalid token",
"error_id": 2
}

Error Codes​

error_idDescription
0Panel expired
1Required field not filled
2Invalid API key
3Invalid method name
4Empty response
5Parameter validation error

Usage Examples​

PHP​

$token = 'your_api_key';
$url = 'https://dashboard.tds.so/api/v2/create/template';

$data = [
'token' => $token,
'setting_name' => 'Test Template',
'redirect_type' => 'meta'
];

$response = file_get_contents($url . '?' . http_build_query($data));
$result = json_decode($response, true);

Python​

import requests

token = 'your_api_key'
url = 'https://dashboard.tds.so/api/v2/create/template'

data = {
'token': token,
'setting_name': 'Test Template',
'redirect_type': 'meta'
}

response = requests.post(url, data=data)
result = response.json()

JavaScript​

const token = 'your_api_key';
const url = 'https://dashboard.tds.so/api/v2/create/template';

const data = {
token: token,
setting_name: 'Test Template',
redirect_type: 'meta'
};

fetch(url + '?' + new URLSearchParams(data))
.then(response => response.json())
.then(result => console.log(result));

Usage Recommendations​

  1. Error Handling
  • Always check for the error field in the response
  • Implement retries for network failures
  • Use timeouts for requests
  1. Optimization
  • Cache results where possible
  • Group requests for bulk operations
  • Use pagination for large lists
  1. Security
  • Store your API key securely
  • Use HTTPS for all requests
  • Restrict access to your API key
Tip

Start by testing the API on a small scale before deploying it to production.