# Trigger with the API
URL: https://docs.awellhealth.com/docs/automate-with-events/trigger-with-the-api

> For the complete documentation index, see [llms.txt](https://docs.awellhealth.com/llms.txt).



Triggering care flows through the API is **the most flexible method**, covering the widest range of
situations. It also needs technical work, so budget engineering time for it rather than treating it as
configuration.

## Search, create, then start [#search-create-then-start]

1. **Search for the patient**, to avoid creating a duplicate. See
   [Patients in the API reference](/api-reference/reference/patients).
2. **Create the patient** if they don't exist yet. Same reference.
3. **Start the care flow.** See
   [Care flows in the API reference](/api-reference/reference/care-flows).

Skipping step 1 is how the same person ends up in Awell twice. Search by business identifier rather
than by name.

## Starting by identifier keeps Awell IDs out of the calling system [#starting-by-identifier-keeps-awell-ids-out-of-the-calling-system]

A care flow can be started with a business identifier instead of the Awell patient ID, so the calling
system never has to store an Awell ID. See
[Patient identifiers](/docs/connect-systems/patient-identifiers).

## When to use it [#when-to-use-it]

* The other triggers don't give enough control.
* Enrollment logic lives outside Awell and should stay there.
* An API integration already exists for other reasons.

If none of those apply, one of the lower-effort triggers in this section probably fits better. See
[Before you trigger a care flow](/docs/automate-with-events/before-you-trigger-a-care-flow).

## Next steps [#next-steps]

**Next:** [Configure API call retries](/docs/automate-with-events/configure-api-call-retries) for what
happens when a call from a care flow fails.
