---
title: "Update trigger by ID"
method: PUT
path: "/v1/workflows/triggers/{id}"
tags: ["Triggers"]
---

# Update trigger by ID

`PUT /v1/workflows/triggers/{id}`

## Request

- Base URL: `https://api.paymongo.com`
- URL: `https://api.paymongo.com/v1/workflows/triggers/{id}`
- Auth: none required

## Path parameters

- `id` string, required

## Headers

- `Organization-Id` string, required

## Request body

- CreateTriggerRequestDTO
  - `condition` object, required
  - `workflow_id` string, required

## Response `200`

OK

- object: Standard response containing data and its metadata if any
  - `data` TriggerResponseDTO
    - `condition` object
    - `created_at` string
    - `deleted_at` string
    - `id` string
    - `internal` boolean
    - `livemode` boolean
    - `organization_id` string
    - `schedule_id` string
    - `state` string
    - `updated_at` string
    - `workflow_id` string
  - `has_more` boolean: HasMore is true when more results exist beyond this page: after the last row when paging forward, before the first row when paging backward with before_id. It is a pointer so a non-paginated response omits the field rather than asserting false.
  - `meta` unknown
  - `next_cursor` string: Opaque cursor for the last row on the page. Echo it as after_id to read the next page. It normally carries the sort it was issued under, so sort_by need not be repeated; for a very long text sort value the API falls back to a plain row id, which carries no sort, so a client pinning a non-default sort should keep sending sort_by. It sits beside has_more rather than inside meta, and is omitted when the page has no rows.
  - `prev_cursor` string: Opaque cursor for the first row on the page. Echo it as before_id to read the previous page. It normally carries the sort it was issued under, so sort_by need not be repeated; for a very long text sort value the API falls back to a plain row id, which carries no sort, so a client pinning a non-default sort should keep sending sort_by. It sits beside has_more rather than inside meta, and is omitted when the page has no rows.

## Other responses

- `400`: Bad Request
- `401`: authentication_failed, missing_authorization_header, unsupported_auth_method or jwt_signature_invalid when the credential is missing, malformed or rejected; accountid_identity_required when a superuser or service-to-service caller sends the Account-ID header
- `404`: trigger_not_found, the trigger is not found in this account and mode or is not active; workflow_not_found, a new workflow_id is not found in this account and mode
- `409`: trigger_type_change_forbidden or trigger_count_change_forbidden; delete and recreate the trigger instead
- `422`: Unprocessable Entity
- `500`: Internal Server Error
- `502`: accountid_relationship_lookup_failed or accountid_account_lookup_failed when an upstream service does not answer
- `503`: upstream_unavailable when an upstream service does not answer
- `504`: service_timeout when the request exceeds its deadline

---

[API](https://skmtc.dev/paymongo/apis/workflow.md) - [All operations](https://skmtc.dev/paymongo/apis/workflow/llms.txt) - [OpenAPI document](https://skmtc.dev/paymongo/apis/workflow/revisions/859719cfffa2?raw)
