---
title: "Get an Automation definition"
description: "Returns one Automation definition and its current lifecycle state in the API key's workspace."
canonical: https://y2.dev/docs/api/reference/automations/getAutomation/
---

Endpoint Reference[Automations](https://y2.dev/docs/api/reference/automations)

# Get an Automation definition

Returns one Automation definition and its current lifecycle state in the API key's workspace.

`GET https://api.y2.dev/api/v1/automations/{automationId}`

- Operation ID: `getAutomation`
- Required scopes: `automations:read`
- Contract: https://y2.dev/openapi.json

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `automationId` | path | string | Yes |  |

## Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Automation details | `AutomationResponse` |
| 400 | Invalid request parameters |  |
| 401 | Missing or invalid API key |  |
| 403 | Insufficient permissions or access denied |  |
| 404 | Resource not found |  |
| 429 | Rate limit exceeded (per-key or per-account aggregate) |  |
| 500 | Internal server error |  |

### 200 response fields

| Field | Type | Description |
| --- | --- | --- |
| `data` | `Automation` |  |
| `data.id` | string |  |
| `data.type` | string |  |
| `data.name` | string |  |
| `data.instructions` | string |  |
| `data.operation` | string |  |
| `data.projectId` | string or null |  |
| `data.trigger` | `AutomationTrigger` |  |
| `data.notificationPolicy` | `all_runs`, `failures_only`, `none` |  |
| `data.overlapPolicy` | string |  |
| `data.status` | `AutomationStatus` |  |
| `data.definitionRevision` | integer |  |
| `data.schedule` | null or `AutomationSchedule` |  |
| `data.lastRun` | null or `AutomationRun` |  |
| `data.createdAt` | string (date-time) |  |
| `data.updatedAt` | string (date-time) |  |
| `data.links` | object |  |
