# Start an automation from your app

> Your app tells ESTAGE that something happened — a lesson finished, a contract signed, a trial ended — and ESTAGE runs the automation you built for it.

Source: https://support.estage.com/start-an-automation-from-your-app
Part of the ESTAGE Support help center (https://support.estage.com). Full knowledge base: https://support.estage.com/llms-full.txt

---

An **event from your app** starts an ESTAGE automation: send an email, add a tag, move the contact to a list. You build the automation in the CRM once; your app sends one request each time the thing happens.

## Before you start

- An [API key](https://support.estage.com/create-and-manage-api-keys) with **Events → Write**. If the event may name someone who is not a contact yet, the key also needs **Contacts → Write**.
- The request goes from **server code** (your backend, a Dedicated Cloud function, Zapier, Make, n8n), never from a web page.

## 1. Build the automation in the CRM

1. In the ESTAGE CRM, open **Automations** and click **New automation → Start from scratch**.
2. Click the **+** beside the entry card (**Add another entry / trigger**) and choose **Event from your app**.
3. Type the event name your app will send, for example `contract_signed`: letters, digits, dots, colons, dashes and underscores, up to 64 characters. Names are not case-sensitive.
4. Optional: **Only when the event data…** runs the automation only for some events — for example field `plan` **equals** `pro`.
5. Add the steps — **Send email**, **Add tag**, **Delay** and so on — and click **Activate**.

## 2. Send the event from your app

```bash
curl https://api.estage.com/v1/events \
  -H "ESTAGE-API-Key: $ESTAGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: contract-1042" \
  -d '{ "name": "contract_signed", "contact": { "email": "dana@example.com", "first_name": "Dana" }, "data": { "booth": "A12" } }'
```

- **`name`** — the event name from step 1.
- **`contact`** — the person: an `id`, or an `email` (with `first_name`, `last_name`, `phone` if you have them). An email the CRM does not know becomes a new contact when the key has **Contacts → Write**; without it the answer is `404`.
- **`data`** — anything the automation filters on.
- **`Idempotency-Key`** — any unique string per event. If your code retries, ESTAGE runs the automation only once.

The answer comes back at once (`202`), and the automation runs right after. `automations_notified: false` in the answer means the project has no active automation at all.

## In a Genesis project

Ask the builder in plain words — "when an exhibitor's status changes to contract signed, start my ESTAGE follow-up emails". It writes a Dedicated Cloud function that sends the event with the key you saved through **Use in this app's server code**. Your project needs a Dedicated Cloud for this. More in [Ask Genesis to build with the ESTAGE API](https://support.estage.com/ask-genesis-to-build-with-the-estage-api).

## Check it worked

Open the contact in the CRM: the automation's tag or email shows on it. If nothing happens:

- the automation is **Active**;
- the event name in the request matches the one in the trigger;
- the conditions under **Only when the event data…** match what your app sent.
