---
title: "Create Trigger"
method: POST
path: "/api/v1/triggers"
tags: ["Triggers"]
---

# Create Trigger

`POST /api/v1/triggers`

## Request

- The document declares no server URL.
- Auth: one of:
  - OAuth 2
    - Password
    - Token URL: `api/v1/login`
  - API key in query parameter `x-api-key`
  - API key in header `x-api-key`

Create a trigger on a flow the caller may write.

The trigger is owned by the *flow owner*, not by whoever created it. The
execution-principal matrix classifies a trigger run as ``flow_owner``, and
flow-save reconciliation already creates rows that way; keying the API path
off the caller instead would give one flow two kinds of trigger identity
depending on which surface armed it, and would let a collaborator with flow
write silently schedule unattended runs under their own connections.

## Request body

- TriggerCreate
  - `binding_target` 'flow' | 'deployment': What a fired event runs. ``flow`` runs the saved flow (or the pinned ``flow_version`` when set) through the background execution service. ``deployment`` is stored but not dispatched in 1.13 — see :class:`BindingUnsupportedError`.
  - `concurrency_limit` integer
  - `config` object
  - `connection_id` string, uuid, nullable
  - `deployment_id` string, uuid, nullable
  - `flow_id` string, uuid, required
  - `flow_version_id` string, uuid, nullable
  - `kind` string, required
  - `max_attempts` integer
  - `name` string, required
  - `node_id` string, nullable
  - `provider` string, nullable
  - `session_policy` 'per_event' | 'shared': How a dispatched run derives its session id when the payload has no conversation.
  - `state` 'pending' | 'active' | 'paused' | 'expired' | 'needs_reconnect' | 'error' | 'dead': Lifecycle of a trigger row. ``pending`` is the reconciled-but-not-yet-armed state a canvas save creates; ``active`` is the only state the scheduler and dispatcher act on.

## Response `201`

Successful Response

- TriggerRead
  - `binding_target` string, required
  - `concurrency_limit` integer, required
  - `config` object, required
  - `connection_id` string, uuid, nullable, required
  - `created_at` string, date-time, nullable, required
  - `deployment_id` string, uuid, nullable, required
  - `flow_id` string, uuid, required
  - `flow_version_id` string, uuid, nullable, required
  - `id` string, uuid, required
  - `kind` string, required
  - `last_error` string, nullable, required
  - `last_fired_at` string, date-time, nullable, required
  - `max_attempts` integer, required
  - `name` string, required
  - `next_fire_at` string, date-time, nullable, required
  - `node_id` string, nullable, required
  - `provider` string, nullable, required
  - `session_policy` string, required
  - `state` string, required
  - `updated_at` string, date-time, nullable, required
  - `user_id` string, uuid, nullable, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-21** `4349fbe90c64`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/langflow-ai/apis/langflow/changes/api/v1/triggers/post.md)

---

[API](https://skmtc.dev/langflow-ai/apis/langflow.md) - [All operations](https://skmtc.dev/langflow-ai/apis/langflow/llms.txt) - [OpenAPI document](https://skmtc.dev/langflow-ai/apis/langflow/revisions/4349fbe90c64?raw)
