# Update general settings

- Operation ID: `updateGeneralSettingsUsingPOST`
- HTTP method: `POST`
- Path: `/sauth/settings/general`
- [Human-readable API reference](https://hub.synerise.com/api-reference/identity-and-access-management#tag/Settings/operation/updateGeneralSettingsUsingPOST)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /sauth/settings/general:
    post:
      tags:
        - Settings
      security:
        - JWT: []
      summary: Update general settings
      operationId: updateGeneralSettingsUsingPOST
      description: |
        Update general settings. **Settings omitted in the request are reset to default!**.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_customers_iam_account_confirmation: update`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - tokenLifetimeInSeconds
              properties:
                tokenLifetimeInSeconds:
                  type: integer
                  format: int64
                  default: 0
                  description: "The time in seconds before the authorization tokens expire. If set to `0` (default), the global Synerise setting is applied: 60 minutes."
                voucherPoolUuid:
                  type: string
                  default: null
                  description: UUID of the voucher pool that stores `customId` values available for assignment to new Profiles, if applicable in your implementation.
                allowOverwriteCustomIdentify:
                  type: boolean
                  default: false
                  description: When set to TRUE, customers' `customId` values may be modified. By default, the `customId` cannot be changed.
                allowOverwriteExternalId:
                  type: boolean
                  default: false
                  description: |
                    When set to TRUE, a profile's `externalId` value may be modified.

                    This may be useful, for example, if someone deletes their account with an external authentication provider, and then registers a new account with the same email.
                    The external provider assigns a new ID and you need to allow overwriting the existing external ID in Synerise in order to link the existing profile in Synerise with the newly created account from the external provider.
                allowEmailChangeFromWebForm:
                  type: boolean
                  default: false
                  description: When set to TRUE, email change can be requested/confirmed using a web form.
                allowToPassCustomIdentifyWithVoucherPool:
                  type: boolean
                  default: false
                  description: When set to TRUE, `customId` can be provided even if `voucher pool` is configured. In this case voucher will not be assigned.
              title: GeneralSettingsData
        required: true
      responses:
        "200":
          description: New settings
          content:
            application/json:
              schema:
                type: object
                required:
                  - tokenLifetimeInSeconds
                properties:
                  tokenLifetimeInSeconds:
                    type: integer
                    format: int64
                    default: 0
                    description: "The time in seconds before the authorization tokens expire. If set to `0` (default), the global Synerise setting is applied: 60 minutes."
                  voucherPoolUuid:
                    type: string
                    default: null
                    description: UUID of the voucher pool that stores `customId` values available for assignment to new Profiles, if applicable in your implementation.
                  allowOverwriteCustomIdentify:
                    type: boolean
                    default: false
                    description: When set to TRUE, customers' `customId` values may be modified. By default, the `customId` cannot be changed.
                  allowOverwriteExternalId:
                    type: boolean
                    default: false
                    description: |
                      When set to TRUE, a profile's `externalId` value may be modified.

                      This may be useful, for example, if someone deletes their account with an external authentication provider, and then registers a new account with the same email.
                      The external provider assigns a new ID and you need to allow overwriting the existing external ID in Synerise in order to link the existing profile in Synerise with the newly created account from the external provider.
                  allowEmailChangeFromWebForm:
                    type: boolean
                    default: false
                    description: When set to TRUE, email change can be requested/confirmed using a web form.
                  allowToPassCustomIdentifyWithVoucherPool:
                    type: boolean
                    default: false
                    description: When set to TRUE, `customId` can be provided even if `voucher pool` is configured. In this case voucher will not be assigned.
                title: GeneralSettingsData
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/Settings/operation/updateGeneralSettingsUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/settings/general \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"tokenLifetimeInSeconds":0,"voucherPoolUuid":null,"allowOverwriteCustomIdentify":false,"allowOverwriteExternalId":false,"allowEmailChangeFromWebForm":false,"allowToPassCustomIdentifyWithVoucherPool":false}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"tokenLifetimeInSeconds\":0,\"voucherPoolUuid\":null,\"allowOverwriteCustomIdentify\":false,\"allowOverwriteExternalId\":false,\"allowEmailChangeFromWebForm\":false,\"allowToPassCustomIdentifyWithVoucherPool\":false}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/sauth/settings/general", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "tokenLifetimeInSeconds": 0,
              "voucherPoolUuid": null,
              "allowOverwriteCustomIdentify": false,
              "allowOverwriteExternalId": false,
              "allowEmailChangeFromWebForm": false,
              "allowToPassCustomIdentifyWithVoucherPool": false
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/sauth/settings/general");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/sauth/settings/general",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              tokenLifetimeInSeconds: 0,
              voucherPoolUuid: null,
              allowOverwriteCustomIdentify: false,
              allowOverwriteExternalId: false,
              allowEmailChangeFromWebForm: false,
              allowToPassCustomIdentifyWithVoucherPool: false
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/settings/general');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"tokenLifetimeInSeconds":0,"voucherPoolUuid":null,"allowOverwriteCustomIdentify":false,"allowOverwriteExternalId":false,"allowEmailChangeFromWebForm":false,"allowToPassCustomIdentifyWithVoucherPool":false}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/sauth/settings/general")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"tokenLifetimeInSeconds\":0,\"voucherPoolUuid\":null,\"allowOverwriteCustomIdentify\":false,\"allowOverwriteExternalId\":false,\"allowEmailChangeFromWebForm\":false,\"allowToPassCustomIdentifyWithVoucherPool\":false}")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: Settings
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
```
