Start Automation Task
POST https://api-mwm.datallog.com/api/start-automation/{project_name}/{automation_name}
Starts the execution of an automation belonging to a project owned by the authenticated user.
This endpoint validates user access, project and automation status, plan validity, user balance, seed/webhook configuration, and then triggers the execution pipeline.
Authentication
This endpoint requires both of the following headers.
Authorization: Token <your_token>
x-api-key: <your_x_api_key>Path Parameters
| Parameter | Type | Description |
|---|---|---|
project_name | string | Name of the user project. |
automation_name | string | Name of the automation in the project. |
Request Body (JSON)
The request body is optional, but it may include:
1. webhook (optional)
Overrides or defines a webhook for the execution.
{
"webhook": {
"url": "https://yourdomain.com/webhook",
"webhook_header": {
"Authorization": "Bearer 123",
"Custom-Header": "ABC"
}
}
}Accepted formats:
- JSON object
- JSON string
If omitted: → The system will use the automation's default webhook, if available and active.
2. seed (optional)
Custom seed data to be passed to the execution.
{
"seed": {
"user_id": 123,
"filters": ["a", "b"]
}
}Or as a JSON string:
{
"seed": "{\"user_id\": 123}"
}If omitted: → No seed is passed unless the execution comes from a scheduled trigger.
Validation Rules
The request will fail if any of the following conditions occur:
- Project does not exist
- Automation does not exist
- Project is inactive
- User has no active plan
- User balance is insufficient
- Automation is disabled
- Webhook or seed contains invalid JSON
Success Response (200)
{
"status": "success",
"message": "Automation <automation_name> started successfully.",
"execution_id": "<uuid>"
}Error Responses
403 — Project not found
{
"message": "This Project does not exist. consult API"
}403 — Automation not found
{
"message": "This Automation does not exist. consult API"
}400 — Invalid webhook JSON
{
"status": "error",
"message": "Invalid webhook JSON format"
}400 — Generic execution error
{
"status": "error",
"message": "User doesn't have an active plan"
}Example Request
curl -X POST \
https://api-mwm.datallog.com/api/start-automation/{project_name}/{automation_name} \
-H "Authorization: Token <YOUR_TOKEN>" \
-H "x-api-key: <YOUR_X_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"webhook": {
"url": "https://yourdomain.com/webhook",
"webhook_header": {
"Authorization": "Bearer 123"
}
},
"seed": {
"id": 1,
"action": "start"
}
}'