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

# Create trigger

`POST /api/triggers`

Create a trigger from a preset and return it with its signing secret.

## Request body

- PlatformTriggerCreateRequest
  - `preset_id` string, required — ID of the preset to instantiate.
  - `description` string — Optional note describing this trigger.
  - `inputs` object — Values for the preset's inputs.
  - `delivery` PlatformTriggerDelivery, required
    - `webhook_url` string, uri, required — HTTPS URL that signed events are delivered to.
    - `auth` PlatformTriggerAuth — Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth.
      - `type` 'BEARER', required — Credential scheme.
      - `secret` string, required — Secret credential value. Write-only; never returned on reads.

## Response `201`

Trigger created.

- PlatformTriggerCreateResponse
  - `trigger` PlatformTriggerWithSecret, required
    - `trigger_id` string, required — ID of the trigger.
    - `preset_id` string, required — ID of the preset this trigger was created from.
    - `description` string — Optional caller-supplied note describing this trigger.
    - `status` 'ENABLED' | 'DISABLED', required — Current trigger lifecycle state.
    - `inputs` object — Values supplied for the preset's inputs.
    - `delivery` PlatformTriggerDelivery, required
      - `webhook_url` string, uri, required — HTTPS URL that signed events are delivered to.
      - `auth` PlatformTriggerAuth — Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth.
        - `type` 'BEARER', required — Credential scheme.
        - `secret` string, required — Secret credential value. Write-only; never returned on reads.
    - `created_at` string, date-time, required — Time the trigger was created.
    - `updated_at` string, date-time, required — Time the trigger was last updated.
    - `signing_secret` string, required — Secret for verifying webhook signatures, serialized as `whsec_<base64-encoded key>` following Standard Webhooks. Returned only when the trigger is created and cannot be retrieved later. Store it securely.
  - `request_id` string, required — Platform-generated request ID for support correlation.

## Other responses

- `400` — Invalid request (malformed JSON, invalid parameter values, unknown fields).
- `401` — Missing or invalid authentication token.
- `403` — Token valid but lacks permission for the requested operation.
- `404` — Resource not found.
- `408` — Backend did not respond within the timeout window.
- `409` — Request conflicts with current state of the resource.
- `413` — Request body exceeds the maximum allowed size.
- `429` — Rate limit exceeded. Includes Retry-After header.
- `500` — Unexpected server-side failure.
- `503` — Backend temporarily unavailable.

---

[API](https://skmtc.dev/gleanwork/apis/glean-platform-api.md) · [All operations](https://skmtc.dev/gleanwork/apis/glean-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gleanwork/glean-platform-api/revisions/46c121f70527/schema)
