API Documentation
Build powerful integrations with the Click Medias AISO Platform API
Introduction
The Click Medias API provides programmatic access to the AISO platform. You can use it to manage clients, retrieve reports, trigger crawls, and integrate AISO data into your own applications.
Base URL
https://clickmedias.com/wp-json/clickmedias/v1
Response Format
All responses are returned in JSON format with the following structure:
{
"success": true,
"data": { ... },
"meta": { ... } // Optional pagination info
}
Authentication
The API supports two authentication methods:
1. API Key Authentication
Include your API key in the request header:
X-API-Key: your_api_key_here
2. Token Authentication
Generate a temporary token using your credentials:
Request Body
{
"username": "your_username",
"password": "your_password"
}
Response
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIs...",
"expires": "2026-01-30T12:00:00+00:00",
"user_id": 123,
"role": "cm_client"
}
⚠️ Security Note
Keep your API keys secure. Never expose them in client-side code or public repositories.
Rate Limits
API requests are rate limited to ensure fair usage:
| Plan | Requests/Minute | Requests/Day |
|---|---|---|
| Starter | 60 | 1,000 |
| Advanced | 120 | 5,000 |
| Business | 300 | 20,000 |
| Agency | 600 | 100,000 |
Rate limit headers are included in all responses:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1706014800
Error Handling
The API uses standard HTTP status codes and returns detailed error messages:
| Code | Meaning |
|---|---|
200 |
Success |
201 |
Created |
400 |
Bad Request - Invalid parameters |
401 |
Unauthorized - Invalid or missing authentication |
403 |
Forbidden - Insufficient permissions |
404 |
Not Found - Resource doesn't exist |
429 |
Too Many Requests - Rate limit exceeded |
500 |
Server Error |
Error Response Format
{
"success": false,
"error": "Human-readable error message",
"code": "error_code"
}
List Clients
Retrieve a paginated list of all clients.
Query Parameters
page |
integer | Page number (default: 1) |
per_page |
integer | Results per page (default: 20, max: 100) |
status |
string | Filter by status: active, inactive, pending |
search |
string | Search by company name or website |
Example Request
curl -X GET "https://clickmedias.com/wp-json/clickmedias/v1/clients?page=1&per_page=10" \
-H "X-API-Key: your_api_key"
Response
{
"success": true,
"data": [
{
"id": 1,
"company_name": "Acme Corp",
"website_url": "https://acme.com",
"contact_email": "contact@acme.com",
"plan_type": "business",
"status": "active",
"created_at": "2026-01-01 00:00:00"
}
],
"meta": {
"total": 45,
"page": 1,
"per_page": 10,
"total_pages": 5
}
}
Get Client
Retrieve details for a specific client.
Path Parameters
id |
integer | Required. The client ID. |
Response
{
"success": true,
"data": {
"id": 1,
"user_id": 123,
"company_name": "Acme Corp",
"website_url": "https://acme.com",
"contact_name": "John Doe",
"contact_email": "john@acme.com",
"contact_phone": "+1 555-0123",
"industry": "Technology",
"plan_type": "business",
"status": "active",
"backlink_count": 45,
"citation_count": 32,
"last_crawl_date": "2026-01-20 12:00:00",
"created_at": "2026-01-01 00:00:00"
}
}
Create Client
Create a new client account.
Request Body
company_name |
string | Required. Company name. |
website_url |
string | Required. Full website URL. |
contact_email |
string | Required. Contact email address. |
contact_name |
string | Contact person's name. |
contact_phone |
string | Contact phone number. |
industry |
string | Business industry. |
plan_type |
string | Plan: starter, advanced, business, agency |
Example Request
curl -X POST "https://clickmedias.com/wp-json/clickmedias/v1/clients" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"company_name": "New Company",
"website_url": "https://newcompany.com",
"contact_email": "hello@newcompany.com",
"plan_type": "advanced"
}'
Update Client
Update an existing client's information.
Send only the fields you want to update.
Delete Client
Permanently delete a client and all associated data.
⚠️ Caution
This action is irreversible. All client data, reports, and history will be permanently deleted.
List Reports
Get all reports for a specific client.
Query Parameters
limit |
integer | Number of reports to return (default: 12) |
Get Latest Report
Retrieve the most recent report for a client with full details.
Response
{
"success": true,
"data": {
"id": 42,
"client_id": 1,
"report_date": "2026-01-15",
"seo_score": 78,
"aiso_score": 72,
"ai_visibility_score": 65,
"domain_authority": 45,
"organic_traffic": 12500,
"month_over_month": {
"seo_score_change": 5,
"aiso_score_change": 8,
"da_change": 2,
"traffic_change": 1500
},
"year_over_year": {
"seo_score_change": 23,
"aiso_score_change": 31,
"traffic_change": 8500
},
"recommendations": [
{
"title": "Optimize meta descriptions",
"description": "Update meta descriptions on 15 pages",
"priority": "high"
}
],
"pdf_url": "https://..."
}
}
Generate Report
Trigger generation of a new monthly report.
This will create a new report based on the latest crawl data.
Get Current Scores
Get the latest scores for a client.
Response
{
"success": true,
"data": {
"seo_score": 78,
"aiso_score": 72,
"ai_visibility_score": 65,
"domain_authority": 45,
"organic_traffic": 12500
}
}
Get Score History
Get historical score data with growth calculations.
Query Parameters
months |
integer | Number of months (default: 12) |
Response
{
"success": true,
"data": {
"history": [
{
"report_date": "2026-01-15",
"seo_score": 78,
"aiso_score": 72,
"domain_authority": 45,
"organic_traffic": 12500
},
{
"report_date": "2025-12-15",
"seo_score": 73,
"aiso_score": 64,
"domain_authority": 43,
"organic_traffic": 11000
}
],
"growth": {
"seo_growth": 23,
"aiso_growth": 31,
"da_growth": 12,
"traffic_growth": 8500,
"traffic_growth_percent": 68.2
}
}
}
List Crawls
Get crawl history and status.
Query Parameters
client_id |
integer | Filter by client |
status |
string | Filter: pending, processing, completed, failed |
Trigger Crawl
Initiate a new crawl for a client's website.
Request Body
client_id |
integer | Required. Client to crawl. |
type |
string | Crawl type: full, partial, technical |
Response
{
"success": true,
"data": {
"crawl_id": 123,
"status": "pending"
}
}
Request Audit
Submit a free AISO audit request. No authentication required.
Request Body
email |
string | Required. Email address. |
website_url |
string | Required. Website to audit. |
name |
string | Contact name. |
company |
string | Company name. |
Response
{
"success": true,
"data": {
"audit_id": 456,
"key": "abc123...",
"status": "pending",
"results_url": "https://.../audit-results/?id=456&key=abc123..."
}
}
Get Audit Results
Retrieve audit results using the audit ID and key.
Backlinks
Get backlinks pointing to a client's website.
Citations
Get business citations for a client.
AI Content
Get and generate AI-created content.
Query Parameters
status |
string | draft, published, approved |
type |
string | blog, press_release, social |
Request Body
type |
string | Content type: blog, press_release |
topic |
string | Topic or title suggestion |
AI Suggestions
Get AI-generated optimization suggestions.
Query Parameters
status |
string | pending, approved, deployed, dismissed |
Create Webhook
Register a webhook to receive real-time notifications.
Request Body
url |
string | Required. Your webhook endpoint URL. |
events |
array | Events to subscribe to (or ["*"] for all) |
Response
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://your-app.com/webhooks/clickmedias",
"events": ["report.generated", "crawl.completed"],
"secret": "whsec_abc123..."
}
}
Webhook Events
Available webhook events:
| Event | Description |
|---|---|
client.created |
New client account created |
client.updated |
Client information updated |
crawl.started |
Website crawl initiated |
crawl.completed |
Website crawl finished |
report.generated |
Monthly report created |
content.created |
AI content generated |
audit.completed |
Free audit finished |
Webhook Payload
{
"event": "report.generated",
"timestamp": "2026-01-23T12:00:00Z",
"data": {
"client_id": 1,
"report_id": 42,
"seo_score": 78,
"aiso_score": 72
}
}
Verifying Webhooks
Verify webhook authenticity using the signature header:
$signature = $_SERVER['HTTP_X_CM_SIGNATURE'];
$payload = file_get_contents('php://input');
$expected = hash_hmac('sha256', $payload, $webhook_secret);
if (hash_equals($expected, $signature)) {
// Valid webhook
}
Ready to Get Started?
Contact us to get your API key and start building integrations.