Politics
Update politics
Update fields by replacement and/or granular array operations
PATCH
The endpoint accepts two kinds of fields in the same body:
- Replacement fields (
name,description,rules,knowledgeFiles,contactNotifications,outputFormat) overwrite the stored value. - Granular operations (
addRules,removeRules,updateRule,addKnowledgeFiles,removeKnowledgeFiles,addContactNotifications,removeContactNotifications) mutate the current array without requiring the client to send the full value.
updatedAt is always refreshed.
Path parameters
24-character hex ObjectId of the politics.
Headers
Body — replacement fields
Must be non-empty when provided.
Same validation as on create.
Body — granular operations
Append one or more rules to the end of the array.
Indices (0-based) of rules to remove.
Modify one rule in place.
Indices to remove.
Exact string match is used to decide which entries to drop.
Response
The updated document.