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

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# Automations API

> 자동화는 멤버가 한 번에 하나씩 거쳐 가는 단계들의 체인입니다.

`payment.succeeded`처럼 자동화의 `trigger_event`가 멤버에게 발생하면 멤버가 등록됩니다. `POST /automations/{id}/trigger`로 멤버를 등록할 수도 있습니다. `wait` 단계는 정해진 시간 동안 멤버를 대기시킵니다. `email` 또는 `message` 단계는 API를 통해 멤버의 데이터를 읽는 TSX 모듈인 `source_code`를 실행합니다. 이 모듈이 전송 여부와 보낼 내용을 결정합니다.

단계는 버전으로 관리됩니다. 편집은 초안 버전에서 합니다. `POST /automations/{id}/publish`는 초안을 새 멤버가 시작하는 버전으로 만든 다음, 이를 다음 초안으로 복사합니다. 게시할 때마다 이미 자동화에 있는 멤버는 새 버전으로 이동합니다. Automations API를 사용해 자동화를 생성, 게시, 트리거하고 상태를 포함해 업데이트하세요. 단계와 멤버에는 Automation steps API와 Automation enrollments API를 사용하세요.

## 엔드포인트

| 엔드포인트 | 요청 |
| - | - |
| [자동화 목록 조회](https://docs.whop.com/ko/api-reference/automations/list-automations.md) | GET `/automations` |
| [자동화 조회](https://docs.whop.com/ko/api-reference/automations/retrieve-automation.md) | GET `/automations/{id}` |
| [자동화 생성](https://docs.whop.com/ko/api-reference/automations/create-automation.md) | POST `/automations` |
| [자동화 게시](https://docs.whop.com/ko/api-reference/automations/publish-automation.md) | POST `/automations/{id}/publish` |
| [자동화 트리거](https://docs.whop.com/ko/api-reference/automations/trigger-automation.md) | POST `/automations/{id}/trigger` |
| [자동화 업데이트](https://docs.whop.com/ko/api-reference/automations/update-automation.md) | PATCH `/automations/{id}` |
| [자동화 삭제](https://docs.whop.com/ko/api-reference/automations/delete-automation.md) | DELETE `/automations/{id}` |

## 속성

**id** `string` *required*

`ato_` 접두사가 붙은 자동화 ID입니다.

**account\_id** `string` *required*

자동화가 속한 계정의 ID이며, `biz_` 접두사가 붙습니다.

**active\_enrollments\_count** `integer` *required*

현재 자동화에 있는 멤버 수입니다.

**created\_at** `string` *required*

자동화가 생성된 시각(ISO 8601 타임스탬프)입니다.

**created\_by\_actor** `object` *required*

자동화를 생성한 주체입니다.

> [accordion] 속성
>
> **id** `string` *required*
>
> 사용자, 계정 또는 앱의 ID이며, `user_`, `biz_` 또는 `app_` 접두사가 붙습니다.
>
> **object** `string` *required*
>
> 작업 주체입니다. `user`, API 키를 통한 `account` 또는 `app` 중 하나입니다.
>
> 사용 가능한 옵션: `user`, `account`, `app`

**draft\_version** `integer` *required*

단계 편집이 변경하는 버전입니다. 항상 `published_version`에 1을 더한 값이며, 첫 게시 전에는 `1`입니다.

**has\_unpublished\_changes** `boolean` *required*

초안에 `POST /automations/\{id}/publish`로 게시될 편집 내용이 있는지 여부입니다. 첫 게시 전에는 항상 `true`입니다.

**name** `string` *required*

대시보드에 표시되는 자동화 이름입니다. 최대 255자입니다.

**published\_at** `string | null` *required*

자동화가 마지막으로 게시된 시각(ISO 8601 타임스탬프)입니다. 첫 게시 전까지는 `null`입니다.

**published\_by\_actor** `object | null` *required*

자동화를 마지막으로 게시한 주체입니다. 첫 게시 전까지는 `null`입니다.

> [accordion] 속성
>
> **id** `string` *required*
>
> 사용자, 계정 또는 앱의 ID이며, `user_`, `biz_` 또는 `app_` 접두사가 붙습니다.
>
> **object** `string` *required*
>
> 작업 주체입니다. `user`, API 키를 통한 `account` 또는 `app` 중 하나입니다.
>
> 사용 가능한 옵션: `user`, `account`, `app`

**published\_version** `integer | null` *required*

새 멤버가 시작하는 버전입니다. 자동화가 처음 게시될 때까지 `null`입니다.

**secret\_names** `string[]` *required*

단계 코드가 환경 변수로 읽는 자동화 시크릿의 이름입니다. 값은 절대 반환되지 않습니다.

**status** `string` *required*

`active`는 멤버를 등록하고 단계를 실행합니다. `closed`는 새 멤버를 등록하지 않으며, 이미 있는 멤버는 끝까지 진행합니다. `stopped`는 아무도 등록하지 않으며, 멤버의 등록은 종료된 상태입니다. 새 자동화는 첫 게시로 `active`가 될 때까지 `stopped` 상태입니다.

사용 가능한 옵션: `active`, `closed`, `stopped`

**total\_enrollments\_count** `integer` *required*

종료된 등록을 포함해 멤버가 자동화에 등록된 총 횟수입니다.

**trigger\_event** `string | null` *required*

`payment.succeeded`처럼 이벤트 대상 멤버를 등록시키는 웹훅 이벤트입니다. `POST /automations/\{id}/trigger`로만 등록되는 자동화에서는 `null`입니다. 자동화가 게시된 후에는 고정됩니다.

사용 가능한 옵션: `payment.succeeded`, `payment.failed`, `membership.activated`, `membership.trial_ending_soon`, `member.created`, `invoice.created`, `invoice.paid`, `invoice.past_due`, `refund.created`, `dispute.created`, `resolution_center_case.created`, `resolution_center_case.decided`, `course_lesson_interaction.completed`

**updated\_at** `string` *required*

자동화가 마지막으로 업데이트된 시각(ISO 8601 타임스탬프)입니다.

```json Automation theme={null}
{
	"id": "ato_xxxxxxxxxxxxxx",
	"account_id": "biz_xxxxxxxxxxxxxx",
	"name": "Welcome new customers",
	"status": "active",
	"trigger_event": "payment.succeeded",
	"published_version": 2,
	"draft_version": 3,
	"has_unpublished_changes": false,
	"published_at": "2026-10-01T15:30:00.000Z",
	"published_by_actor": {
		"id": "user_yyyyyyyyyyyyyy",
		"object": "user"
	},
	"created_by_actor": {
		"id": "user_yyyyyyyyyyyyyy",
		"object": "user"
	},
	"secret_names": ["SHOPIFY_TOKEN"],
	"active_enrollments_count": 42,
	"total_enrollments_count": 318,
	"created_at": "2026-09-12T10:00:00.000Z",
	"updated_at": "2026-10-01T15:30:00.000Z"
}
```
