---
title: "Create an email trigger"
method: POST
path: "/trigger/email"
tags: ["Email Triggers"]
---

# Create an email trigger

`POST /trigger/email`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/trigger/email`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-6/docs/trigger/email/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a trigger that starts a flow when a message arrives at the generated address. The response carries the draft and published addresses. Flow trigger nodes of type `email`, `mail` (Microsoft 365 mail automations) and `email-delivery` (delivery events for emails sent from templates) are configured on the flow itself, see the flows API.

## Request body

- EmailTriggerRequest
  - `name` string, required: Unique trigger name
  - `collection` string
  - `description` string
  - `flow_subject` string: Subject of the flow the trigger starts. A draft subject is stored as its published subject.

## Response `200`

Trigger created

- EmailTriggerResponse
  - `body` object
    - `body` object
      - `name` string
      - `collection` string
      - `description` string
      - `subject` string
      - `trigger_type` 'email'
      - `type` string
      - `flow_subject` string
      - `email_published` string: Generated address that starts the published flow
      - `email_draft` string: Generated address that starts the draft flow
  - `status_code` integer

## Other responses

- `400`: Invalid request. Occurs when required parameters are missing, validation fails, or the request format is incorrect.
- `401`: Unauthorized access. Occurs when authentication is missing or invalid, or when the authenticated user lacks permission.
- `500`: Internal server error. Occurs when an unexpected condition prevents the server from fulfilling the request.

## Changes

- **2026-11-12** `a9f443efdc5d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-6/changes/trigger/email/post.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-6.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-6/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-6/revisions/a9f443efdc5d?raw)
