> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeplo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GET Automation Executions

> Track and manage automation execution history.

## Get execution history

`GET /api/automations/:id/executions`

Retrieve execution history for an automation.

### Headers

**Cookie** `string` *required*

Session cookie (login via POST /api/auth/login)

### Query parameters

**page** `integer` (default: 1)

Page number.

**limit** `integer` (default: 20)

Items per page.

**status** `string`

Filter: `running`, `completed`, `failed`.

```bash cURL theme={null}
curl "https://zeplo.ai/api/automations/1/executions?limit=10" \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```

```json Response theme={null}
{
  "success": true,
  "data": [
    {
      "id": "exec_abc123",
      "automationId": 1,
      "status": "completed",
      "conversationId": 5,
      "contactPhone": "919876543210",
      "nodesExecuted": 3,
      "startedAt": "2026-01-15T14:00:00Z",
      "completedAt": "2026-01-15T14:00:05Z"
    }
  ]
}
```

***

## Get execution status

`GET /api/automations/executions/:executionId/status`

```bash cURL theme={null}
curl https://zeplo.ai/api/automations/executions/exec_abc123/status \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "id": "exec_abc123",
    "automationId": 1,
    "status": "completed",
    "currentNode": null,
    "nodesExecuted": ["node_1", "node_2", "node_3"],
    "logs": [
      {
        "nodeId": "node_1",
        "nodeType": "trigger",
        "status": "completed",
        "output": "Triggered by new_conversation",
        "executedAt": "2026-01-15T14:00:00Z"
      },
      {
        "nodeId": "node_2",
        "nodeType": "sendMessage",
        "status": "completed",
        "output": "Message sent successfully",
        "executedAt": "2026-01-15T14:00:02Z"
      }
    ]
  }
}
```

***

## Log node execution

`POST /api/automations/executions/:executionId/logs`

Log a node execution for an automation run.

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/automations/executions/exec_abc123/logs \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{
    "nodeId": "node_2",
    "nodeType": "sendMessage",
    "status": "completed",
    "output": "Message sent to 919876543210",
    "duration": 1500
  }'
```

***

## Pending & cleanup

`GET /api/automations/pending-executions`

Get all pending executions that are waiting (e.g., at a delay node).

```bash cURL theme={null}
curl "https://zeplo.ai/api/automations/pending-executions" \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```

`POST /api/automations/cleanup-expired`

Clean up expired executions that have timed out.

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/automations/cleanup-expired \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```

***

## Seed automation templates

`POST /api/automations/seed-templates`

Seed pre-built automation templates into the system.

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/automations/seed-templates \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.