---
updatedAt: 2026-09-09T03:53:31.000Z
agentTools:
  projectIndex: https://docs.vouchery.io/llms.txt
---

# This is fake endpoint to describe variant of PUT /api/v2.1/triggers/{id}

Update a trigger.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "contact": {
      "email": "hello@vouchery.io"
    },
    "description": "Vouchery API",
    "license": {
      "name": "Commercial",
      "url": "https://www.vouchery.io"
    },
    "title": "Vouchery",
    "version": "dev-vouchery-go"
  },
  "paths": {
    "/api/v2.1/triggers/{id}#___custom": {
      "put": {
        "description": "Update a trigger.",
        "operationId": "putApiV21TriggersIdcustom",
        "parameters": [
          {
            "description": "Trigger ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/requestTriggerCreateCustom"
              }
            }
          },
          "description": "The object with fields to update",
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/responseTriggerUpdate"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/responseError_Example_Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/responseError_Example_Forbidden"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity error. Validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/responseValidationError_Example"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Try again in a few minutes or contact support.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/responseError_Example_InternalServerError"
                }
              }
            }
          }
        },
        "security": [
          {
            "app_auth": []
          }
        ],
        "summary": "This is fake endpoint to describe variant of PUT /api/v2.1/triggers/{id}",
        "tags": [
          "Triggers and events"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "",
      "externalDocs": {
        "description": "",
        "url": "https://docs.vouchery.io"
      },
      "name": "Triggers and events"
    }
  ],
  "servers": [
    {
      "url": "https://admin.sandbox.vouchery.app"
    }
  ],
  "components": {
    "securitySchemes": {
      "app_auth": {
        "in": "header",
        "name": "Authorization",
        "type": "apiKey"
      }
    },
    "schemas": {
      "requestTriggerCreateCustom": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "code_name": {
            "description": "slug/name used to invoke the trigger",
            "type": "string"
          },
          "name": {
            "description": "Name displayed in UI",
            "type": "string"
          },
          "type": {
            "enum": [
              "Custom"
            ],
            "example": "Custom",
            "type": "string"
          }
        },
        "required": [
          "type",
          "name",
          "active",
          "code_name"
        ],
        "type": "object"
      },
      "responseError_Example_Forbidden": {
        "properties": {
          "code": {
            "example": "forbidden",
            "type": "string"
          },
          "error": {
            "example": "true",
            "type": "boolean"
          },
          "message": {
            "example": "You are not permitted to access this resource",
            "type": "string"
          },
          "type": {
            "example": "Error",
            "type": "string"
          }
        },
        "required": [
          "message",
          "type",
          "code",
          "error"
        ],
        "type": "object"
      },
      "responseError_Example_InternalServerError": {
        "properties": {
          "code": {
            "example": "unknown_error",
            "type": "string"
          },
          "error": {
            "example": "true",
            "type": "boolean"
          },
          "message": {
            "example": "Unknown error. Trace ID 1b477920d09147d9bce22cce8f405e98.",
            "type": "string"
          },
          "type": {
            "example": "Error",
            "type": "string"
          }
        },
        "required": [
          "message",
          "type",
          "code",
          "error"
        ],
        "type": "object"
      },
      "responseError_Example_Unauthorized": {
        "properties": {
          "code": {
            "example": "not_authorized",
            "type": "string"
          },
          "error": {
            "example": "true",
            "type": "boolean"
          },
          "message": {
            "example": "Not authorized",
            "type": "string"
          },
          "type": {
            "example": "Error",
            "type": "string"
          }
        },
        "required": [
          "code",
          "error",
          "message",
          "type"
        ],
        "type": "object"
      },
      "responseTriggerUpdate": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "data": {
            "items": {
              "format": "int32",
              "type": "integer"
            },
            "type": "object"
          },
          "id": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "trigger_type": {
            "type": "string"
          }
        },
        "required": [
          "data",
          "trigger_type",
          "name",
          "active",
          "id"
        ],
        "type": "object"
      },
      "responseValidationError_Example": {
        "properties": {
          "code": {
            "example": "invalid",
            "type": "string"
          },
          "error": {
            "example": "true",
            "type": "boolean"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/responseValidationSubError_Example"
            },
            "type": "array"
          },
          "message": {
            "example": "Object is invalid",
            "type": "string"
          },
          "type": {
            "example": "Error",
            "type": "string"
          }
        },
        "required": [
          "code",
          "error",
          "message",
          "type",
          "errors"
        ],
        "type": "object"
      },
      "responseValidationSubError_Example": {
        "properties": {
          "attribute": {
            "description": "Name of the property which is invalid",
            "example": "name",
            "type": "string"
          },
          "code": {
            "example": "must_be_unique",
            "type": "string"
          },
          "message": {
            "example": "Name must be unique",
            "type": "string"
          }
        },
        "required": [
          "attribute",
          "code",
          "message"
        ],
        "type": "object"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```