API Documentation
Integrate KeppTa into your platform, build custom widgets, and automate your business with our comprehensive REST API.
Quick Start
1. Get API Keys
Generate your API key and secret from your creator dashboard settings.
2. Make Requests
Include your API key and secret in request headers.
3. Build & Scale
Integrate with your platform and automate your business.
Base URL
https://api.keppta.com
Authentication
API Key Authentication
All API requests must include your API key and secret in the request headers.
Required Headers:
X-API-Key
Your API key (starts with spk_)
X-API-Secret
Your API secret
Code Examples
curl -H "X-API-Key: spk_your_key_here" -H "X-API-Secret: your_secret_here"
headers: { "X-API-Key": "spk_your_key_here", "X-API-Secret": "your_secret_here" }
Security Best Practices
- Keep your API secret secure and never expose it in client-side code
- Use HTTPS for all API requests
- Rotate your API keys regularly
- Monitor your API usage and set appropriate rate limits
API Endpoints
Authentication
All API requests require authentication using API keys.
/api/auth/login
Authenticate user and get access token
Parameters:
email
string|required|email
password
string|required|min:8
Response:
{
"success": "boolean",
"data": {
"user": "object",
"token": "string"
}
}
Products
Manage your digital products, courses, and services.
/api/products
List all products
Parameters:
page
integer|optional
per_page
integer|optional|max:100
search
string|optional
category
string|optional
status
string|optional|in:published,draft,archived
Response:
{
"success": "boolean",
"data": "array",
"pagination": "object"
}
/api/products
Create a new product
Parameters:
name
string|required|max:255
description
string|required
price
numeric|required|min:0
category_id
integer|required
is_published
boolean|optional|default:false
Response:
{
"success": "boolean",
"data": "object"
}
/api/products/{id}
Get a specific product
Parameters:
id
integer|required
Response:
{
"success": "boolean",
"data": "object"
}
/api/products/{id}
Update a product
Parameters:
id
integer|required
name
string|optional|max:255
description
string|optional
price
numeric|optional|min:0
Response:
{
"success": "boolean",
"data": "object"
}
/api/products/{id}
Delete a product
Parameters:
id
integer|required
Response:
{
"success": "boolean",
"message": "string"
}
Orders
Manage customer orders and transactions.
/api/orders
List all orders
Parameters:
page
integer|optional
per_page
integer|optional|max:100
status
string|optional|in:pending,paid,delivered,cancelled
date_from
date|optional
date_to
date|optional
Response:
{
"success": "boolean",
"data": "array",
"pagination": "object"
}
/api/orders/{id}
Get a specific order
Parameters:
id
integer|required
Response:
{
"success": "boolean",
"data": "object"
}
Analytics
Access sales and performance analytics.
/api/analytics/overview
Get analytics overview
Parameters:
period
string|optional|in:7d,30d,90d,1y
date_from
date|optional
date_to
date|optional
Response:
{
"success": "boolean",
"data": {
"total_sales": "number",
"total_orders": "integer",
"total_customers": "integer",
"conversion_rate": "number"
}
}
/api/analytics/products
Get product performance analytics
Parameters:
period
string|optional|in:7d,30d,90d,1y
product_id
integer|optional
Response:
{
"success": "boolean",
"data": "array"
}
Webhooks
Set up webhooks to receive real-time notifications.
/api/webhooks
Create a webhook
Parameters:
url
string|required|url
events
array|required
secret
string|optional
Response:
{
"success": "boolean",
"data": "object"
}
Code Examples
cURL
curl -X GET "https://api.keppta.com/api/products" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-H "Content-Type: application/json"
curl -X POST "https://api.keppta.com/api/products" \
-H "X-API-Key: your_api_key" \
-H "X-API-Secret: your_api_secret" \
-H "Content-Type: application/json" \
-d '{
"name": "My Digital Product",
"description": "A great digital product",
"price": 29.99,
"category_id": 1,
"is_published": true
}'
JavaScript (Fetch)
const response = await fetch("https://api.keppta.com/api/products", {
method: "GET",
headers: {
"X-API-Key": "your_api_key",
"X-API-Secret": "your_api_secret",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);
const response = await fetch("https://api.keppta.com/api/products", {
method: "POST",
headers: {
"X-API-Key": "your_api_key",
"X-API-Secret": "your_api_secret",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "My Digital Product",
description: "A great digital product",
price: 29.99,
category_id: 1,
is_published: true
})
});
const data = await response.json();
console.log(data);
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.keppta.com/api/products");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: your_api_key",
"X-API-Secret: your_api_secret",
"Content-Type: application/json"
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
print_r($data);
Python
import requests
headers = {
"X-API-Key": "your_api_key",
"X-API-Secret": "your_api_secret",
"Content-Type": "application/json"
}
response = requests.get("https://api.keppta.com/api/products", headers=headers)
data = response.json()
print(data)
Rate Limiting
Default Limits
1000 requests per hour per API key
Rate Limit Headers:
X-RateLimit-Limit
Maximum requests allowed per hour
X-RateLimit-Remaining
Remaining requests in current hour
X-RateLimit-Reset
Unix timestamp when rate limit resets
Plan Limits
Rate Limit Exceeded
Error Codes
400 BAD_REQUEST
The request was invalid or cannot be served
Check your request parameters and try again
401 UNAUTHORIZED
Authentication failed
Invalid or missing API key/secret
403 FORBIDDEN
Access denied
You don't have permission to access this resource
404 NOT_FOUND
Resource not found
The requested resource does not exist
422 UNPROCESSABLE_ENTITY
Validation failed
The request data failed validation
429 RATE_LIMIT_EXCEEDED
Rate limit exceeded
You have exceeded your API rate limit
500 INTERNAL_SERVER_ERROR
Internal server error
Something went wrong on our end
Ready to Get Started?
Generate your API keys and start building amazing integrations with KeppTa.