# Create Social Security Settings Creates the account's Social Security settings. Send the fields wrapped in a social_security key. niss is required. It is normalised (spaces, -, . and / are stripped), must have 11 digits, start with 1 or 2 and have a valid check digit. If settings already exist the call answers 422; use PUT instead. Do not send null for worker_type, regime, exempt or special_profile (the API answers 500). regime, exempt and special_profile are stored and returned but no calculation uses them; only worker_type changes the contribution rate. 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: POST /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, required) 11 digits, first digit 1 or 2, valid check digit. Spaces, -, . and / are stripped before validation and storage, so 123-456-789-02 is stored as 12345678902. Letters make it invalid. Example: "123-456-789-02" - `social_security.worker_type` (string) Defaults to independente. Enum: "independente", "eni" - `social_security.regime` (string) Defaults to services. Stored only. Enum: "services", "goods", "mixed" - `social_security.exempt` (boolean) Defaults to false. Stored only. - `social_security.special_profile` (string) Defaults to none. Stored only. Enum: "none", "organized_accounting", "accumulation", "own_fund" ## Response 201 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 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"