> For the complete documentation index, see [llms.txt](https://docs.ibexa.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ibexa.ai/developers/rest-api/triggers/update-trigger.md).

# Update Trigger

Partially update a trigger's mutable fields (`config`, `agent_args`).

`config` is merged over the stored config at the top level: keys present in the body are updated, omitted keys keep their stored value. `agent_args` is likewise preserved when omitted — sending it (even as `null`) replaces the value, omitting it keeps the existing one.

The merged result is validated as a whole against the definition's `config_schema`, so a partial edit can still be rejected over a field it didn't touch. Scheduler `day_of_month` values follow the same rule as on create: a day the target month is too short for runs on that month's last day rather than being rejected.

```json
{"openapi":"3.1.0","info":{"title":"Ibexa Agentic Marketing Platform","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/login/access-token"}}}},"schemas":{"UpdateTriggerPayloadSchema":{"properties":{"config":{"additionalProperties":true,"type":"object","title":"Config"},"agent_args":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Agent Args"}},"type":"object","required":["config"],"title":"UpdateTriggerPayloadSchema","description":"Request body for updating a trigger.\n\n`config` is merged into the stored config at the top level: keys present\nin the body overwrite stored values, omitted keys are preserved. This\nmakes partial edits possible — in particular sensitive webhook keys\n(`token`, `secret`), which are stripped on read and so can never be\nechoed back by a client. Send an explicit `null` to clear a field. The\nmerge happens in `_validate_update_trigger_payload`.\n`agent_args` is optional and behaves like `config`: omit it to keep the\nexisting value, or send it (a value, or `null` for \"no extra args\") to\nreplace it. The route distinguishes omitted from explicit via\n`model_fields_set`; the service preserves the existing beat kwargs when\nit's omitted (they aren't persisted on the row)."},"TriggerResponseSchema":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organisation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organisation Id"},"agent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Agent Id"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"definition_id":{"type":"string","format":"uuid","title":"Definition Id"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["id","organisation_id","agent_id","created_by","definition_id","config"],"title":"TriggerResponseSchema","description":"Response schema for a trigger."}}},"paths":{"/api/v1/triggers/{trigger_id}":{"patch":{"tags":["triggers","public"],"summary":"Update Trigger","description":"Partially update a trigger's mutable fields (`config`, `agent_args`).\n\n`config` is merged over the stored config at the top level: keys present\nin the body are updated, omitted keys keep their stored value. `agent_args`\nis likewise preserved when omitted — sending it (even as `null`) replaces\nthe value, omitting it keeps the existing one.\n\nThe merged result is validated as a whole against the definition's\n`config_schema`, so a partial edit can still be rejected over a field it\ndidn't touch. Scheduler `day_of_month` values follow the same rule as on\ncreate: a day the target month is too short for runs on that month's last\nday rather than being rejected.","operationId":"triggers-update_trigger","parameters":[{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTriggerPayloadSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerResponseSchema"}}}},"400":{"description":"Invalid request payload or parameters","content":{"application/json":{}}},"401":{"description":"User not authenticated","content":{"application/json":{}}},"403":{"description":"User lacks permission","content":{"application/json":{}}},"404":{"description":"Resource not found or user has no permission to access it","content":{"application/json":{}}}}}}}}
```
