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

> Automation, üyelerin birer birer ilerlediği bir adımlar zinciridir.

Bir üye, otomasyonun `trigger_event` olayı kendisine gerçekleştiğinde kaydolur; örneğin `payment.succeeded`. Bir üyeyi `POST /automations/{id}/trigger` ile de kaydedebilirsiniz. Bir `wait` adımı üyeyi belirli bir süre bekletir. Bir `email` veya `message` adımı, üyenin verilerini API üzerinden okuyan bir TSX modülü olan `source_code` kodunu çalıştırır. Modül gönderip göndermeyeceğine ve ne söyleyeceğine karar verir.

Adımlar sürümlendirilir. Taslak sürümü düzenlersiniz. `POST /automations/{id}/publish` onu yeni üyelerin başladığı sürüm yapar, ardından bir sonraki taslağa kopyalar. Her yayınlama, otomasyonda zaten bulunan üyeleri yeni sürüme taşır. Otomasyon oluşturmak, yayınlamak ve tetiklemek ve durumları dahil olmak üzere güncellemek için Automations API'yi kullanın. Adımları ve üyeleri için Automation steps ve Automation enrollments API'lerini kullanın.

## Uç noktalar

| Uç nokta | İstek |
| - | - |
| [List Automations](https://docs.whop.com/tr/api-reference/automations/list-automations.md) | GET `/automations` |
| [Retrieve Automation](https://docs.whop.com/tr/api-reference/automations/retrieve-automation.md) | GET `/automations/{id}` |
| [Create Automation](https://docs.whop.com/tr/api-reference/automations/create-automation.md) | POST `/automations` |
| [Publish Automation](https://docs.whop.com/tr/api-reference/automations/publish-automation.md) | POST `/automations/{id}/publish` |
| [Trigger Automation](https://docs.whop.com/tr/api-reference/automations/trigger-automation.md) | POST `/automations/{id}/trigger` |
| [Update Automation](https://docs.whop.com/tr/api-reference/automations/update-automation.md) | PATCH `/automations/{id}` |
| [Delete Automation](https://docs.whop.com/tr/api-reference/automations/delete-automation.md) | DELETE `/automations/{id}` |

## Özellikler

**id** `string` *required*

`ato_` önekli otomasyon kimliği.

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

Otomasyonun ait olduğu hesabın `biz_` önekli kimliği.

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

Şu anda otomasyonda bulunan üyeler.

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

Otomasyonun oluşturulduğu zaman, ISO 8601 zaman damgası olarak.

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

Otomasyonu kimin oluşturduğu.

> [accordion] Özellikler
>
> **id** `string` *required*
>
> `user_`, `biz_` veya `app_` önekli kullanıcı, hesap veya uygulama kimliği.
>
> **object** `string` *required*
>
> İşlemi kimin yaptığı: bir `user`, API anahtarlarından biri aracılığıyla bir `account` veya bir `app`.
>
> Kullanılabilir seçenekler: `user`, `account`, `app`

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

Adım düzenlemelerinin değiştirdiği sürüm. Her zaman `published_version` artı bir veya ilk yayınlamadan önce `1`.

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

Taslağın `POST /automations/\{id}/publish` tarafından yayınlanacak düzenlemeleri olup olmadığı. İlk yayınlamadan önce her zaman `true`.

**name** `string` *required*

Otomasyonun panoda gösterilen adı. En fazla 255 karakter.

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

Otomasyonun en son yayınlandığı zaman, ISO 8601 zaman damgası olarak. İlk yayınlamaya kadar `null`.

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

Otomasyonu en son kimin yayınladığı. İlk yayınlamaya kadar `null`.

> [accordion] Özellikler
>
> **id** `string` *required*
>
> `user_`, `biz_` veya `app_` önekli kullanıcı, hesap veya uygulama kimliği.
>
> **object** `string` *required*
>
> İşlemi kimin yaptığı: bir `user`, API anahtarlarından biri aracılığıyla bir `account` veya bir `app`.
>
> Kullanılabilir seçenekler: `user`, `account`, `app`

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

Yeni üyelerin başladığı sürüm. Otomasyon ilk kez yayınlanana kadar `null`.

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

Otomasyonun, adımlarının kodunun ortam değişkenleri olarak okuduğu gizli anahtarlarının adları. Değerleri asla döndürülmez.

**status** `string` *required*

`active` üyeleri kaydeder ve adımlarını çalıştırır. `closed` yeni kimseyi kaydetmez ve içindeki üyeler tamamlar. `stopped` kimseyi kaydetmez ve üyelerinin kayıtları sona ermiştir. Yeni bir otomasyon, ilk yayınlaması onu `active` yapana kadar `stopped` durumundadır.

Kullanılabilir seçenekler: `active`, `closed`, `stopped`

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

Sona erenler dahil, üyelerin otomasyona kaç kez kaydolduğu.

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

İlgili olduğu üyeyi kaydeden webhook olayı; örneğin `payment.succeeded`. Yalnızca `POST /automations/\{id}/trigger` ile kayıt yapılan bir otomasyon için `null`. Otomasyon yayınlandıktan sonra sabitlenir.

Kullanılabilir seçenekler: `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*

Otomasyonun en son güncellendiği zaman, ISO 8601 zaman damgası olarak.

```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 Steps API](https://docs.whop.com/tr/api-reference/automation-steps/automation-step.md)
- [Automation Enrollments API](https://docs.whop.com/tr/api-reference/automation-enrollments/automation-enrollment.md)
- [Delete Automation](https://docs.whop.com/tr/api-reference/automations/delete-automation.md)
