Workflows
Endpoints públicos da API para listar, criar, atualizar e excluir workflows, e para logs de execução e duplicação. Todos requerem o header X-API-KEY.
| Método | Endpoint | Descrição |
|---|---|---|
| GET | /v1/workflows/ | Listar workflows (paginado) |
| GET | /v1/workflows/{uuid}/ | Obter um workflow |
| POST | /v1/workflows/ | Criar um workflow |
| PUT | /v1/workflows/{uuid}/ | Atualizar um workflow |
| DELETE | /v1/workflows/{uuid}/ | Excluir um workflow |
| GET | /v1/workflows/{uuid}/execution_logs/ | Obter logs de execução |
| POST | /v1/workflows/{uuid}/duplicate/ | Duplicar um workflow |
GET /v1/workflows/
/v1/workflows/ Retorna uma lista paginada de workflows com filtragem e ordenação opcionais.
Query params
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| name | string | Não | Filtrar por nome (busca). |
| filter | string | Não | all (padrão), me, others, active, inactive. |
| order | string | Não | alphabetical (padrão), recent, total. |
| is_ascend | boolean | Não | Direção da ordenação. Padrão: false. |
| workflows_uuids | string | Não | Restringir a UUIDs, separados por --. |
| limit | integer | Não | Máximo de resultados por página. |
| offset | integer | Não | Número de resultados a pular. |
curl "https://api.dailybot.com/v1/workflows/?limit=10&offset=0" -H "X-API-KEY: sua_api_key"Exemplos de resposta
200 OK
{
"count": 5,
"next": "https://api.dailybot.com/v1/workflows/?limit=10&offset=10",
"previous": null,
"results": [
{
"uuid": "workflow-uuid",
"name": "My Workflow",
"description": "Description",
"trigger_type": "command_execution",
"active": true,
"visible": true,
"action_summary": "Send message",
"metadata": {},
"owner": { "uuid": "user-uuid", "full_name": "Jane" },
"user_can_update": true,
"user_can_delete": true,
"total_runs": 10,
"last_run_at": "2026-02-25T10:00:00Z",
"created_at": "2026-02-25T09:00:00Z",
"updated_at": "2026-02-25T10:00:00Z"
}
]
}400 Bad Request
{
"detail": "Validation message.",
"code": "params_validation_error"
}GET /v1/workflows/{uuid}/
/v1/workflows/{'{uuid}'}/ Retorna um workflow por UUID.
curl "https://api.dailybot.com/v1/workflows/workflow-uuid/" -H "X-API-KEY: sua_api_key"Exemplos de resposta
200 OK
{
"uuid": "workflow-uuid",
"name": "My Workflow",
"description": "Description",
"trigger_type": "command_execution",
"active": true,
"visible": true,
"action_summary": "Send message",
"metadata": {},
"owner": { "uuid": "user-uuid", "full_name": "Jane" },
"user_can_update": true,
"user_can_delete": true,
"total_runs": 10,
"last_run_at": "2026-02-25T10:00:00Z",
"created_at": "2026-02-25T09:00:00Z",
"updated_at": "2026-02-25T10:00:00Z",
"trigger_metadata": {},
"action_steps": [],
"variables": {}
}404 Not Found
{
"detail": "Not found.",
"code": "not_found"
}POST /v1/workflows/
/v1/workflows/ Cria um novo workflow.
Body params
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| name | string | Sim | Nome do workflow. |
| description | string | Não | Descrição. |
| trigger_type | string | Sim | Tipo de gatilho (ex. command_execution, scheduled_task, workflow_command). |
| trigger_metadata | object | Não | Configuração do gatilho (depende de trigger_type). |
| active | boolean | Não | Padrão: true. |
| visible | boolean | Não | Padrão: true. |
| action_steps | array | Não | Lista de configurações de passos de ação. |
| command_dm_only | boolean | Não | Apenas para gatilho workflow_command. |
curl -X POST "https://api.dailybot.com/v1/workflows/" -H "X-API-KEY: sua_api_key" -H "Content-Type: application/json" -d '{"name": "My Workflow", "trigger_type": "command_execution"}'Exemplos de resposta
200 OK
{
"uuid": "workflow-uuid",
"name": "My Workflow",
"description": "",
"trigger_type": "command_execution",
"active": true,
"visible": true,
"action_summary": null,
"metadata": {},
"owner": { "uuid": "user-uuid", "full_name": "Jane" },
"user_can_update": true,
"user_can_delete": true,
"total_runs": 0,
"last_run_at": null,
"created_at": "2026-02-25T10:00:00Z",
"updated_at": "2026-02-25T10:00:00Z"
}PUT /v1/workflows/{uuid}/
/v1/workflows/{'{uuid}'}/ Atualiza um workflow. Mesmos campos que POST /v1/workflows/; apenas os campos enviados são atualizados.
Body params
Igual a POST /v1/workflows/ (name, description, trigger_type, trigger_metadata, active, action_steps, etc.).
curl -X PUT "https://api.dailybot.com/v1/workflows/workflow-uuid/" -H "X-API-KEY: sua_api_key" -H "Content-Type: application/json" -d '{"name": "Updated Name", "description": "Updated description"}'Exemplos de resposta
200 OK
{
"uuid": "workflow-uuid",
"name": "Updated Name",
"description": "Updated description",
"trigger_type": "command_execution",
"active": true,
"visible": true,
"action_summary": "Send message",
"metadata": {},
"owner": { "uuid": "user-uuid", "full_name": "Jane" },
"user_can_update": true,
"user_can_delete": true,
"total_runs": 10,
"last_run_at": "2026-02-25T10:00:00Z",
"created_at": "2026-02-25T09:00:00Z",
"updated_at": "2026-02-25T11:00:00Z",
"trigger_metadata": {},
"action_steps": [],
"variables": {}
}DELETE /v1/workflows/{uuid}/
/v1/workflows/{'{uuid}'}/ Exclui um workflow.
curl -X DELETE "https://api.dailybot.com/v1/workflows/workflow-uuid/" -H "X-API-KEY: sua_api_key"Exemplos de resposta
200 OK
Sem corpo na resposta.
GET /v1/workflows/{uuid}/execution_logs/
/v1/workflows/{'{uuid}'}/execution_logs/ Retorna os logs de execução do workflow.
curl "https://api.dailybot.com/v1/workflows/workflow-uuid/execution_logs/" -H "X-API-KEY: sua_api_key"Exemplos de resposta
200 OK
{
"workflow_uuid": "workflow-uuid",
"workflow_name": "My Workflow",
"execution_logs": [
{
"started_at": "2026-02-25T10:00:00Z",
"trigger_data": {},
"actions": [],
"status": "completed"
}
],
"total_executions": 1
}POST /v1/workflows/{uuid}/duplicate/
/v1/workflows/{'{uuid}'}/duplicate/ Duplica um workflow existente. O duplicado fica inativo por padrão e tem um nome único, a menos que name seja fornecido.
Body params
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| name | string | Não | Nome personalizado do duplicado. Se omitido, um nome único é gerado. |
curl -X POST "https://api.dailybot.com/v1/workflows/workflow-uuid/duplicate/" -H "X-API-KEY: sua_api_key" -H "Content-Type: application/json" -d '{"name": "My Workflow copy"}'Exemplos de resposta
201 Created
{
"uuid": "new-workflow-uuid",
"name": "My Workflow copy",
"description": "Description",
"trigger_type": "command_execution",
"active": false,
"visible": true,
"action_summary": "Send message",
"metadata": {},
"owner": { "uuid": "user-uuid", "full_name": "Jane" },
"user_can_update": true,
"user_can_delete": true,
"total_runs": 0,
"last_run_at": null,
"created_at": "2026-02-25T11:00:00Z",
"updated_at": "2026-02-25T11:00:00Z"
}400 Bad Request
{
"error": "Validation message"
}403 Forbidden
{
"error": "You don't have permission to duplicate this workflow"
}404 Not Found
{
"error": "Workflow not found"
}500 Internal Server Error
{
"error": "Failed to duplicate workflow"
}