> ## 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.

# Automation Steps API

> 자동화 단계는 자동화 버전 안의 한 단계입니다. `wait` 단계는 멤버를 `config.delay_seconds` 동안 대기시킵니다.

`email` 또는 `message` 단계는 `source_code`를 실행해 전송 여부와 보낼 내용을 결정합니다. 단계들은 체인을 이루며, 각 단계는 자신의 앞 단계를 지정합니다. 초안 버전만 변경할 수 있습니다.

Automation steps API를 사용하면 버전의 단계를 나열하고, 초안에서 단계를 추가, 업데이트, 제거할 수 있습니다. `email` 또는 `message` 단계가 멤버에게 무엇을 보낼지 미리 볼 수도 있습니다. 미리 보기는 아무것도 전송하지 않습니다.

단계의 코드는 API를 통해 계정을 읽습니다. 이 코드는 관리자 역할과 Whop AI가 모두 보유한 계정 수준의 모든 `:read` 권한을 가지며, `payout:account:read`는 제외됩니다. 따라서 카드 정보는 읽을 수 없습니다. 단계의 `source_code`를 설정하거나 단계를 미리 보려면 이 권한이 모두 필요합니다. 따라서 자격 증명은 자신이 읽을 수 있는 범위를 넘어서 읽는 코드를 작성할 수 없습니다.

## 엔드포인트

| 엔드포인트 | 요청 |
| - | - |
| [자동화 단계 목록 조회](https://docs.whop.com/ko/api-reference/automation-steps/list-automation-steps.md) | GET `/automation_steps` |
| [자동화 단계 조회](https://docs.whop.com/ko/api-reference/automation-steps/retrieve-automation-step.md) | GET `/automation_steps/{id}` |
| [자동화 단계 생성](https://docs.whop.com/ko/api-reference/automation-steps/create-automation-step.md) | POST `/automation_steps` |
| [자동화 단계 미리 보기](https://docs.whop.com/ko/api-reference/automation-steps/preview-automation-step.md) | POST `/automation_steps/{id}/preview` |
| [자동화 단계 업데이트](https://docs.whop.com/ko/api-reference/automation-steps/update-automation-step.md) | PATCH `/automation_steps/{id}` |
| [자동화 단계 삭제](https://docs.whop.com/ko/api-reference/automation-steps/delete-automation-step.md) | DELETE `/automation_steps/{id}` |

## 속성

**id** `string` *required*

`atos_` 접두사가 붙은 자동화 단계 ID입니다. 단계는 버전마다 새 ID를 받습니다. `key`는 동일하게 유지됩니다.

**action\_type** `string` *required*

단계가 수행하는 작업입니다. `wait`는 멤버를 `config.delay_seconds` 동안 대기시키고, `email`은 이메일을 보내며, `message`는 팀원 명의로 메시지를 보냅니다. 초안 단계는 `email`과 `message` 사이에서 전환할 수 있으며, 이때 `config.sender_id`가 초기화됩니다. `wait`는 전송 단계로 바뀔 수 없으며, 그 반대도 마찬가지입니다.

사용 가능한 옵션: `wait`, `email`, `message`

**automation\_id** `string` *required*

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

**config** `object` *required*

`action_type`에 대한 단계 설정입니다. `wait`는 `delay_seconds`, `email` 또는 `message`는 `sender_id`를 사용합니다. 값을 쓰면 객체 전체가 교체됩니다.

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

단계가 생성된 시각(ISO 8601 타임스탬프)입니다.

**issues** `string[]` *required*

아직 작성되지 않은 코드처럼 초안을 게시하기 전에 수정해야 하는 사항입니다. 없으면 비어 있습니다.

**key** `integer` *required*

버전 간에 동일한 단계를 식별합니다. 새 단계는 해당 자동화의 어떤 단계도 사용한 적 없는 키를 받습니다.

**previous\_step\_id** `string | null` *required*

이 단계보다 먼저 실행되는 단계의 ID이며, `atos_` 접두사가 붙습니다. 멤버가 등록된 직후 첫 번째로 실행되는 경우 `null`입니다.

**sender** `email_address or user | null` *required*

`config.sender_id`가 지정하는 발신자입니다. `wait` 단계이거나 단계가 기본 발신자로 전송하는 경우 `null`입니다.

**source\_code** `string | null` *required*

`email` 또는 `message` 단계의 코드입니다. 기본 내보내기가 멤버를 받아 `whop:message`의 `message.send()`, `message.skip()` 또는 `message.exit()`를 반환하는 TSX 모듈입니다. `email` 단계는 `subject`를 제목으로, `react` 요소를 본문으로, `text`를 일반 텍스트 파트로 전송합니다. `message` 단계는 `text`를 전송합니다. 코드는 `react`와 `@react-email/components`를 가져올 수 있습니다. 코드는 읽기만 가능한 `whop:message`의 `whop` 클라이언트를 통해 계정을 읽습니다. 단계 미리 보기 항목에 나열된 것처럼, 그 클라이언트는 관리자 역할과 Whop AI가 모두 보유한 계정 수준의 모든 `:read` 권한을 가지며, `payout:account:read`는 제외됩니다. 이 값을 설정하거나 단계를 미리 보려면 이 권한이 모두 필요합니다. 최대 64,000자입니다. `wait` 단계이거나 아직 작성되지 않은 경우 `null`입니다.

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

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

**version** `integer` *required*

이 단계가 속한 자동화 버전입니다. 초안 버전의 단계만 변경할 수 있습니다.

**waiting\_enrollments\_count** `integer` *required*

이 단계의 버전에 있으면서 이 단계가 실행되기를 기다리는 멤버 수입니다.

```json AutomationStep theme={null}
{
	"id": "atos_xxxxxxxxxxxxxx",
	"automation_id": "ato_xxxxxxxxxxxxxx",
	"version": 3,
	"key": 2,
	"previous_step_id": "atos_yyyyyyyyyyyyyy",
	"action_type": "email",
	"config": {
		"sender_id": "emaddr_xxxxxxxxxxxxxx"
	},
	"sender": {
		"id": "emaddr_xxxxxxxxxxxxxx",
		"object": "email_address",
		"address": "support@shinetime.example"
	},
	"source_code": "export default () => message.send({ subject: \"Thanks for booking!\", text: \"See you on Saturday.\" });",
	"issues": [],
	"waiting_enrollments_count": 5,
	"created_at": "2026-10-01T15:30:00.000Z",
	"updated_at": "2026-10-02T08:45:00.000Z"
}
```
