Welcome to El-Makina API Documentation. Integrate our powerful marketing automation features into your own applications.
All API requests require authentication using an API key. You can generate your API key from your account dashboard.
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
All API endpoints are relative to the base URL:
https://www.tijaratech.store/api/v1/
List Connected Pages
GET /pages
Returns a list of all Facebook pages connected to your account.
Get Page Details
GET /pages/{page_id}
Create Bot Flow
POST /bot/flows
{
"page_id": "123456789",
"flow_name": "Welcome Flow",
"trigger": "keyword",
"responses": [...]
}
List Bot Flows
GET /bot/flows?page_id={page_id}
Update Bot Flow
PUT /bot/flows/{flow_id}
Delete Bot Flow
DELETE /bot/flows/{flow_id}
Send Broadcast Message
POST /broadcast
{
"page_id": "123456789",
"message": "Your message here",
"subscribers": ["user1", "user2"],
"schedule_time": "2024-01-01 12:00:00"
}
Get Broadcast History
GET /broadcast/history?page_id={page_id}
List Subscribers
GET /subscribers?page_id={page_id}
Get Subscriber Details
GET /subscribers/{subscriber_id}
Add Tags to Subscriber
POST /subscribers/{subscriber_id}/tags
{
"tags": ["vip", "customer"]
}
Create Post
POST /posts
{
"page_id": "123456789",
"message": "Your post content",
"image_url": "https://example.com/image.jpg",
"schedule_time": "2024-01-01 12:00:00"
}
List Scheduled Posts
GET /posts/scheduled?page_id={page_id}
{
"success": true,
"data": {...},
"message": "Operation completed successfully"
}
{
"success": false,
"error": {
"code": 400,
"message": "Invalid request parameters"
}
}
Configure webhooks to receive real-time notifications for events:
Webhook Endpoint Setup
POST /webhooks
{
"url": "https://your-domain.com/webhook",
"events": ["message.received", "subscriber.new"],
"secret": "your_webhook_secret"
}
<?php
$api_key = 'YOUR_API_KEY';
$url = 'https://www.tijaratech.store/api/v1/pages';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $api_key,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
?>
fetch('https://www.tijaratech.store/api/v1/pages', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
For API support and questions:
Note: This API is currently in beta. Features and endpoints may change. We'll notify all API users of any breaking changes at least 30 days in advance.