API Documentation
Build powerful integrations with our comprehensive REST API. Access SEO audits, keyword tracking, and analytics programmatically.
Authorization: Bearer sk_live_your_api_key10009981679529600Quick Start
1Get your API key
Navigate to your dashboard settings and generate a new API key. Keep this key secure - it provides full access to your account.
Generate API Key2Make your first request
Test your API key by listing your customers:
curl -X GET "https://api.studios.ml/v1/customers" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json"3Start an SEO audit
Trigger an automated SEO audit for any customer:
curl -X POST "https://api.studios.ml/v1/audits" \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "cust_abc123",
"type": "full",
"priority": "high"
}'API Reference
Webhooks
Receive real-time notifications when events happen in your account. Webhooks are sent as HTTP POST requests with a JSON payload.
Available Events
audit.startedTriggered when an SEO audit beginsaudit.completedTriggered when an SEO audit finishesaudit.failedTriggered when an audit encounters an errorranking.changedTriggered when keyword rankings change significantlyranking.alertTriggered when a keyword drops below thresholdcustomer.createdTriggered when a new customer is addedcustomer.updatedTriggered when customer details changecontent.suggestionTriggered when new content suggestions are readyWebhook Payload Example
{
"id": "evt_abc123xyz",
"type": "audit.completed",
"created": "2024-03-20T15:35:00Z",
"data": {
"audit_id": "audit_def456",
"customer_id": "cust_abc123",
"score": 85,
"issues_found": 12,
"status": "completed"
}
}Verifying Webhook Signatures
Each webhook includes a X-Signature header. Verify this signature using your webhook secret to ensure the request is from Studios.ml.
Error Codes
The API uses standard HTTP status codes. All errors return a JSON response with details.
Error Response Format
{
"error": {
"code": "invalid_request",
"message": "The customer_id parameter is required",
"param": "customer_id",
"doc_url": "https://studios.ml/docs/api#customers"
}
}SDK Libraries
Official client libraries make it easy to integrate Studios.ml into your applications.
npm install @studiosml/sdkpip install studiosmlgem install studiosmlcomposer require studiosml/sdkgo get github.com/studiosml/go-sdkimplementation "com.studiosml:sdk:1.0.0"JavaScript Example
import { StudiosML } from '@studiosml/sdk';
const client = new StudiosML('sk_live_your_api_key');
// List customers
const customers = await client.customers.list({ limit: 10 });
// Start an audit
const audit = await client.audits.create({
customer_id: 'cust_abc123',
type: 'full'
});
// Track keywords
await client.keywords.create({
customer_id: 'cust_abc123',
keywords: ['seo tools', 'keyword tracker']
});Python Example
import studiosml
client = studiosml.Client("sk_live_your_api_key")
# List customers
customers = client.customers.list(limit=10)
# Start an audit
audit = client.audits.create(
customer_id="cust_abc123",
type="full"
)
# Track keywords
client.keywords.create(
customer_id="cust_abc123",
keywords=["seo tools", "keyword tracker"]
)https://api.studios.ml/v1Ready to build?
Get started with the Studios.ml API today. Generate your API key and start building powerful SEO integrations.