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

> Een Automation step is één stap in een versie van een automation. Een `wait`-stap houdt een lid vast gedurende `config.delay_seconds`.

Een `email`- of `message`-stap voert zijn `source_code` uit om te bepalen of er iets wordt verstuurd en wat. Stappen vormen een keten, en elke stap noemt de stap ervoor. Alleen de conceptversie kan worden gewijzigd.

Gebruik de Automation steps API om de stappen van een versie op te vragen en stappen in het concept toe te voegen, bij te werken en te verwijderen. Je kunt ook bekijken wat een `email`- of `message`-stap naar een lid zou sturen. Een preview verstuurt niets.

De code van een stap leest het account via de API. Deze heeft elke `:read`-machtiging op accountniveau die zowel de adminrol als Whop AI hebben, behalve `payout:account:read`. Daardoor kan de code geen kaarten lezen. Het instellen van de `source_code` van een stap, of het bekijken van een preview van een stap, vereist al die machtigingen. Zo kan een credential geen code schrijven die meer leest dan de credential zelf kan.

## Endpoints

| Endpoint | Verzoek |
| - | - |
| [Automation Steps opvragen](https://docs.whop.com/nl/api-reference/automation-steps/list-automation-steps.md) | GET `/automation_steps` |
| [Automation Step ophalen](https://docs.whop.com/nl/api-reference/automation-steps/retrieve-automation-step.md) | GET `/automation_steps/{id}` |
| [Automation Step aanmaken](https://docs.whop.com/nl/api-reference/automation-steps/create-automation-step.md) | POST `/automation_steps` |
| [Preview van Automation Step bekijken](https://docs.whop.com/nl/api-reference/automation-steps/preview-automation-step.md) | POST `/automation_steps/{id}/preview` |
| [Automation Step bijwerken](https://docs.whop.com/nl/api-reference/automation-steps/update-automation-step.md) | PATCH `/automation_steps/{id}` |
| [Automation Step verwijderen](https://docs.whop.com/nl/api-reference/automation-steps/delete-automation-step.md) | DELETE `/automation_steps/{id}` |

## Attributen

**id** `string` *required*

Automation step-ID, met prefix `atos_`. Een stap krijgt in elke versie een nieuwe ID. De `key` blijft hetzelfde.

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

Wat de stap doet: `wait` houdt het lid vast gedurende `config.delay_seconds`, `email` stuurt het lid een e-mail en `message` stuurt het lid een bericht van een teamlid. Een conceptstap kan wisselen tussen `email` en `message`, waardoor `config.sender_id` wordt gewist. Een `wait` kan geen verzendende stap worden, en omgekeerd.

Beschikbare opties: `wait`, `email`, `message`

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

ID van de automation waartoe de stap behoort, met prefix `ato_`.

**config** `object` *required*

De instellingen van de stap voor het `action_type`: `delay_seconds` voor een `wait`, `sender_id` voor een `email` of `message`. Wegschrijven vervangt het hele object.

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

Wanneer de stap is aangemaakt, als ISO 8601-tijdstempel.

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

Wat moet worden opgelost voordat het concept kan worden gepubliceerd, zoals code die nog niet is geschreven. Leeg wanneer er niets is.

**key** `integer` *required*

Identificeert dezelfde stap over versies heen. Een nieuwe stap krijgt een key die geen enkele stap van de automation heeft gebruikt.

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

ID van de stap waarna deze wordt uitgevoerd, met prefix `atos_`. `null` wanneer deze als eerste wordt uitgevoerd, direct nadat het lid is ingeschreven.

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

De afzender die `config.sender_id` aanwijst. `null` bij een `wait`, en wanneer de stap verstuurt vanaf de standaardafzender.

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

De code van een `email`- of `message`-stap: een TSX-module waarvan de default export het lid ontvangt en `message.send()`, `message.skip()` of `message.exit()` uit `whop:message` retourneert. Een `email`-stap verstuurt het `subject`, het `react`-element als body en de `text` als platte-tekstdeel. Een `message`-stap verstuurt de `text`. De code kan `react` en `@react-email/components` importeren. Deze leest het account via de `whop`-client uit `whop:message`, die alleen kan lezen. Die client heeft elke `:read`-machtiging op accountniveau die zowel de adminrol als Whop AI hebben, behalve `payout:account:read`, zoals vermeld bij het bekijken van een preview van een stap. Het instellen ervan, of het bekijken van een preview van de stap, vereist al die machtigingen. Maximaal 64.000 tekens. `null` bij een `wait`, en totdat de code is geschreven.

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

Wanneer de stap voor het laatst is bijgewerkt, als ISO 8601-tijdstempel.

**version** `integer` *required*

De automationversie waarvan deze stap deel uitmaakt. Alleen de stappen van de conceptversie kunnen worden gewijzigd.

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

Leden op de versie van deze stap die wachten tot de stap wordt uitgevoerd.

```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"
}
```


## Related topics

- [List Automation Steps](https://docs.whop.com/nl/api-reference/automation-steps/list-automation-steps.md)
- [Create Automation Step](https://docs.whop.com/nl/api-reference/automation-steps/create-automation-step.md)
- [Delete Automation Step](https://docs.whop.com/nl/api-reference/automation-steps/delete-automation-step.md)
