Update an existing template
PATCH/templates/{templateId}
This endpoint updates an existing template, performing all necessary validations on the updated object.
Note: Currently, only Webhook templates are supported.
A valid PATCH request contains an array of PATCH operation objects.
Click for more details on the PATCH Request Object Structure
These objects can be:
- For
REPLACEOperation:{
"op": "REPLACE",
"path": "<path for replacement>",
"value": "<new value for the property>"
}path: Can be an editable property of the webhook template or the ID of a filter constraint or request header ("path": "<nested object id>/<nested object property to be edited>") along with the property to be edited.value: Mandatory.
- For
REMOVEOperation:{
"op": "REMOVE",
"path": "<path_for_removal>"
}path: Can be a nullable property of the webhook template or the ID ("path": "<nested object id>") of an existing filter constraint or request header.- No
valueshould be set.
- For
ADDoperation- For simple properties:
{
"op": "ADD",
"path": "<property_to_add_value_for>",
"value": "<value_for_the_property>"
}path: Can be a template property.
- For new request headers or filter constraints:
{
"op": "ADD",
"path": "headers/<header property>",
"value": "<value to be added for specified property for the new header>"
} {
"op": "ADD",
"path": "filterConstraints/<filter constraint property>",
"value": "<value to be added for specified property for the new filter constraint>"
}
- For simple properties:
- In a single
PATCHcall, you can add only one new request header and one new filter constraint. If multiple attempts are made to add within the same array, only the last value for each type will be populated in the newly added nested object of each type. - For nested objects inside the template with
PATCH,ADDworks for addition only (given the custom syntax with theheadersorfilterConstraintsidentifiers) andREPLACEis the one used for the replacement of the values of the nested objects' properties.
Request
Responses
- 200
- 400
- 401
- 403
- 404
The template was successfully updated.
A validation error occurred
Unauthorized
Forbidden
The template could not be found.