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
string
required
24-character hex ObjectId of the politics.
Headers
string
required
Body — replacement fields
string
string
Rule[]
Must be non-empty when provided.
File[]
Same validation as on create.
string[]
object
Body — granular operations
Rule[]
Append one or more rules to the end of the array.
integer[]
Indices (0-based) of rules to remove.
object
Modify one rule in place.
File[]
integer[]
Indices to remove.
string[]
string[]
Exact string match is used to decide which entries to drop.
Response
boolean
Politics
The updated document.