# Update Social Security Settings Updates the account's Social Security settings. PATCH is routed to the same action and behaves identically. Send only the fields to change, wrapped in a social_security key; the response always returns all five. Answers 404 when no settings exist yet; use POST first. niss is validated only when it changes, so a stored invalid NISS does not block updating other fields. Do not send null for worker_type, regime, exempt or special_profile (the API answers 500). Requires the administrator or contributor role. Error messages follow the language of the account (pt, en or es), not the Accept-Language header. JSON only. This feature only calculates and records; it submits nothing to Segurança Social. Endpoint: PUT /api/v3/accounts/social_security Version: 3.1.0 Security: apiKeyAuth ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Request fields (application/json): - `social_security` (object, required) - `social_security.niss` (string) Same normalisation and rules as on create. Validated only when it changes. Example: "123-456-789-02" - `social_security.worker_type` (string) Enum: "independente", "eni" - `social_security.regime` (string) Enum: "services", "goods", "mixed" - `social_security.exempt` (boolean) - `social_security.special_profile` (string) Enum: "none", "organized_accounting", "accumulation", "own_fund" ## Response 200 fields (application/json): - `social_security` (object) The account's Social Security settings. Always returns all five fields. - `social_security.niss` (string,null) NISS (Social Security identification number), 11 digits, stored without separators. null when no settings exist yet. Example: "12345678902" - `social_security.worker_type` (string) Worker type. Changes the contribution rate used by the quarterly declaration. Enum: "independente", "eni" - `social_security.regime` (string) Stored and returned only. No calculation reads it. Enum: "services", "goods", "mixed" - `social_security.exempt` (boolean) Stored and returned only. No calculation reads it. - `social_security.special_profile` (string) Stored and returned only. No calculation reads it. organized_accounting does not exempt the account from the calculation. Enum: "none", "organized_accounting", "accumulation", "own_fund" ## Response 401 fields (application/json): - `errors` (array) Example: [{"error":"Authentication Error"}] - `errors.error` (string) ## Response 403 fields (application/json): - `errors` (array) Example: [{"error":"You do not have permission to perform this action"}] - `errors.error` (string) ## Response 404 fields (application/json): - `errors` (array) Example: [{"error":"No NISS is set for this account yet."}] - `errors.error` (string) ## Response 422 fields (application/json): - `errors` (array) Example: [{"error":"No NISS is set for this account yet."}] - `errors.error` (string) ## Response 500 fields (application/json): - `status` (integer) Example: 500 - `error` (string) Example: "Internal Server Error"