# Update Collection Alert Updates the existing collection alert configuration of the account, or of a client when client_id is sent. - Account level, replicate=true: every client-level configuration is deleted, so all clients follow the account configuration. - Client level, replicate=true: the client's own configuration is deleted (the client falls back to the account configuration), the other fields are ignored, and the response is {"collection_alert": {"client_has_email": true|false}}. Endpoint: PUT /api/v3/collection_alerts Version: 3.1.0 Security: apiKeyAuth ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Request fields (application/json): - `client_id` (integer) Optional. When sent, the configuration of that client is created/updated instead of the account's. An unknown client returns 404 "Client not found". Example: 1 - `collection_alert` (object, required) An enum field with a value outside its list returns 422. - `collection_alert.frequency` (string) Enum: "disabled", "biweekly", "weekly", "first_week", "last_week" - `collection_alert.weekday` (string) Enum: "monday", "tuesday", "wednesday", "thursday", "friday" - `collection_alert.period` (string) Enum: "morning", "afternoon" - `collection_alert.due` (string) Enum: "before_overdue", "after_overdue" - `collection_alert.email` (boolean) Example: true - `collection_alert.sms` (boolean) - `collection_alert.email_template` (string) Example: "This is an email\nwith a break line" - `collection_alert.sms_template` (string) - `collection_alert.replicate` (boolean) Account level (no client_id): when true, every client-level configuration is deleted, so all clients follow the account configuration. Client level (PUT with client_id): when true, the client's own configuration is deleted (the client falls back to the account configuration) and the other fields are ignored; the response is {"collection_alert": {"client_has_email": ...}}. ## Response 200 fields (application/json): - `collection_alert` (object) When GET is called with a client_id whose client has no collection alert configuration, only client_has_email is returned. - `collection_alert.configurable` (string) Example: "Client" - `collection_alert.frequency` (string) Enum: "disabled", "biweekly", "weekly", "first_week", "last_week" - `collection_alert.weekday` (string) Enum: "monday", "tuesday", "wednesday", "thursday", "friday" - `collection_alert.period` (string) Enum: "morning", "afternoon" - `collection_alert.due` (string) Enum: "before_overdue", "after_overdue" - `collection_alert.email` (boolean) Example: true - `collection_alert.sms` (boolean) - `collection_alert.email_template` (string) Example: "This is an email\nwith a break line" - `collection_alert.sms_template` (string,null) - `collection_alert.client_has_email` (boolean) Whether the client has a contact email. Example: true ## Response 401 fields (application/json): - `errors` (array) Example: [{"error":"Authentication Error"}] - `errors.error` (string) ## Response 404 fields (application/json): - `errors` (array) Example: [{"error":"Resource not found"}] - `errors.error` (string) ## Response 422 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string) ## Response 500 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string)