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

> Een Automation is een keten van stappen die leden één voor één doorlopen.

Een lid wordt ingeschreven wanneer het `trigger_event` van de automation voor dat lid plaatsvindt, zoals `payment.succeeded`. Je kunt een lid ook inschrijven met `POST /automations/{id}/trigger`. Een `wait`-stap houdt het lid een ingestelde tijd vast. Een `email`- of `message`-stap voert zijn `source_code` uit, een TSX-module die de gegevens van het lid via de API leest. De module bepaalt of er iets wordt verstuurd en wat.

Stappen hebben versies. Je bewerkt de conceptversie. `POST /automations/{id}/publish` maakt daarvan de versie waarop nieuwe leden starten en kopieert deze vervolgens naar het volgende concept. Elke publicatie verplaatst leden die al in de automation zitten naar de nieuwe versie. Gebruik de Automations API om automations aan te maken, te publiceren en te triggeren, en om ze bij te werken, inclusief hun status. Gebruik de Automation steps- en Automation enrollments-API's voor hun stappen en leden.

## Endpoints

| Endpoint | Verzoek |
| - | - |
| [Automations opvragen](https://docs.whop.com/nl/api-reference/automations/list-automations.md) | GET `/automations` |
| [Automation ophalen](https://docs.whop.com/nl/api-reference/automations/retrieve-automation.md) | GET `/automations/{id}` |
| [Automation aanmaken](https://docs.whop.com/nl/api-reference/automations/create-automation.md) | POST `/automations` |
| [Automation publiceren](https://docs.whop.com/nl/api-reference/automations/publish-automation.md) | POST `/automations/{id}/publish` |
| [Automation triggeren](https://docs.whop.com/nl/api-reference/automations/trigger-automation.md) | POST `/automations/{id}/trigger` |
| [Automation bijwerken](https://docs.whop.com/nl/api-reference/automations/update-automation.md) | PATCH `/automations/{id}` |
| [Automation verwijderen](https://docs.whop.com/nl/api-reference/automations/delete-automation.md) | DELETE `/automations/{id}` |

## Attributen

**id** `string` *required*

Automation-ID, met prefix `ato_`.

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

ID van het account waartoe de automation behoort, met prefix `biz_`.

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

Leden die momenteel in de automation zitten.

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

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

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

Wie de automation heeft aangemaakt.

> [accordion] Eigenschappen
>
> **id** `string` *required*
>
> ID van de gebruiker, het account of de app, met prefix `user_`, `biz_` of `app_`.
>
> **object** `string` *required*
>
> Wat de handeling uitvoerde: een `user`, een `account` via een van zijn API-sleutels, of een `app`.
>
> Beschikbare opties: `user`, `account`, `app`

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

De versie die door stapbewerkingen wordt gewijzigd. Altijd `published_version` plus één, of `1` vóór de eerste publicatie.

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

Of het concept bewerkingen bevat die `POST /automations/\{id}/publish` zou publiceren. Altijd `true` vóór de eerste publicatie.

**name** `string` *required*

De naam van de automation, weergegeven in het dashboard. Maximaal 255 tekens.

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

Wanneer de automation voor het laatst is gepubliceerd, als ISO 8601-tijdstempel. `null` tot de eerste publicatie.

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

Wie de automation voor het laatst heeft gepubliceerd. `null` tot de eerste publicatie.

> [accordion] Eigenschappen
>
> **id** `string` *required*
>
> ID van de gebruiker, het account of de app, met prefix `user_`, `biz_` of `app_`.
>
> **object** `string` *required*
>
> Wat de handeling uitvoerde: een `user`, een `account` via een van zijn API-sleutels, of een `app`.
>
> Beschikbare opties: `user`, `account`, `app`

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

De versie waarop nieuwe leden starten. `null` totdat de automation voor het eerst is gepubliceerd.

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

Namen van de secrets van de automation, die de code van de stappen als omgevingsvariabelen leest. Hun waarden worden nooit geretourneerd.

**status** `string` *required*

`active` schrijft leden in en voert hun stappen uit. `closed` schrijft niemand nieuw in, en leden die er al in zitten maken het af. `stopped` schrijft niemand in, en de enrollments van de leden zijn beëindigd. Een nieuwe automation is `stopped` totdat de eerste publicatie deze `active` maakt.

Beschikbare opties: `active`, `closed`, `stopped`

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

Hoe vaak leden zich in de automation hebben ingeschreven, inclusief beëindigde enrollments.

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

Het webhook-event dat het lid inschrijft waarover het gaat, zoals `payment.succeeded`. `null` voor een automation waarin alleen `POST /automations/\{id}/trigger` inschrijft. Vastgelegd zodra de automation is gepubliceerd.

Beschikbare opties: `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*

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

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


## Related topics

- [Automation Enrollments API](https://docs.whop.com/nl/api-reference/automation-enrollments/automation-enrollment.md)
- [Automation Steps API](https://docs.whop.com/nl/api-reference/automation-steps/automation-step.md)
- [Delete Automation](https://docs.whop.com/nl/api-reference/automations/delete-automation.md)
