---
title: "Create an email list from shop criteria"
method: POST
path: "/shop/email-lists"
tags: ["Marketing"]
---

# Create an email list from shop criteria

`POST /shop/email-lists`

Builds an auto-populated email list in the Customer API from
criteria evaluated against the Shop API. The intended use case is
one-shot mailshots: select an order filter or session attendance
in the operator UI and have the matching customers piped into a
Mailchimp-compatible list without manual export.

The criteria type determines which selector fields are required —
`order_filters` expects the `filters` object, `session_attendees`
expects `session_id`, and so on.

## Request body

- object
  - `name` string, required — The display name of the email list.
  - `criteria_type` 'order_filters' | 'session_attendees', required — Which selector the list is populated from. Determines which of the optional fields below must be supplied.
  - `filters` object — For `criteria_type: order_filters`, the order filters applied — same shape as the order-list query parameters.
  - `session_id` string — For `criteria_type: session_attendees`, the session whose attendees should be added to the list.
  - `site_id` string — The site the email list belongs to.

## Response `200`

The email list was successfully created.

- object
  - `data` object, required
    - `id` string, required — The ID of the created email list.
    - `name` string, required — The display name of the created email list.

## Other responses

- `400` — The request failed.
- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.
- `422` — The request didn't pass validation

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
