---
title: "create http trigger"
method: POST
path: "/w/{workspace}/http_triggers/create"
tags: ["http_trigger"]
---

# create http trigger

`POST /w/{workspace}/http_triggers/create`

## Path parameters

- `workspace` string, required

## Request body

- NewHttpTrigger
  - `path` string, required — The unique Windmill path for this trigger. Must be of the form `u/<user>/<path>` or `f/<folder>/<path>`. This is the trigger object path, not the HTTP route path.
  - `script_path` string, required — Path to the script or flow to execute when triggered
  - `route_path` string, required — The URL route path that will trigger this endpoint (e.g., 'api/myendpoint'). Must NOT start with a /.
  - `workspaced_route` boolean — If true, the route includes the workspace ID in the path
  - `summary` string, nullable — Short summary describing the purpose of this trigger
  - `description` string, nullable — Detailed description of what this trigger does
  - `static_asset_config` object, nullable — Configuration for serving static assets (s3 bucket, storage path, filename)
    - `s3` string, required — S3 bucket path for static assets
    - `storage` string — Storage path for static assets
    - `filename` string — Filename for the static asset
  - `is_flow` boolean, required — True if script_path points to a flow, false if it points to a script
  - `http_method` 'get' | 'post' | 'put' | 'delete' | 'patch', required
  - `authentication_resource_path` string, nullable — Path to the resource containing authentication configuration (for api_key, basic_http, custom_script, signature methods)
  - `is_async` boolean — Deprecated, use request_type instead
  - `request_type` 'sync' | 'async' | 'sync_sse'
  - `authentication_method` 'none' | 'windmill' | 'api_key' | 'basic_http' | 'custom_script' | 'signature', required
  - `is_static_website` boolean, required — If true, serves static files from S3/storage instead of running a script
  - `wrap_body` boolean — If true, wraps the request body in a 'body' parameter
  - `mode` 'enabled' | 'disabled' | 'suspended' — job trigger mode
  - `raw_string` boolean — If true, passes the request body as a raw string instead of parsing as JSON
  - `error_handler_path` string — Path to a script or flow to run when the triggered job fails
  - `error_handler_args` ScriptArgs — The arguments to pass to the script or flow
  - `retry` Retry — unresolved $ref
  - `permissioned_as` string — The user or group this trigger runs as. Used during deployment to preserve the original trigger owner.
  - `preserve_permissioned_as` boolean — When true and the caller is a member of the 'wm_deployers' group, preserves the original permissioned_as value instead of overwriting it.
  - `labels` string[]

## Response `201`

http trigger created

---

[API](https://skmtc.net/windmill/apis/windmill-api.md) · [All operations](https://skmtc.net/windmill/apis/windmill-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/windmill/windmill-api/revisions/a7f071808448/schema)
