openapi: 3.0.0
info:
  title: Profile Management - Synerise Public API
  version: 1.2.2
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: Events
  - name: Tags
  - name: Profile management
  - name: Profile registration
  - name: Profile account management
  - name: Profile devices
x-tagGroups:
  - name: Profile Management
    tags:
      - Events
      - Tags
      - Profile management
      - Profile registration
      - Profile account management
      - Profile devices
paths:
  /v4/transactions:
    post:
      summary: Create a transaction
      description: |
        Create a transaction record in the database.

        For each transaction, a `transaction.charge` event is generated automatically. In addition, each item in the `products` array produces a `product.buy` event.

        All monetary values must use the same currency and be greater
        than or equal to zero. `discountAmount` must be greater than zero
        or omitted.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_TRANSACTION_CREATE`
      operationId: CreateATransaction
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateatransactionRequest-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2020-10-28T12:14:45.364+00:00
                status: 400
                error: Bad Request
                message: |-
                  JSON parse error: Missing property: 'currency'; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Missing property: 'currency'
                   at [Source: (PushbackInputStream); line: 13, column: 14] (through reference chain: com.synerise.api.endpoint.transactions.domain.model.IdentifiedTransactionData["products"]->java.util.ArrayList[0]->com.synerise.api.endpoint.transactions.domain.model.ProductData["finalUnitPrice"])
                path: /transactions
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          $ref: "#/components/responses/api-service-404-pii"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/CreateATransaction
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/transactions \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}"

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

            conn.request("POST", "/v4/transactions", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "discountAmount": {
                "amount": 0,
                "currency": "USD"
              },
              "metadata": {
                "promotionCode": "string",
                "quantityToRedeem": 0
              },
              "orderId": "be466362-71e9-4bdd-ad11-bfacead5276b",
              "paymentInfo": {
                "method": "CASH"
              },
              "products": [
                {
                  "finalUnitPrice": {
                    "amount": 3.25,
                    "currency": "USD"
                  },
                  "name": "Soft drink",
                  "sku": "189784563455",
                  "categories": [
                    "string"
                  ],
                  "image": "string",
                  "url": "string",
                  "netUnitPrice": {
                    "amount": 3.25,
                    "currency": "USD"
                  },
                  "tax": 0.1,
                  "quantity": 2.5,
                  "regularPrice": {
                    "amount": 3.25,
                    "currency": "USD"
                  },
                  "discountPrice": {
                    "amount": 15.5,
                    "currency": "USD"
                  },
                  "discountPercent": 0.1,
                  "property1": null,
                  "property2": null
                }
              ],
              "recordedAt": "2019-02-07T09:53:56.999+00:00",
              "revenue": {
                "amount": 64.25,
                "currency": "USD"
              },
              "value": {
                "amount": 112.25,
                "currency": "USD"
              },
              "source": "MOBILE",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00"
            });

            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/v4/transactions");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/transactions",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              discountAmount: {amount: 0, currency: 'USD'},
              metadata: {promotionCode: 'string', quantityToRedeem: 0},
              orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',
              paymentInfo: {method: 'CASH'},
              products: [
                {
                  finalUnitPrice: {amount: 3.25, currency: 'USD'},
                  name: 'Soft drink',
                  sku: '189784563455',
                  categories: ['string'],
                  image: 'string',
                  url: 'string',
                  netUnitPrice: {amount: 3.25, currency: 'USD'},
                  tax: 0.1,
                  quantity: 2.5,
                  regularPrice: {amount: 3.25, currency: 'USD'},
                  discountPrice: {amount: 15.5, currency: 'USD'},
                  discountPercent: 0.1,
                  property1: null,
                  property2: null
                }
              ],
              recordedAt: '2019-02-07T09:53:56.999+00:00',
              revenue: {amount: 64.25, currency: 'USD'},
              value: {amount: 112.25, currency: 'USD'},
              source: 'MOBILE',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}');

            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/v4/transactions")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}")
              .asString();
  /v4/transactions/batch:
    post:
      summary: Batch add or update transactions
      description: |
        Enqueue a number of add/update operations in the Synerise
        application database. 

        For each transaction, a `transaction.charge` event is generated automatically. In addition, each item in the `products` array produces a `product.buy` event.

        If you don't have some information about a transaction, don't insert a null-value parameter - omit the parameter entirely. Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).



        The body contains an array of objects to update. The objects are
        the same as in the *Update transaction* and *Create transaction*
        endpoints.



        All monetary values must use the same currency and be greater
        than or equal to zero. `discountAmount` must be greater than zero
        or omitted.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_BATCH_TRANSACTION_CREATE`
      operationId: BatchAddOrUpdateTransactions
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: An array of transactions to post or update
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/api-service-CreateatransactionRequest-apiv4"
              description: ""
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-28T12:24:24.444Z
                path: /transactions
                message: Some fields did not pass validation
                errors:
                  - code: 14191
                    field: client
                    message: Client cannot have null value
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/BatchAddOrUpdateTransactions
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/transactions/batch \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}]"

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

            conn.request("POST", "/v4/transactions/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "client": {
                  "customId": "string",
                  "id": 433230297,
                  "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                  "email": "string"
                },
                "discountAmount": {
                  "amount": 0,
                  "currency": "USD"
                },
                "metadata": {
                  "promotionCode": "string",
                  "quantityToRedeem": 0
                },
                "orderId": "be466362-71e9-4bdd-ad11-bfacead5276b",
                "paymentInfo": {
                  "method": "CASH"
                },
                "products": [
                  {
                    "finalUnitPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "name": "Soft drink",
                    "sku": "189784563455",
                    "categories": [
                      "string"
                    ],
                    "image": "string",
                    "url": "string",
                    "netUnitPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "tax": 0.1,
                    "quantity": 2.5,
                    "regularPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "discountPrice": {
                      "amount": 15.5,
                      "currency": "USD"
                    },
                    "discountPercent": 0.1,
                    "property1": null,
                    "property2": null
                  }
                ],
                "recordedAt": "2019-02-07T09:53:56.999+00:00",
                "revenue": {
                  "amount": 64.25,
                  "currency": "USD"
                },
                "value": {
                  "amount": 112.25,
                  "currency": "USD"
                },
                "source": "MOBILE",
                "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00"
              }
            ]);

            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/v4/transactions/batch");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/transactions/batch",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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([
              {
                client: {
                  customId: 'string',
                  id: 433230297,
                  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                  email: 'string'
                },
                discountAmount: {amount: 0, currency: 'USD'},
                metadata: {promotionCode: 'string', quantityToRedeem: 0},
                orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',
                paymentInfo: {method: 'CASH'},
                products: [
                  {
                    finalUnitPrice: {amount: 3.25, currency: 'USD'},
                    name: 'Soft drink',
                    sku: '189784563455',
                    categories: ['string'],
                    image: 'string',
                    url: 'string',
                    netUnitPrice: {amount: 3.25, currency: 'USD'},
                    tax: 0.1,
                    quantity: 2.5,
                    regularPrice: {amount: 3.25, currency: 'USD'},
                    discountPrice: {amount: 15.5, currency: 'USD'},
                    discountPercent: 0.1,
                    property1: null,
                    property2: null
                  }
                ],
                recordedAt: '2019-02-07T09:53:56.999+00:00',
                revenue: {amount: 64.25, currency: 'USD'},
                value: {amount: 112.25, currency: 'USD'},
                source: 'MOBILE',
                eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/transactions/batch');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('[{"client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"discountAmount":{"amount":0,"currency":"USD"},"metadata":{"promotionCode":"string","quantityToRedeem":0},"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","paymentInfo":{"method":"CASH"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"recordedAt":"2019-02-07T09:53:56.999+00:00","revenue":{"amount":64.25,"currency":"USD"},"value":{"amount":112.25,"currency":"USD"},"source":"MOBILE","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}]');

            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/v4/transactions/batch")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"metadata\":{\"promotionCode\":\"string\",\"quantityToRedeem\":0},\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"paymentInfo\":{\"method\":\"CASH\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"recordedAt\":\"2019-02-07T09:53:56.999+00:00\",\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"source\":\"MOBILE\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}]")
              .asString();
  /v4/clients:
    post:
      summary: Create or update a Profile
      description: |
        Create a new profile in the Synerise application database or update an existing one. If you don't have some information about the profile, don't insert a null-value parameter - omit the parameter entirely.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_CLIENT_CREATE`

        **User role permission required:** `client_management: create`
      operationId: CreateAClientInCrm
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: |
          
          In the request body, you must provide at least one of those identifiers: 
          - `email`  
            If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.
          - `phone`  
            Phone is treated as an identifier only if no other identifier is provided. If this is the case and non-unique emails are disabled, an anonymous profile is created with a randomized email placeholder.
          - `customId`
          - `uuid`
        content:
          application/json:
            schema:
              type: object
              allOf:
                - $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-18T13:15:39.84Z
                path: /clients
                message: Some fields did not pass validation
                errors:
                  - code: 12082
                    field: countryCode
                    message: Country Code must have 0 or 3 characters as per ISO format.
                    rejectedValue: string
                  - code: 120
                    field: avatarUrl
                    message: "120"
                    rejectedValue: string
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/CreateAClientInCrm
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ]
            });

            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/v4/clients");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}');

            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/v4/clients")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /v4/clients/merge/from/custom-ids/{sourceCustomIDs}/to/custom-id/{targetCustomID}:
    post:
      summary: Merge profiles by customId
      description: |
        Moves profile UUIDs to a single profile (which must already exist) and removes the profiles that were merged.  

        The event history of the source profiles is moved to the target profile.

        The attributes (data from the `attributes` object) that don't exist in the target profile are copied to the target profile. If an attribute already exists in the target profile, the value from the source profile is lost.

        The properties and tags of the source profiles are lost, even if they don't have a value in the target profile.

         <p style='color:red'><strong>WARNING:</strong> This operation is irreversible. Use it carefully.</p>
         <p style='color:red'><strong>WARNING:</strong> You should not try to merge more than 10-20 profiles at once.</p>

         For more details, see the [Developer Guide](https://hub.synerise.com/developers/api/clients/profiles/merging-profiles/).


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_MERGEBYCUSTOMID_CLIENT_UPDATE`
      operationId: MergeClientsByCustomId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientCustomIds-apiv4"
        - $ref: "#/components/parameters/api-service-pathTargetCustomId-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Request completed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Source and/or target profile(s) not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/MergeClientsByCustomId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("POST", "/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            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/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            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": "/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            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/v4/clients/merge/from/custom-ids/customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5/to/custom-id/customIdExample")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/merge/from/ids/{fromClientIds}/to/id/{toClientId}:
    post:
      summary: Merge profiles by clientId
      description: |
        Moves profile UUIDs to a single profile (which must already exist) and removes the profiles that were merged.  

        The event history of the source profiles is moved to the target profile.

        The attributes (data from the `attributes` object) that don't exist in the target profile are copied to the target profile. If an attribute already exists in the target profile, the value from the source profile is lost.

        The properties and tags of the source profiles are lost, even if they don't have a value in the target profile.

         <p style='color:red'><strong>WARNING:</strong> This operation is irreversible. Use it carefully.</p>
         <p style='color:red'><strong>WARNING:</strong> You should not try to merge more than 10-20 profiles at once.</p>

         For more details, see the [Developer Guide](https://hub.synerise.com/developers/api/clients/profiles/merging-profiles/).


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_MERGE_BY_ID_CLIENT_UPDATE`
      operationId: MergeClientsByClientId
      parameters:
        - $ref: "#/components/parameters/api-service-pathFromClientIds-apiv4"
        - $ref: "#/components/parameters/api-service-pathToClientId-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Request completed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Source and/or target profile(s) not found.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/MergeClientsByClientId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("POST", "/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            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/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            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": "/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            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/v4/clients/merge/from/ids/434428563,33322211,232212342/to/id/434428563")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/batch:
    post:
      summary: Batch add or update profiles
      description: |2
         Enqueue a number of add/update operations in the Synerise application database. <br/><br/>If you don't have some information about a profile, don't insert a null-value parameter - omit the parameter entirely. Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).


        The body contains an array of objects to update. The objects are the same as in the *Create a Profile* and *Update a Profile* endpoints.

        <span style='color:red'><strong>IMPORTANT:</strong></span> The request body cannot contain more than 1000 items or exceed 1 MB in size.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_BATCH_CLIENT_CREATE`

        **User role permission required:** `client_management: create`
      operationId: BatchAddOrUpdateClients
      parameters:
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: |
          
          Each profile must have at least one of the following identifiers:
          - `email`  
            If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, email is NOT an identifier.
          - `phone`  
            Phone number is treated as an identifier only if no other identifier is provided. Then, if a profile with this phone number does not exist and non-unique emails are disabled, an anonymous profile is created.
          - `customId`
          - `uuid`
          - `clientId` (can be used only when updating an existing profile)
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 1000
              items:
                type: object
                properties:
                  clientId:
                    type: integer
                    format: int64
                    description: |
                      This ID can be used only for updating an existing profile.


                      If a profile does not exist and `clientId` is the only provided identifier, the operation returns HTTP 202 and **a profile is not created**. If another identifier is provided, a profile is created with that identifier and a `clientId` generated by the system.
                allOf:
                  - $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: "Request accepted. IMPORTANT: this does not mean that all profiles were created/updated successfully. The data is sent for further processing in other elements of the infrastructure."
        "207":
          description: Invalid data in some entries. Correct entries are sent for further processing, the invalid ones are rejected.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-Error-apiv4"
              example:
                - rejectedValue: de73b3490c4-bb8c0d8
                  field: list[0].uuid
                  status: 400
                  message: UUID must be well-formed value as per RFC 4122
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/BatchAddOrUpdateClients
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/batch \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"clientId":0,"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"clientId\":0,\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}]"

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

            conn.request("POST", "/v4/clients/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "clientId": 0,
                "email": "string",
                "phone": "+48111222333",
                "customId": "string",
                "firstName": "string",
                "lastName": "string",
                "displayName": "string",
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "avatarUrl": "string",
                "birthDate": "1987-10-24",
                "company": "string",
                "city": "string",
                "address": "string",
                "zipCode": "string",
                "province": "string",
                "countryCode": "PL",
                "sex": "FEMALE",
                "agreements": {
                  "email": false,
                  "sms": false,
                  "push": false,
                  "webPush": false,
                  "bluetooth": false,
                  "rfid": false,
                  "wifi": false
                },
                "attributes": {
                  "property1": null,
                  "property2": null
                },
                "tags": [
                  "string"
                ]
              }
            ]);

            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/v4/clients/batch");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/batch",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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([
              {
                clientId: 0,
                email: 'string',
                phone: '+48111222333',
                customId: 'string',
                firstName: 'string',
                lastName: 'string',
                displayName: 'string',
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                avatarUrl: 'string',
                birthDate: '1987-10-24',
                company: 'string',
                city: 'string',
                address: 'string',
                zipCode: 'string',
                province: 'string',
                countryCode: 'PL',
                sex: 'FEMALE',
                agreements: {
                  email: false,
                  sms: false,
                  push: false,
                  webPush: false,
                  bluetooth: false,
                  rfid: false,
                  wifi: false
                },
                attributes: {property1: null, property2: null},
                tags: ['string']
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/batch');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('[{"clientId":0,"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}]');

            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/v4/clients/batch")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"clientId\":0,\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}]")
              .asString();
  /v4/clients/tags:
    get:
      summary: Get all tags
      description: |
        
        Retrieve all tags that can be assigned to profiles.

        This endpoint is available from version 4.1.0

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_TAGS_CLIENT_READ`

        **User role permission required:** `client_tags: read`
      operationId: GetAllTags
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: A list of tags
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-Tag-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Tags
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/GetAllTags
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/tags \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/clients/tags", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/v4/clients/tags");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/tags",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/tags');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/clients/tags")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{clientId}:
    get:
      summary: Get profile data
      description: |
        Retrieve profile data by profile ID. If PII protection is enabled and your API key/user doesn't have the required permissions, this endpoint can only return test profiles; other profiles return error 404.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_BY_ID_CLIENT_READ`

        **User role permission required:** `client_info: read`
      operationId: GetClientData
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Details of a single profile
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          $ref: "#/components/responses/api-service-404-pii"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/GetClientData
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/434428563 \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/clients/434428563", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/v4/clients/434428563");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/434428563",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/434428563');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/clients/434428563")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      summary: Update a profile (identify by ID)
      description: |
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).

        The `attributes` object can be used to add custom attributes of your choice. For example, `"hasDog":true`.

        The `tags` array contains custom tags of your choice.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_BY_ID_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: UpdateAClient
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-21T08:37:34.526Z
                path: /clients/1234
                message: Some fields did not pass validation
                errors:
                  - code: 12053
                    field: uuid
                    message: UUID must be well-formed value as per RFC 4122
                    rejectedValue: "4321"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: Client 525446575 not found
                path: /clients/525446575
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/UpdateAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/434428563 \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients/434428563", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ]
            });

            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/v4/clients/434428563");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/434428563",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/434428563');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}');

            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/v4/clients/434428563")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
    delete:
      summary: Delete a profile
      description: |
        Delete a profile from the database.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_BY_ID_CLIENT_DELETE`

        **User role permission required:** `client_info: delete`
      operationId: DeleteAClient
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "202":
          description: Accepted
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: Client 525446575 not found
                path: /clients/525446575
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/DeleteAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/clients/434428563 \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/clients/434428563", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("DELETE", "https://api.synerise.com/v4/clients/434428563");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/434428563",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/434428563');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Accept' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/clients/434428563")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/by-email/{clientEmail}:
    post:
      summary: Update a profile (identify by email)
      description: |
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).

        The `attributes` object can be used to add custom attributes of your choice. For example, `"hasDog":true`.

        The `tags` array contains custom tags of your choice.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_BY_EMAIL_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: UpdateAClientByEmail
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientEmail-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-21T08:37:34.526Z
                path: /clients/by-email/client@synerise.com
                message: Some fields did not pass validation
                errors:
                  - code: 12053
                    field: uuid
                    message: UUID must be well-formed value as per RFC 4122
                    rejectedValue: "4321"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: "No client record found for email: client@synerise.com"
                path: /clients/by-email/client@synerise.com
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/UpdateAClientByEmail
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients/by-email/clientemail@synerise.com", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ]
            });

            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/v4/clients/by-email/clientemail@synerise.com");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/by-email/clientemail@synerise.com",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/by-email/clientemail@synerise.com');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}');

            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/v4/clients/by-email/clientemail@synerise.com")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /v4/clients/by-customid/{customId}:
    post:
      summary: Update a profile (identify by customId)
      description: |
        Change the details of a profile in the Synerise application database. <br/><br/>Sending a null value <strong>deletes an attribute</strong> (if it's a custom attribute) or <strong>sets it to null/default value</strong> (if the attribute is Synerise-native).
         
        The `attributes` object can be used to add custom attributes of your choice. For example, `"hasDog":true`.

        The `tags` array contains custom tags of your choice.

        This is an asynchronous operation. After the request body is validated, the request is added to the queue (HTTP 202).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_BY_CUSTOM_ID_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: UpdateAClientByCustomId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientCustomId-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-CreateClientRequestBody-apiv4"
        required: true
      responses:
        "202":
          description: Accepted, queued for processing
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2019-03-21T08:37:34.526Z
                path: /clients/by-customid/customId1234
                message: Some fields did not pass validation
                errors:
                  - code: 12053
                    field: uuid
                    message: UUID must be well-formed value as per RFC 4122
                    rejectedValue: "4321"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: "No client record found for customId: customId1234"
                path: /clients/by-customid/customId1234
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/UpdateAClientByCustomId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/by-customid/customIdExample \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/v4/clients/by-customid/customIdExample", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ]
            });

            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/v4/clients/by-customid/customIdExample");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/by-customid/customIdExample",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              email: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/by-customid/customIdExample');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","birthDate":"1987-10-24","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}');

            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/v4/clients/by-customid/customIdExample")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /v4/clients/by-custom-id/{customId}:
    delete:
      summary: Delete a profile (identify by customId)
      description: |
        Delete a profile from the database.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_BY_ID_CLIENT_DELETE`

        **User role permission required:** `client_info: delete`
      operationId: DeleteAClientByCustomId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientCustomId-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "202":
          description: Accepted
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:48:56.522+00:00
                status: 404
                error: Not Found
                message: "No client record found for customId: customId1234"
                path: /clients/by-customid/customId1234
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/DeleteAClientByCustomId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/clients/by-custom-id/customIdExample \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v4/clients/by-custom-id/customIdExample", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("DELETE", "https://api.synerise.com/v4/clients/by-custom-id/customIdExample");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/by-custom-id/customIdExample",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/by-custom-id/customIdExample');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/clients/by-custom-id/customIdExample")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{clientId}/linked-devices:
    post:
      summary: Link a device by profile ID
      description: |2
         Assign a device to a profile ID. A profile may have many devices assigned.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_DEVICE_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: LinkAClientDeviceByClientId
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4"
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T12:34:02.222Z
                path: /clients/1245757/linked-devices
                message: Some fields did not pass validation
                errors:
                  - code: 12301
                    field: deviceId
                    message: "12301"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile devices
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientId
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/434428563/linked-devices \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}"

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

            conn.request("POST", "/v4/clients/434428563/linked-devices", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "registrationId": "string",
              "type": "android",
              "bluetoothAddress": "string",
              "macAddress": "string",
              "manufacturer": "string",
              "model": "string",
              "osVersion": "string",
              "product": "a51ul_htc_europe",
              "screenHeight": 0,
              "screenWidth": 0,
              "publicKey": "string"
            });

            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/v4/clients/434428563/linked-devices");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/434428563/linked-devices",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              deviceId: 'string',
              registrationId: 'string',
              type: 'android',
              bluetoothAddress: 'string',
              macAddress: 'string',
              manufacturer: 'string',
              model: 'string',
              osVersion: 'string',
              product: 'a51ul_htc_europe',
              screenHeight: 0,
              screenWidth: 0,
              publicKey: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/434428563/linked-devices');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}');

            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/v4/clients/434428563/linked-devices")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}")
              .asString();
  /v4/clients/{identifierType}/{identifierValue}:
    get:
      summary: Fetch profile data
      description: |2
         Get the details of a single profile. If PII protection is enabled and your API key/user doesn't have the required permissions, this endpoint can only return test profiles; other profiles return error 404.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_BY_IDENTIFIER_CLIENT_READ`

        **User role permission required:** `client_info: read`
      operationId: FindAClient
      parameters:
        - name: identifierType
          in: path
          description: The type of profile identifier to use for the request
          required: true
          schema:
            type: string
            example: by-email
            enum:
              - by-custom-id
              - by-phone
              - by-uuid
              - by-email
        - name: identifierValue
          in: path
          description: The value of the selected identifier. The value must be URL-encoded.
          required: true
          schema:
            type: string
            example: address@domain.com
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Details of a single profile
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                path: /clients/by-custom-id/444555
                message: Api-Version header is required
                error: Bad Request
                timestamp: 2018-06-07T09:33:59.183Z
                status: 400
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          $ref: "#/components/responses/api-service-404-pii"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/FindAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/by-email/address@domain.com \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/clients/by-email/address@domain.com", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/v4/clients/by-email/address@domain.com");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/by-email/address@domain.com",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/by-email/address@domain.com');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/clients/by-email/address@domain.com")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/batch/by-phone/{phoneNumber}:
    get:
      summary: Batch fetch profiles by phone number
      description: |2
         Returns a detailed list of profiles associated with the provided phone number. The number saved in the profile must exactly match the number from the request. If no profiles match the criteria, an empty list is returned.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_BY_IDENTIFIER_CLIENT_READ`

        **User role permission required:** `client_info: read`
      operationId: FindClientsByPhone
      parameters:
        - name: phoneNumber
          in: path
          description: |
            The phone number to search for in profiles. Must be an exact match. The value must be URL-encoded.

            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
          required: true
          schema:
            type: string
            example: 12065550100
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: Returns an array of profile details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetailsArray-apiv4"
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                path: /clients/by-phone/+12065550100/batch
                message: Api-Version header is required
                error: Bad Request
                timestamp: 2018-06-07T09:33:59.183Z
                status: 400
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          $ref: "#/components/responses/api-service-404-pii"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile management
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/FindClientsByPhone
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/batch/by-phone/12065550100 \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/clients/batch/by-phone/12065550100", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/v4/clients/batch/by-phone/12065550100");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/batch/by-phone/12065550100",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/batch/by-phone/12065550100');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/clients/batch/by-phone/12065550100")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{identifierType}/{identifierValue}/linked-devices:
    post:
      summary: Link a device by other parameters
      description: |2
         Assign a device to a profile UUID. A profile may have many devices assigned.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_BY_IDENTIFY_DEVICE_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: LinkAClientDeviceByClientUuid
      parameters:
        - name: identifierType
          in: path
          required: true
          description: The profile identifier to use for the request
          schema:
            type: string
            enum:
              - by-customId
              - by-uuid
        - $ref: "#/components/parameters/api-service-pathIdentifierValue-apiv4"
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4"
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T12:34:02.222Z
                path: /clients/by-uuid/779465fc-a0c5-41e5-9be2-51c00b2588b4/linked-devices
                message: Some fields did not pass validation
                errors:
                  - code: 12301
                    field: deviceId
                    message: "12301"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Profile not found
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile devices
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientUuid
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}"

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

            conn.request("POST", "/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "registrationId": "string",
              "type": "android",
              "bluetoothAddress": "string",
              "macAddress": "string",
              "manufacturer": "string",
              "model": "string",
              "osVersion": "string",
              "product": "a51ul_htc_europe",
              "screenHeight": 0,
              "screenWidth": 0,
              "publicKey": "string"
            });

            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/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              deviceId: 'string',
              registrationId: 'string',
              type: 'android',
              bluetoothAddress: 'string',
              macAddress: 'string',
              manufacturer: 'string',
              model: 'string',
              osVersion: 'string',
              product: 'a51ul_htc_europe',
              screenHeight: 0,
              screenWidth: 0,
              publicKey: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}');

            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/v4/clients/%7BidentifierType%7D/%7BidentifierValue%7D/linked-devices")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}")
              .asString();
  /v4/my-account/linked-devices:
    post:
      summary: Link a device to currently logged in profile
      description: |2
         Assign a device to the profile that is currently logged in. A Profile may have many devices assigned.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: LinkAClientDeviceToCurrentlyLoggedInClient
      parameters:
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-LinkaClientdeviceRequest-apiv4"
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile devices
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceToCurrentlyLoggedInClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/my-account/linked-devices \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}"

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

            conn.request("POST", "/v4/my-account/linked-devices", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "registrationId": "string",
              "type": "android",
              "bluetoothAddress": "string",
              "macAddress": "string",
              "manufacturer": "string",
              "model": "string",
              "osVersion": "string",
              "product": "a51ul_htc_europe",
              "screenHeight": 0,
              "screenWidth": 0,
              "publicKey": "string"
            });

            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/v4/my-account/linked-devices");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/my-account/linked-devices",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              deviceId: 'string',
              registrationId: 'string',
              type: 'android',
              bluetoothAddress: 'string',
              macAddress: 'string',
              manufacturer: 'string',
              model: 'string',
              osVersion: 'string',
              product: 'a51ul_htc_europe',
              screenHeight: 0,
              screenWidth: 0,
              publicKey: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/my-account/linked-devices');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}');

            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/v4/my-account/linked-devices")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}")
              .asString();
  /v4/my-account/personal-information:
    get:
      tags:
        - Profile account management
      summary: Get Profile's own data
      description: |
        A Profile can retrieve its details from the database.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, ANONYMOUS_CLIENT_CONDITIONAL
      operationId: getAccountDataGET
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
      responses:
        "200":
          description: Profile information
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/getAccountDataGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/my-account/personal-information \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Api-Version': "SOME_STRING_VALUE",
                'Content-Type': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/my-account/personal-information", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/v4/my-account/personal-information");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/my-account/personal-information",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Content-Type": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/my-account/personal-information');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Api-Version' => 'SOME_STRING_VALUE',
              'Content-Type' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/my-account/personal-information")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Profile account management
      summary: Update Profile's own data
      description: |
        A Profile can update its own details.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: updateAccountDataUsingPOST
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ClientChangeset-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T13:08:16.235Z
                path: /my-account/personal-information
                message: Some fields did not pass validation
                errors:
                  - code: 120
                    field: avatarUrl
                    message: "120"
                    rejectedValue: "548869"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/updateAccountDataUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/my-account/personal-information \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"address":"string","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"avatarUrl":"string","birthDate":"1987-10-24","city":"string","company":"string","countryCode":"PL","customId":"string","displayName":"string","email":"string","firstName":"string","lastName":"string","phone":"+48111222333","province":"string","sex":"FEMALE","zipCode":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"address\":\"string\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"city\":\"string\",\"company\":\"string\",\"countryCode\":\"PL\",\"customId\":\"string\",\"displayName\":\"string\",\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"phone\":\"+48111222333\",\"province\":\"string\",\"sex\":\"FEMALE\",\"zipCode\":\"string\"}"

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

            conn.request("POST", "/v4/my-account/personal-information", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "address": "string",
              "agreements": {
                "email": false,
                "sms": false,
                "push": false,
                "webPush": false,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "avatarUrl": "string",
              "birthDate": "1987-10-24",
              "city": "string",
              "company": "string",
              "countryCode": "PL",
              "customId": "string",
              "displayName": "string",
              "email": "string",
              "firstName": "string",
              "lastName": "string",
              "phone": "+48111222333",
              "province": "string",
              "sex": "FEMALE",
              "zipCode": "string"
            });

            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/v4/my-account/personal-information");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/my-account/personal-information",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              address: 'string',
              agreements: {
                email: false,
                sms: false,
                push: false,
                webPush: false,
                bluetooth: false,
                rfid: false,
                wifi: false
              },
              attributes: {property1: null, property2: null},
              avatarUrl: 'string',
              birthDate: '1987-10-24',
              city: 'string',
              company: 'string',
              countryCode: 'PL',
              customId: 'string',
              displayName: 'string',
              email: 'string',
              firstName: 'string',
              lastName: 'string',
              phone: '+48111222333',
              province: 'string',
              sex: 'FEMALE',
              zipCode: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/my-account/personal-information');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"address":"string","agreements":{"email":false,"sms":false,"push":false,"webPush":false,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"avatarUrl":"string","birthDate":"1987-10-24","city":"string","company":"string","countryCode":"PL","customId":"string","displayName":"string","email":"string","firstName":"string","lastName":"string","phone":"+48111222333","province":"string","sex":"FEMALE","zipCode":"string"}');

            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/v4/my-account/personal-information")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"address\":\"string\",\"agreements\":{\"email\":false,\"sms\":false,\"push\":false,\"webPush\":false,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"avatarUrl\":\"string\",\"birthDate\":\"1987-10-24\",\"city\":\"string\",\"company\":\"string\",\"countryCode\":\"PL\",\"customId\":\"string\",\"displayName\":\"string\",\"email\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"phone\":\"+48111222333\",\"province\":\"string\",\"sex\":\"FEMALE\",\"zipCode\":\"string\"}")
              .asString();
  /v4/my-account/phone-update/request:
    post:
      summary: Request profile phone number change
      description: |
        A Profile can request a phone number update. The confirmation code is sent in a text message.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: RequestClientPhoneNumberChange
      parameters:
        - $ref: "#/components/parameters/api-service-acceptHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              required:
                - phone
              type: object
              properties:
                phone:
                  type: string
                  description: |
                    Current phone number of the profile. 

                    Must match the pattern (ECMA flavor): `/(^\+[0-9 \-()/]{6,19}$)|(^[0-9 \-()/]{6,20}$)/`
                  example: "+48111222333"
        required: true
      responses:
        "202":
          description: Request accepted'
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile account management
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/RequestClientPhoneNumberChange
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/my-account/phone-update/request \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"phone":"+48111222333"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"phone\":\"+48111222333\"}"

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

            conn.request("POST", "/v4/my-account/phone-update/request", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "phone": "+48111222333"
            });

            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/v4/my-account/phone-update/request");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/my-account/phone-update/request",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "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({phone: '+48111222333'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/my-account/phone-update/request');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"phone":"+48111222333"}');

            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/v4/my-account/phone-update/request")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"phone\":\"+48111222333\"}")
              .asString();
  /v4/my-account/phone-update/confirmation:
    post:
      summary: Confirm profile phone number change
      description: |
        Use a code to confirm the phone number change and provide the new number.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: ConfirmClientPhoneNumberChange
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              required:
                - phone
                - confirmationCode
              type: object
              properties:
                phone:
                  type: string
                  description: |
                    New phone number

                    Must match the pattern (ECMA flavor): `/(^\+[0-9 \-()/]{6,19}$)|(^[0-9 \-()/]{6,20}$)/`

                    **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
                  example: "+48111222333"
                confirmationCode:
                  description: Confirmation code received by text message
                  type: string
                  example: 73AC1
                deviceId:
                  $ref: "#/components/schemas/api-service-inBodyClientDeviceId-apiv4"
                smsAgreement:
                  type: boolean
                  description: Permission to receive marketing information by SMS
        required: true
      responses:
        "202":
          description: Request accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Profile account management
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/ConfirmClientPhoneNumberChange
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/my-account/phone-update/confirmation \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"phone":"+48111222333","confirmationCode":"73AC1","deviceId":"string","smsAgreement":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"phone\":\"+48111222333\",\"confirmationCode\":\"73AC1\",\"deviceId\":\"string\",\"smsAgreement\":true}"

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

            conn.request("POST", "/v4/my-account/phone-update/confirmation", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "phone": "+48111222333",
              "confirmationCode": "73AC1",
              "deviceId": "string",
              "smsAgreement": true
            });

            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/v4/my-account/phone-update/confirmation");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/my-account/phone-update/confirmation",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              phone: '+48111222333',
              confirmationCode: '73AC1',
              deviceId: 'string',
              smsAgreement: true
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/my-account/phone-update/confirmation');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"phone":"+48111222333","confirmationCode":"73AC1","deviceId":"string","smsAgreement":true}');

            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/v4/my-account/phone-update/confirmation")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"phone\":\"+48111222333\",\"confirmationCode\":\"73AC1\",\"deviceId\":\"string\",\"smsAgreement\":true}")
              .asString();
  /v4/tags:
    post:
      tags:
        - Tags
      summary: Create a tag
      description: |
        Create a new tag that can be assigned to profiles. If you try to create a tag that already exists, the response is the existing tag.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `API_TAGS_CREATE`

        **User role permission required:** `client_tags: create`
      operationId: createTagUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-TagCreate-apiv4"
      responses:
        "200":
          description: Tag created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-TagResponse-apiv4"
        "400":
          description: Invalid or incomplete data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T11:02:25.939Z
                path: /tags
                message: Some fields did not pass validation
                errors:
                  - code: 16213
                    field: name
                    message: Scripts are not allowed
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/createTagUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/tags \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"nice tag","color":"#0768ff"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"nice tag\",\"color\":\"#0768ff\"}"

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

            conn.request("POST", "/v4/tags", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "nice tag",
              "color": "#0768ff"
            });

            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/v4/tags");
            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": "/v4/tags",
              "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({name: 'nice tag', color: '#0768ff'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"name":"nice tag","color":"#0768ff"}');

            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/v4/tags")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"nice tag\",\"color\":\"#0768ff\"}")
              .asString();
  /v4/tags/{tagID}:
    put:
      tags:
        - Tags
      summary: Update a tag
      description: |
        Update a tag. This method currently only allows modifying the `color` field.

        If the tag has been already deleted, the response is a 404 error.

        **Important**: This method doesn't update global tags (not related to any workspace). If you try to update a global tag, the response is a 404 error.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `API_TAGS_CREATE`

        **User role permission required:** `client_tags: create`
      operationId: updateTagPUT
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-TagUpdate-apiv4"
      parameters:
        - $ref: "#/components/parameters/api-service-pathTagId-apiv4"
      responses:
        "200":
          description: Tag updated
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-TagResponse-apiv4"
        "400":
          description: Invalid or incomplete data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Tag doesn't exist or it is a global tag (not related to any workspace).
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/updateTagPUT
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/v4/tags/645 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"color":"#0768ff"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"color\":\"#0768ff\"}"

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

            conn.request("PUT", "/v4/tags/645", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "color": "#0768ff"
            });

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

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

            xhr.open("PUT", "https://api.synerise.com/v4/tags/645");
            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": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/tags/645",
              "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({color: '#0768ff'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/tags/645');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"color":"#0768ff"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/v4/tags/645")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"color\":\"#0768ff\"}")
              .asString();
    delete:
      tags:
        - Tags
      summary: Remove a tag
      description: |
        Remove a tag definition from the workspace.

        If the tag has been already deleted, the response is a 404 error.

        **Important**: This method does not remove global tag (not related to any workspace). In this case, the response is a 404 error.

        **Note**: After removing a tag definition, the tag is still cached for a while. In that time, it is still possible for a while to remove or add this tag in profiles.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `API_TAGS_CREATE`

        **User role permission required:** `client_tags: create`
      operationId: deleteTagDELETE
      parameters:
        - $ref: "#/components/parameters/api-service-pathTagId-apiv4"
      responses:
        "202":
          description: Tag removed
        "400":
          description: Invalid or incomplete data
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Tag doesn't exist, was already deleted, or is a global tag (not related to any workspace).
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/deleteTagDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/tags/645 \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/v4/tags/645", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("DELETE", "https://api.synerise.com/v4/tags/645");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/tags/645",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/tags/645');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/tags/645")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{clientId}/tags:
    get:
      tags:
        - Tags
      summary: Get profile tags
      description: |
        Retrieve a list of tags assigned to a profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `API_TAGS_READ`

        **User role permission required:** `client_tags: read`
      operationId: getClientTagsUsingGET
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-Tag-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/getClientTagsUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/clients/434428563/tags \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/v4/clients/434428563/tags", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/v4/clients/434428563/tags");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/434428563/tags",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/434428563/tags');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/clients/434428563/tags")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/clients/{clientId}/tags/{tagID}:
    post:
      tags:
        - Tags
      summary: Assign tag to profile
      description: |
        Assign a tag to a profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `API_ASSIGN_TAGS_EXECUTE`

        **User role permission required:** `client_tags: execute`
      operationId: assignTagPOST
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-pathTagId-apiv4"
      responses:
        "200":
          description: Tag assigned
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-TagAssociation-apiv4"
        "400":
          description: Profile not found or data malformed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Tag not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/assignTagPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/clients/434428563/tags/645
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("POST", "/v4/clients/434428563/tags/645")

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            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/v4/clients/434428563/tags/645");

            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": "/v4/clients/434428563/tags/645",
              "headers": {}
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/434428563/tags/645');
            $request->setMethod(HTTP_METH_POST);

            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/v4/clients/434428563/tags/645")
              .asString();
    delete:
      tags:
        - Tags
      summary: Remove tag from profile
      operationId: removeClientTagDELETE
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-pathTagId-apiv4"
      responses:
        "202":
          description: Tag removed
        "400":
          description: Profile not found or data malformed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "404":
          description: Tag not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Tags/operation/removeClientTagDELETE
      description: |
        

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `API_ASSIGN_TAGS_EXECUTE`

        **User role permission required:** `client_tags: execute`
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/v4/clients/434428563/tags/645
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("DELETE", "/v4/clients/434428563/tags/645")

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("DELETE", "https://api.synerise.com/v4/clients/434428563/tags/645");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/clients/434428563/tags/645",
              "headers": {}
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/clients/434428563/tags/645');
            $request->setMethod(HTTP_METH_DELETE);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/v4/clients/434428563/tags/645")
              .asString();
  /v4/events/by-client/{clientId}:
    get:
      deprecated: true
      summary: Get Profile events as Workspace
      description: |
        **This endpoint is deprecated. Use [/activities-api/events/by/{identifierType}](https://developers.synerise.com/DataManagement/DataManagement.html#operation/getEventsByIdentifier) instead.**  

        Retrieve a list of events saved in a Profile.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `API_LISTING_BY_CLIENT_EVENTS_READ`

        **User role permission required:** `client_activities: read`
      operationId: GetClientEvents
      parameters:
        - $ref: "#/components/parameters/api-service-pathClientId-apiv4"
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
        - $ref: "#/components/parameters/api-service-queryDateFrom-apiv4"
        - $ref: "#/components/parameters/api-service-queryDateTo-apiv4"
        - $ref: "#/components/parameters/api-service-queryAction-apiv4"
        - $ref: "#/components/parameters/api-service-queryEventsLimit-apiv4"
      responses:
        "200":
          description: A list of events
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-GetClientevents-HTTP200-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/GetClientEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/by-client/434428563');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'time[from]' => 'SOME_STRING_VALUE',
              'time[to]' => 'SOME_STRING_VALUE',
              'action' => 'transaction.charge',
              'limit' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/events/by-client/434428563?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/events:
    get:
      deprecated: true
      summary: Get Profile's own events
      description: |
        **This endpoint is deprecated. Use [/activities-api/events](https://developers.synerise.com/DataManagement/DataManagement.html#operation/getEvents) instead.**  

        A Profile can retrieve a list of its own events saved in the database.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: GetClientOwnEvents
      parameters:
        - $ref: "#/components/parameters/api-service-contentTypeHeader-apiv4"
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
        - $ref: "#/components/parameters/api-service-queryDateFrom-apiv4"
        - $ref: "#/components/parameters/api-service-queryDateTo-apiv4"
        - $ref: "#/components/parameters/api-service-queryAction-apiv4"
        - $ref: "#/components/parameters/api-service-queryEventsLimit-apiv4"
      responses:
        "200":
          description: A list of events
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/api-service-GetClientevents-HTTP200-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:50:43.947+00:00
                status: 500
                error: Internal Server Error
                message: Duration between time[from] and time[to] cannot be greater than 7 days
                path: /events/by-client/525446574
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/GetClientOwnEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE' \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'Content-Type: SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Content-Type': "SOME_STRING_VALUE",
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Content-Type", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE",
              "headers": {
                "Content-Type": "SOME_STRING_VALUE",
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'time[from]' => 'SOME_STRING_VALUE',
              'time[to]' => 'SOME_STRING_VALUE',
              'action' => 'transaction.charge',
              'limit' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Content-Type' => 'SOME_STRING_VALUE',
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/events?time%5Bfrom%5D=SOME_STRING_VALUE&time%5Bto%5D=SOME_STRING_VALUE&action=transaction.charge&limit=SOME_INTEGER_VALUE")
              .header("Content-Type", "SOME_STRING_VALUE")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/events/application-started:
    post:
      summary: Application started
      description: |
        Send a 'client application started' event.

        This endpoint is available from API version 4.1.2.

        When you send an event to this endpoint, the `action` field is set to `client.applicationStarted` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_APPLICATION_STARTED_EVENTS_CREATE`
      operationId: ApplicationStarted
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ApplicationstartedRequest-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                timestamp: 2018-06-07T09:53:56.999+00:00
                status: 500
                error: Internal Server Error
                message: Error occurred during event publication
                path: /events/application-started
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ApplicationStarted
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/application-started \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"applicationName":"string","version":"string"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"applicationName\":\"string\",\"version\":\"string\"}}"

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

            conn.request("POST", "/v4/events/application-started", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "applicationName": "string",
                "version": "string"
              }
            });

            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/v4/events/application-started");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/application-started",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {applicationName: 'string', version: 'string'}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/application-started');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"applicationName":"string","version":"string"}}');

            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/v4/events/application-started")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"applicationName\":\"string\",\"version\":\"string\"}}")
              .asString();
  /v4/events/registered:
    post:
      summary: Profile account registered
      description: |
        Send a 'profile account registered' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.register` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_REGISTERED_EVENTS_CREATE`
      operationId: ClientRegistered
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientRegistered
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/registered \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/registered", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/registered");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/registered",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/registered');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/registered")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/logged-in:
    post:
      summary: Profile logged in
      description: |
        Send a 'profile logged in' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.login` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_LOGGED_IN_EVENTS_CREATE`
      operationId: ClientLoggedIn
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientLoggedIn
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/logged-in \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/logged-in", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/logged-in");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/logged-in",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/logged-in');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/logged-in")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/logged-out:
    post:
      summary: Profile logged out
      description: |
        Send a 'profile logged out' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.logout` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_LOGGED_OUT_EVENTS_CREATE`
      operationId: ClientLoggedOut
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientLoggedOut
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/logged-out \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/logged-out", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/logged-out");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/logged-out",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/logged-out');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/logged-out")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/added-to-cart:
    post:
      summary: Item added to cart
      description: |
        Send an 'item added to cart' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `product.addToCart` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_ADDED_TO_CART_EVENTS_CREATE`
      operationId: ClientAddedProductToCart
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ClientCartEventRequest-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          description: "Bad request: input data missing or malformed"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
              example:
                error: Bad Request
                status: 400
                timestamp: 2018-06-07T09:55:20.563Z
                message: Some fields did not pass validation
                path: /events/added-to-cart
                errors:
                  - path: label
                    message: cannot be empty
                    rejectedValue: ""
                  - path: label
                    message: length must be between 1 and 64
                    rejectedValue: ""
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientAddedProductToCart
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/added-to-cart \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"sku":"189784563455","name":"Soft drink","category":"Beverages","categories":["string"],"offline":true,"source":"MOBILE","regularUnitPrice":{"amount":0,"currency":"USD"},"discountedUnitPrice":{"amount":0,"currency":"USD"},"finalUnitPrice":{"amount":3.25,"currency":"USD"},"ItemUrlAddress":"string","producer":"string","quantity":0}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}"

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

            conn.request("POST", "/v4/events/added-to-cart", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "sku": "189784563455",
                "name": "Soft drink",
                "category": "Beverages",
                "categories": [
                  "string"
                ],
                "offline": true,
                "source": "MOBILE",
                "regularUnitPrice": {
                  "amount": 0,
                  "currency": "USD"
                },
                "discountedUnitPrice": {
                  "amount": 0,
                  "currency": "USD"
                },
                "finalUnitPrice": {
                  "amount": 3.25,
                  "currency": "USD"
                },
                "ItemUrlAddress": "string",
                "producer": "string",
                "quantity": 0
              }
            });

            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/v4/events/added-to-cart");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/added-to-cart",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                sku: '189784563455',
                name: 'Soft drink',
                category: 'Beverages',
                categories: ['string'],
                offline: true,
                source: 'MOBILE',
                regularUnitPrice: {amount: 0, currency: 'USD'},
                discountedUnitPrice: {amount: 0, currency: 'USD'},
                finalUnitPrice: {amount: 3.25, currency: 'USD'},
                ItemUrlAddress: 'string',
                producer: 'string',
                quantity: 0
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/added-to-cart');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"sku":"189784563455","name":"Soft drink","category":"Beverages","categories":["string"],"offline":true,"source":"MOBILE","regularUnitPrice":{"amount":0,"currency":"USD"},"discountedUnitPrice":{"amount":0,"currency":"USD"},"finalUnitPrice":{"amount":3.25,"currency":"USD"},"ItemUrlAddress":"string","producer":"string","quantity":0}}');

            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/v4/events/added-to-cart")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}")
              .asString();
  /v4/events/removed-from-cart:
    post:
      summary: Item removed from cart
      description: |
        Send an 'item removed from cart' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `product.removeFromCart` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_REMOVED_FROM_CART_EVENTS_CREATE`
      operationId: ClientRemovedProductFromCart
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ClientCartEventRequest-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientRemovedProductFromCart
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/removed-from-cart \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"sku":"189784563455","name":"Soft drink","category":"Beverages","categories":["string"],"offline":true,"source":"MOBILE","regularUnitPrice":{"amount":0,"currency":"USD"},"discountedUnitPrice":{"amount":0,"currency":"USD"},"finalUnitPrice":{"amount":3.25,"currency":"USD"},"ItemUrlAddress":"string","producer":"string","quantity":0}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}"

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

            conn.request("POST", "/v4/events/removed-from-cart", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "sku": "189784563455",
                "name": "Soft drink",
                "category": "Beverages",
                "categories": [
                  "string"
                ],
                "offline": true,
                "source": "MOBILE",
                "regularUnitPrice": {
                  "amount": 0,
                  "currency": "USD"
                },
                "discountedUnitPrice": {
                  "amount": 0,
                  "currency": "USD"
                },
                "finalUnitPrice": {
                  "amount": 3.25,
                  "currency": "USD"
                },
                "ItemUrlAddress": "string",
                "producer": "string",
                "quantity": 0
              }
            });

            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/v4/events/removed-from-cart");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/removed-from-cart",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                sku: '189784563455',
                name: 'Soft drink',
                category: 'Beverages',
                categories: ['string'],
                offline: true,
                source: 'MOBILE',
                regularUnitPrice: {amount: 0, currency: 'USD'},
                discountedUnitPrice: {amount: 0, currency: 'USD'},
                finalUnitPrice: {amount: 3.25, currency: 'USD'},
                ItemUrlAddress: 'string',
                producer: 'string',
                quantity: 0
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/removed-from-cart');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"sku":"189784563455","name":"Soft drink","category":"Beverages","categories":["string"],"offline":true,"source":"MOBILE","regularUnitPrice":{"amount":0,"currency":"USD"},"discountedUnitPrice":{"amount":0,"currency":"USD"},"finalUnitPrice":{"amount":3.25,"currency":"USD"},"ItemUrlAddress":"string","producer":"string","quantity":0}}');

            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/v4/events/removed-from-cart")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"sku\":\"189784563455\",\"name\":\"Soft drink\",\"category\":\"Beverages\",\"categories\":[\"string\"],\"offline\":true,\"source\":\"MOBILE\",\"regularUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"discountedUnitPrice\":{\"amount\":0,\"currency\":\"USD\"},\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"ItemUrlAddress\":\"string\",\"producer\":\"string\",\"quantity\":0}}")
              .asString();
  /v4/events/added-to-favorites:
    post:
      summary: Product added to favorites
      description: |
        Send an 'item added to favorites' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `product.addToFavorite` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_ADDED_TO_FAVORITES_EVENTS_CREATE`
      operationId: ClientAddedProductToFavorites
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientAddedProductToFavorites
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/added-to-favorites \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/added-to-favorites", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/added-to-favorites");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/added-to-favorites",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/added-to-favorites');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/added-to-favorites")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/product-view:
    post:
      summary: Item viewed
      description: |
        Send an 'item viewed' event.

        When you send an event to this endpoint, the `action` field is set to `product.view` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_PRODUCT_VIEW_EVENTS_CREATE`
      operationId: ClientViewedProduct
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      type: object
                      additionalProperties: true
                      description: |
                        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                          <span style="color:red"><strong>WARNING:</strong></span>
                          - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                          - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                          <code>modifiedBy</code><br>
                          <code>apiKey</code><br>
                          <code>eventUUID</code><br>
                          <code>ip</code><br>
                          <code>time</code><br>
                          <code>businessProfileId</code>
                      properties:
                        productId:
                          $ref: "#/components/schemas/api-service-ItemSku-apiv4"
                        name:
                          $ref: "#/components/schemas/api-service-ItemName-apiv4"
                        fromRecommendation:
                          $ref: "#/components/schemas/api-service-FromRecommendation-apiv4"
                        source:
                          $ref: "#/components/schemas/api-service-eventSource-apiv4"
                        category:
                          $ref: "#/components/schemas/api-service-ItemCategory-apiv4"
                        url:
                          $ref: "#/components/schemas/api-service-ItemUrlAddress-apiv4"
                        campaignHash:
                          $ref: "#/components/schemas/api-service-CampaignHash-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientViewedProduct
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/product-view \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","fromRecommendation":true,"source":"MOBILE","category":"Beverages","url":"string","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"fromRecommendation\":true,\"source\":\"MOBILE\",\"category\":\"Beverages\",\"url\":\"string\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\"}}"

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

            conn.request("POST", "/v4/events/product-view", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "productId": "189784563455",
                "name": "Soft drink",
                "fromRecommendation": true,
                "source": "MOBILE",
                "category": "Beverages",
                "url": "string",
                "campaignHash": "21e0d4b0-bd4e-497b-817b-4fr660284918"
              }
            });

            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/v4/events/product-view");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/product-view",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                productId: '189784563455',
                name: 'Soft drink',
                fromRecommendation: true,
                source: 'MOBILE',
                category: 'Beverages',
                url: 'string',
                campaignHash: '21e0d4b0-bd4e-497b-817b-4fr660284918'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/product-view');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","fromRecommendation":true,"source":"MOBILE","category":"Beverages","url":"string","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918"}}');

            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/v4/events/product-view")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"fromRecommendation\":true,\"source\":\"MOBILE\",\"category\":\"Beverages\",\"url\":\"string\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\"}}")
              .asString();
  /v4/events/assigned-to-company:
    post:
      summary: Profile assigned to company
      description: |
        Send a 'profile assigned to company' event.

        When you send an event to this endpoint, the `action` field is set to `client.assignToCompany` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_ASSIGNED_TO_COMPANY_EVENTS_CREATE`

        **User role permission required:** `client_activities: create`
      operationId: ClientAssignedToCompany
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  required:
                    - params
                  properties:
                    params:
                      type: object
                      additionalProperties: true
                      description: |
                        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                          <span style="color:red"><strong>WARNING:</strong></span>
                          - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                          - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                          <code>modifiedBy</code><br>
                          <code>apiKey</code><br>
                          <code>eventUUID</code><br>
                          <code>ip</code><br>
                          <code>time</code><br>
                          <code>businessProfileId</code>
                      properties:
                        companyId:
                          type: number
                          description: Company ID
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientAssignedToCompany
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/assigned-to-company \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"companyId":0}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"companyId\":0}}"

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

            conn.request("POST", "/v4/events/assigned-to-company", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "companyId": 0
              }
            });

            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/v4/events/assigned-to-company");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/assigned-to-company",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {companyId: 0}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/assigned-to-company');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"companyId":0}}');

            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/v4/events/assigned-to-company")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"companyId\":0}}")
              .asString();
  /v4/events/appeared-in-location:
    post:
      summary: Profile logged location
      description: |
        Send an event when a profile submits its location. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `client.location` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_APPEARED_IN_LOCATION_EVENTS_CREATE`
      operationId: ClientAppearedInLocation
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      type: object
                      additionalProperties: true
                      description: |
                        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                          <span style="color:red"><strong>WARNING:</strong></span>
                          - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                          - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                          <code>modifiedBy</code><br>
                          <code>apiKey</code><br>
                          <code>eventUUID</code><br>
                          <code>ip</code><br>
                          <code>time</code><br>
                          <code>businessProfileId</code>
                      required:
                        - lat
                        - lon
                      properties:
                        lat:
                          type: number
                          description: Latitude
                          example: 50.021102
                        lon:
                          type: number
                          description: Longitude
                          example: 19.886218
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientAppearedInLocation
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/appeared-in-location \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"lat":50.021102,"lon":19.886218}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"lat\":50.021102,\"lon\":19.886218}}"

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

            conn.request("POST", "/v4/events/appeared-in-location", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "lat": 50.021102,
                "lon": 19.886218
              }
            });

            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/v4/events/appeared-in-location");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/appeared-in-location",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {lat: 50.021102, lon: 19.886218}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/appeared-in-location');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"lat":50.021102,"lon":19.886218}}');

            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/v4/events/appeared-in-location")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"lat\":50.021102,\"lon\":19.886218}}")
              .asString();
  /v4/events/push/received:
    post:
      summary: Push notification received
      description: |
        Record a 'push notification was received' event. It is used for push message interaction tracking.

        This endpoint is available from API version 4.1.2.

        When you send an event to this endpoint, the `action` field is set to `push.receiveInBackground` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_PUSH_RECIVED_EVENTS_CREATE`
      operationId: ClientReceivedPushNotification
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientReceivedPushNotification
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/push/received \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/push/received", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/push/received");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/push/received",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/push/received');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/push/received")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/push/viewed:
    post:
      summary: Push notification viewed
      description: |
        Record a 'push notification was viewed' event. It is used for push message interaction tracking.

        When you send an event to this endpoint, the `action` field is set to `push.view` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_PUSH_VIEWED_EVENTS_CREATE`
      operationId: ClientViewedPushNotification
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientViewedPushNotification
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/push/viewed \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/push/viewed", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/push/viewed");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/push/viewed",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/push/viewed');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/push/viewed")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/push/clicked:
    post:
      summary: Push notification clicked
      description: |
        Send a 'Push notification was clicked' event. It's used for push message interaction tracking.

        When you send an event to this endpoint, the `action` field is set to `push.click` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_PUSH_CLICKED_EVENTS_CREATE`
      operationId: ClientClickedPushNotification
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientClickedPushNotification
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/push/clicked \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/push/clicked", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/push/clicked");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/push/clicked",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/push/clicked');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/push/clicked")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/push/cancelled:
    post:
      summary: Push notifications cancelled
      description: |
        Send a 'push notifications cancelled' event. It's used for push message interaction tracking.

        When you send an event to this endpoint, the `action` field is set to `push.cancel` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_PUSH_CANCELLED_EVENTS_CREATE`
      operationId: ClientCancelledPushNotifications
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientCancelledPushNotifications
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/push/cancelled \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/push/cancelled", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/push/cancelled");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/push/cancelled",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/push/cancelled');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/push/cancelled")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/cancelled-transaction:
    post:
      summary: Transaction cancelled
      description: |
        Send a 'transaction cancelled' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `transaction.cancel` by the backend.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `API_CANCELLED_TRANSACTION_EVENTS_CREATE`
      operationId: ClientCancelledTransaction
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      type: object
                      description: |
                        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                          <span style="color:red"><strong>WARNING:</strong></span>
                          - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
                          - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                          <code>modifiedBy</code><br>
                          <code>apiKey</code><br>
                          <code>eventUUID</code><br>
                          <code>ip</code><br>
                          <code>time</code><br>
                          <code>businessProfileId</code>
                      additionalProperties: true
                      properties:
                        orderId:
                          $ref: "#/components/schemas/api-service-OrderId-apiv4"
                        orderStatus:
                          $ref: "#/components/schemas/api-service-OrderStatus-apiv4"
                        discountAmount:
                          $ref: "#/components/schemas/api-service-DiscountAmount-apiv4"
                        discountPercent:
                          $ref: "#/components/schemas/api-service-DiscountPercent-apiv4"
                        discountCode:
                          $ref: "#/components/schemas/api-service-DiscountCode-apiv4"
                        value:
                          $ref: "#/components/schemas/api-service-Value-apiv4"
                        revenue:
                          $ref: "#/components/schemas/api-service-Revenue-apiv4"
                        products:
                          $ref: "#/components/schemas/api-service-Products-apiv4"
                        source:
                          $ref: "#/components/schemas/api-service-eventSource-apiv4"
                        paymentInfo:
                          $ref: "#/components/schemas/api-service-PaymentInfo-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientCancelledTransaction
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/cancelled-transaction \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","orderStatus":"string","discountAmount":{"amount":0,"currency":"USD"},"discountPercent":0.1,"discountCode":"string","value":{"amount":112.25,"currency":"USD"},"revenue":{"amount":64.25,"currency":"USD"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"source":"MOBILE","paymentInfo":{"method":"CASH"}}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"orderStatus\":\"string\",\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"discountPercent\":0.1,\"discountCode\":\"string\",\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"source\":\"MOBILE\",\"paymentInfo\":{\"method\":\"CASH\"}}}"

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

            conn.request("POST", "/v4/events/cancelled-transaction", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "orderId": "be466362-71e9-4bdd-ad11-bfacead5276b",
                "orderStatus": "string",
                "discountAmount": {
                  "amount": 0,
                  "currency": "USD"
                },
                "discountPercent": 0.1,
                "discountCode": "string",
                "value": {
                  "amount": 112.25,
                  "currency": "USD"
                },
                "revenue": {
                  "amount": 64.25,
                  "currency": "USD"
                },
                "products": [
                  {
                    "finalUnitPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "name": "Soft drink",
                    "sku": "189784563455",
                    "categories": [
                      "string"
                    ],
                    "image": "string",
                    "url": "string",
                    "netUnitPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "tax": 0.1,
                    "quantity": 2.5,
                    "regularPrice": {
                      "amount": 3.25,
                      "currency": "USD"
                    },
                    "discountPrice": {
                      "amount": 15.5,
                      "currency": "USD"
                    },
                    "discountPercent": 0.1,
                    "property1": null,
                    "property2": null
                  }
                ],
                "source": "MOBILE",
                "paymentInfo": {
                  "method": "CASH"
                }
              }
            });

            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/v4/events/cancelled-transaction");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/cancelled-transaction",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                orderId: 'be466362-71e9-4bdd-ad11-bfacead5276b',
                orderStatus: 'string',
                discountAmount: {amount: 0, currency: 'USD'},
                discountPercent: 0.1,
                discountCode: 'string',
                value: {amount: 112.25, currency: 'USD'},
                revenue: {amount: 64.25, currency: 'USD'},
                products: [
                  {
                    finalUnitPrice: {amount: 3.25, currency: 'USD'},
                    name: 'Soft drink',
                    sku: '189784563455',
                    categories: ['string'],
                    image: 'string',
                    url: 'string',
                    netUnitPrice: {amount: 3.25, currency: 'USD'},
                    tax: 0.1,
                    quantity: 2.5,
                    regularPrice: {amount: 3.25, currency: 'USD'},
                    discountPrice: {amount: 15.5, currency: 'USD'},
                    discountPercent: 0.1,
                    property1: null,
                    property2: null
                  }
                ],
                source: 'MOBILE',
                paymentInfo: {method: 'CASH'}
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/cancelled-transaction');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"orderId":"be466362-71e9-4bdd-ad11-bfacead5276b","orderStatus":"string","discountAmount":{"amount":0,"currency":"USD"},"discountPercent":0.1,"discountCode":"string","value":{"amount":112.25,"currency":"USD"},"revenue":{"amount":64.25,"currency":"USD"},"products":[{"finalUnitPrice":{"amount":3.25,"currency":"USD"},"name":"Soft drink","sku":"189784563455","categories":["string"],"image":"string","url":"string","netUnitPrice":{"amount":3.25,"currency":"USD"},"tax":0.1,"quantity":2.5,"regularPrice":{"amount":3.25,"currency":"USD"},"discountPrice":{"amount":15.5,"currency":"USD"},"discountPercent":0.1,"property1":null,"property2":null}],"source":"MOBILE","paymentInfo":{"method":"CASH"}}}');

            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/v4/events/cancelled-transaction")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"orderId\":\"be466362-71e9-4bdd-ad11-bfacead5276b\",\"orderStatus\":\"string\",\"discountAmount\":{\"amount\":0,\"currency\":\"USD\"},\"discountPercent\":0.1,\"discountCode\":\"string\",\"value\":{\"amount\":112.25,\"currency\":\"USD\"},\"revenue\":{\"amount\":64.25,\"currency\":\"USD\"},\"products\":[{\"finalUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"name\":\"Soft drink\",\"sku\":\"189784563455\",\"categories\":[\"string\"],\"image\":\"string\",\"url\":\"string\",\"netUnitPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"tax\":0.1,\"quantity\":2.5,\"regularPrice\":{\"amount\":3.25,\"currency\":\"USD\"},\"discountPrice\":{\"amount\":15.5,\"currency\":\"USD\"},\"discountPercent\":0.1,\"property1\":null,\"property2\":null}],\"source\":\"MOBILE\",\"paymentInfo\":{\"method\":\"CASH\"}}}")
              .asString();
  /v4/events/hit-timer:
    post:
      summary: Timer hit
      description: |
        Send a 'timer' event.


        Timers are used for analytics. For example, if you send a event when a profiles starts doing something and another one when they finish, you can collect data about average activity time. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `client.hitTimer` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_HIT_TIMER_EVENTS_CREATE`
      operationId: ClientHitTimer
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientHitTimer
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/hit-timer \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/hit-timer", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/hit-timer");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/hit-timer",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/hit-timer');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/hit-timer")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/searched:
    post:
      summary: Search requested
      description: |
        Send a 'search requested' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `client.search` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_SEARCHED_EVENTS_CREATE`
      operationId: ClientSearched
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientSearched
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/searched \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/searched", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/searched");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/searched",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/searched');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/searched")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/shared:
    post:
      summary: Content shared
      description: |
        Send a 'content shared' event. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.


        When you send an event to this endpoint, the `action` field is set to `client.shared` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_SHARED_EVENTS_CREATE`
      operationId: ClientShared
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientShared
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/shared \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/shared", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/shared");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/shared",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/shared');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/shared")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/recommendation-seen:
    post:
      summary: Recommendation viewed
      deprecated: true
      description: |
        This endpoint is deprecated. Use the [AI Events](https://developers.synerise.com/DataManagement/DataManagement.html#tag/AI-Events) endpoints instead.

        Send a 'recommendation was viewed' event.


        When you send an event to this endpoint, the `action` field is set to `recommendation.view` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_RECOMENDATION_SEEN_EVENTS_CREATE`
      operationId: RecommendationSeen
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-recommendationEventParams-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/RecommendationSeen
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/recommendation-seen \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","source":"MOBILE","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918","url":"string","category":"Beverages"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}"

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

            conn.request("POST", "/v4/events/recommendation-seen", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "productId": "189784563455",
                "name": "Soft drink",
                "source": "MOBILE",
                "campaignHash": "21e0d4b0-bd4e-497b-817b-4fr660284918",
                "url": "string",
                "category": "Beverages"
              }
            });

            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/v4/events/recommendation-seen");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/recommendation-seen",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                productId: '189784563455',
                name: 'Soft drink',
                source: 'MOBILE',
                campaignHash: '21e0d4b0-bd4e-497b-817b-4fr660284918',
                url: 'string',
                category: 'Beverages'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/recommendation-seen');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","source":"MOBILE","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918","url":"string","category":"Beverages"}}');

            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/v4/events/recommendation-seen")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}")
              .asString();
  /v4/events/recommendation-click:
    post:
      summary: Recommendation clicked
      deprecated: true
      description: |
        Send a 'recommendation clicked' event.
        This endpoint is deprecated. Use the [AI Events](https://developers.synerise.com/DataManagement/DataManagement.html#tag/AI-Events) endpoints instead.


        When you send an event to this endpoint, the `action` field is set to `recommendation.click` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_RECOMMENDATION_CLICK_EVENTS_CREATE`
      operationId: RecommendationClicked
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-recommendationEventParams-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/RecommendationClicked
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/recommendation-click \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","source":"MOBILE","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918","url":"string","category":"Beverages"}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}"

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

            conn.request("POST", "/v4/events/recommendation-click", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {
                "productId": "189784563455",
                "name": "Soft drink",
                "source": "MOBILE",
                "campaignHash": "21e0d4b0-bd4e-497b-817b-4fr660284918",
                "url": "string",
                "category": "Beverages"
              }
            });

            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/v4/events/recommendation-click");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/recommendation-click",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {
                productId: '189784563455',
                name: 'Soft drink',
                source: 'MOBILE',
                campaignHash: '21e0d4b0-bd4e-497b-817b-4fr660284918',
                url: 'string',
                category: 'Beverages'
              }
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/recommendation-click');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{"productId":"189784563455","name":"Soft drink","source":"MOBILE","campaignHash":"21e0d4b0-bd4e-497b-817b-4fr660284918","url":"string","category":"Beverages"}}');

            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/v4/events/recommendation-click")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{\"productId\":\"189784563455\",\"name\":\"Soft drink\",\"source\":\"MOBILE\",\"campaignHash\":\"21e0d4b0-bd4e-497b-817b-4fr660284918\",\"url\":\"string\",\"category\":\"Beverages\"}}")
              .asString();
  /v4/events/visited-screen:
    post:
      summary: Mobile app screen visited
      description: |
        Send a 'screen in a mobile app was visited' event. This can be used for mobile screen usage tracking. <br/><br/>If you don't have a value for a field, omit that field. Do not send null values.

        When you send an event to this endpoint, the `action` field is set to `screen.view` by the backend.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_VISITED_SCREEN_EVENTS_CREATE`
      operationId: ClientVisitedScreen
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  properties:
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/ClientVisitedScreen
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/visited-screen \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/visited-screen", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "params": {}
            });

            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/v4/events/visited-screen");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/visited-screen",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/visited-screen');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","params":{}}');

            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/v4/events/visited-screen")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"params\":{}}")
              .asString();
  /v4/events/custom:
    post:
      summary: Custom event
      description: |
        Send a custom event.

        <span style="color:red"><strong>WARNING:</strong></span> This endpoint doesn't create `product.buy` events from `transaction.charge` events! Use [Create a transaction](#operation/CreateATransaction) or [Batch add or update transactions](#operation/BatchAddOrUpdateTransactions) instead.

        If you don't have a value for a field, omit that field. Do not send null values.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **API key permission required:** `API_CUSTOM_EVENTS_CREATE`

        **User role permission required:** `client_activities: create`
      operationId: CustomEvent
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              allOf:
                - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                - type: object
                  required:
                    - action
                  properties:
                    action:
                      $ref: "#/components/schemas/api-service-EventAction-apiv4"
                    params:
                      $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/CustomEvent
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/custom \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","action":"context.action","params":{}}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"action\":\"context.action\",\"params\":{}}"

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

            conn.request("POST", "/v4/events/custom", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
              "action": "context.action",
              "params": {}
            });

            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/v4/events/custom");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/custom",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
              action: 'context.action',
              params: {}
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/custom');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","action":"context.action","params":{}}');

            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/v4/events/custom")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"action\":\"context.action\",\"params\":{}}")
              .asString();
  /v4/events/batch:
    post:
      summary: Batch send events
      description: |
        Send a batch of events as an array of objects. You can send up to a 1000 events and the size of the request can't be more than 1 MB.

        <span style="color:red"><strong>WARNING:</strong></span> This endpoint doesn't create `product.buy` events from `transaction.charge` events! Use [Create a transaction](#operation/CreateATransaction) or [Batch add or update transactions](#operation/BatchAddOrUpdateTransactions) instead.

        If you don't have a value for a field, omit that field. Do not
        send null values.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_BATCH_EVENTS_CREATE`
      operationId: BatchSendEvents
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        description: <span style="color:red"><strong>IMPORTANT:</strong> In a request, all events must use the same type of profile identifier. For example, if you want to send some events identified by email and others by customId, you must send them in separate batches.<span>
        content:
          application/json:
            schema:
              type: array
              maxItems: 1000
              items:
                anyOf:
                  - title: Custom event
                    allOf:
                      - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                      - type: object
                        required:
                          - action
                          - type
                        properties:
                          type:
                            $ref: "#/components/schemas/api-service-EventType-apiv4"
                          action:
                            $ref: "#/components/schemas/api-service-EventAction-apiv4"
                          params:
                            $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
                  - title: Pre-defined event
                    allOf:
                      - $ref: "#/components/schemas/api-service-EventBase-apiv4"
                      - type: object
                        required:
                          - type
                        properties:
                          type:
                            $ref: "#/components/schemas/api-service-EventType-apiv4"
                          params:
                            $ref: "#/components/schemas/api-service-DefaultParamSource-apiv4"
        required: true
      responses:
        "202":
          description: Accepted
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/BatchSendEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/batch \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '[{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","type":"string","action":"context.action","params":{}}]'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "[{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"type\":\"string\",\"action\":\"context.action\",\"params\":{}}]"

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

            conn.request("POST", "/v4/events/batch", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify([
              {
                "label": "Human-readable label",
                "client": {
                  "customId": "string",
                  "id": 433230297,
                  "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                  "email": "string"
                },
                "time": "2019-02-07T09:53:56.999+00:00",
                "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00",
                "type": "string",
                "action": "context.action",
                "params": {}
              }
            ]);

            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/v4/events/batch");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/batch",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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([
              {
                label: 'Human-readable label',
                client: {
                  customId: 'string',
                  id: 433230297,
                  uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                  email: 'string'
                },
                time: '2019-02-07T09:53:56.999+00:00',
                eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00',
                type: 'string',
                action: 'context.action',
                params: {}
              }
            ]));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/batch');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('[{"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00","type":"string","action":"context.action","params":{}}]');

            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/v4/events/batch")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("[{\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\",\"type\":\"string\",\"action\":\"context.action\",\"params\":{}}]")
              .asString();
  /v4/server/time:
    get:
      summary: Get server time
      description: |
        Get current server time, needed to send events with a correct timestamp.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **Authentication:** Not required
      operationId: getServerTime
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  serverTime:
                    type: string
                    format: date-time
                    description: Current server time in ISO 8601
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/api-service-HTTP400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
      deprecated: false
      security:
        - JWT: []
      tags:
        - Events
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/getServerTime
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/v4/server/time \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = {
                'Api-Version': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v4/server/time", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/v4/server/time");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/v4/server/time",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/server/time');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Api-Version' => 'SOME_STRING_VALUE',
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/v4/server/time")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /v4/events/recommendation-view:
    post:
      security:
        - JWT: []
      tags:
        - Events
      summary: Recommendation viewed
      description: |
        A recommendation was displayed to a customer.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_RECOMMENDATION_VIEW_EVENT_CREATE`
      operationId: publishRecommendationViewEventUsingPOST
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-RecommendationViewEventData-apiv4"
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/publishRecommendationViewEventUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/recommendation-view \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"params":{"items":["string"],"correlationId":"string","campaignId":"string"},"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"params\":{\"items\":[\"string\"],\"correlationId\":\"string\",\"campaignId\":\"string\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}"

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

            conn.request("POST", "/v4/events/recommendation-view", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "params": {
                "items": [
                  "string"
                ],
                "correlationId": "string",
                "campaignId": "string"
              },
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00"
            });

            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/v4/events/recommendation-view");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/recommendation-view",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              params: {items: ['string'], correlationId: 'string', campaignId: 'string'},
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/recommendation-view');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"params":{"items":["string"],"correlationId":"string","campaignId":"string"},"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}');

            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/v4/events/recommendation-view")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"params\":{\"items\":[\"string\"],\"correlationId\":\"string\",\"campaignId\":\"string\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}")
              .asString();
  /v4/events/item-search-click:
    post:
      security:
        - JWT: []
      tags:
        - Events
      summary: Search result clicked
      description: |
        An item in a search result was clicked or tapped.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/docs/settings/tool/tracking_codes" target="_blank" rel="noopener" title="Pass your tracker key in the request header">Web SDK Tracker</a>, <span title="Deprecated">AI API key (legacy)</span>

        **API key permission required:** `API_ITEM_SEARCH_CLICK_EVENT_CREATE`
      operationId: publishItemSearchClickEventUsingPOST
      parameters:
        - $ref: "#/components/parameters/api-service-apiVersionHeader-apiv4"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/api-service-ItemSearchClickEventData-apiv4"
      responses:
        "200":
          description: OK
        "400":
          $ref: "#/components/responses/api-service-400-apiv4"
        "401":
          $ref: "#/components/responses/api-service-401-apiv4"
        "403":
          $ref: "#/components/responses/api-service-403-apiv4"
        "415":
          $ref: "#/components/responses/api-service-415-apiv4"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Events/operation/publishItemSearchClickEventUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/v4/events/item-search-click \
              --header 'Api-Version: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"params":{"item":"string","correlationId":"string","position":0,"searchType":"full-text-search"},"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"params\":{\"item\":\"string\",\"correlationId\":\"string\",\"position\":0,\"searchType\":\"full-text-search\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}"

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

            conn.request("POST", "/v4/events/item-search-click", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "params": {
                "item": "string",
                "correlationId": "string",
                "position": 0,
                "searchType": "full-text-search"
              },
              "label": "Human-readable label",
              "client": {
                "customId": "string",
                "id": 433230297,
                "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
                "email": "string"
              },
              "time": "2019-02-07T09:53:56.999+00:00",
              "eventSalt": "972346context.action2019-02-07T09:53:56.999+00:00"
            });

            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/v4/events/item-search-click");
            xhr.setRequestHeader("Api-Version", "SOME_STRING_VALUE");
            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": "/v4/events/item-search-click",
              "headers": {
                "Api-Version": "SOME_STRING_VALUE",
                "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({
              params: {
                item: 'string',
                correlationId: 'string',
                position: 0,
                searchType: 'full-text-search'
              },
              label: 'Human-readable label',
              client: {
                customId: 'string',
                id: 433230297,
                uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
                email: 'string'
              },
              time: '2019-02-07T09:53:56.999+00:00',
              eventSalt: '972346context.action2019-02-07T09:53:56.999+00:00'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/v4/events/item-search-click');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"params":{"item":"string","correlationId":"string","position":0,"searchType":"full-text-search"},"label":"Human-readable label","client":{"customId":"string","id":433230297,"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string"},"time":"2019-02-07T09:53:56.999+00:00","eventSalt":"972346context.action2019-02-07T09:53:56.999+00:00"}');

            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/v4/events/item-search-click")
              .header("Api-Version", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"params\":{\"item\":\"string\",\"correlationId\":\"string\",\"position\":0,\"searchType\":\"full-text-search\"},\"label\":\"Human-readable label\",\"client\":{\"customId\":\"string\",\"id\":433230297,\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\"},\"time\":\"2019-02-07T09:53:56.999+00:00\",\"eventSalt\":\"972346context.action2019-02-07T09:53:56.999+00:00\"}")
              .asString();
  /crm/v1/clients/{clientId}/contacts:
    get:
      deprecated: true
      tags:
        - Profile management
      summary: Get Profile details
      description: |
        <span style="color:red">This method is deprecated. It will be disabled on August 30, 2026.</span>  

        You can use these methods instead:
          - [GET /v4/clients/{clientId}](#operation/GetClientData)
          - [GET /v4/clients/{identifierType}/{identifierValue}](#operation/FindAClient)

        Retrieve the details of a Profile.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `CRM_DETAILS_CLIENT_READ`

        **User role permission required:** `client_info: read`
      operationId: getClient
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/crm-pathClientId"
      responses:
        "200":
          description: Profile details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/crm-ClientDetails"
        "404":
          $ref: "#/components/responses/crm-404-pii"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/crm/v1/clients/%7BclientId%7D/contacts", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/crm/v1/clients/%7BclientId%7D/contacts",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/crm/v1/clients/%7BclientId%7D/contacts")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /crm/v1/contacts/{clientId}:
    put:
      deprecated: true
      tags:
        - Profile management
      summary: Update Profile
      description: |
        <span style="color:red">This method is deprecated. It will be disabled on August 16, 2026</span>  
        Use one of these endpoints instead:
          - [POST /v4/clients/{clientId}](#operation/UpdateAClient)
          - [POST /v4/clients/by-email/{clientEmail}](#operation/UpdateAClientByEmail)
          - [POST /v4/clients/by-customid/{customId}](#operation/UpdateAClientByCustomId)

        Sending a null value **deletes** an attribute (if it's a custom attribute) or **sets it to null/default value** (if the attribute is Synerise-native)


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `CRM_CLIENT_UPDATE`

        **User role permission required:** `client_management: update`
      operationId: updateClient
      security:
        - JWT: []
      parameters:
        - $ref: "#/components/parameters/crm-pathClientId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/crm-CustomerCommon"
        required: true
      responses:
        "200":
          description: Profile details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/crm-ClientDetails"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/updateClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/crm/v1/contacts/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string","firstname":"string","lastName":"string","custom_identify":"string","company":"string","phone":"string","address":"string","birthdate":"2019-08-24","city":"string","zipCode":"string","province":"string","country_id":"string","countryCode":"PL","avatarUrl":"string","sex":"0","tags":["string"],"additionalProperties":null}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\",\"firstname\":\"string\",\"lastName\":\"string\",\"custom_identify\":\"string\",\"company\":\"string\",\"phone\":\"string\",\"address\":\"string\",\"birthdate\":\"2019-08-24\",\"city\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"country_id\":\"string\",\"countryCode\":\"PL\",\"avatarUrl\":\"string\",\"sex\":\"0\",\"tags\":[\"string\"],\"additionalProperties\":null}"

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

            conn.request("PUT", "/crm/v1/contacts/%7BclientId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "email": "string",
              "firstname": "string",
              "lastName": "string",
              "custom_identify": "string",
              "company": "string",
              "phone": "string",
              "address": "string",
              "birthdate": "2019-08-24",
              "city": "string",
              "zipCode": "string",
              "province": "string",
              "country_id": "string",
              "countryCode": "PL",
              "avatarUrl": "string",
              "sex": "0",
              "tags": [
                "string"
              ],
              "additionalProperties": null
            });

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

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

            xhr.open("PUT", "https://api.synerise.com/crm/v1/contacts/%7BclientId%7D");
            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": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/crm/v1/contacts/%7BclientId%7D",
              "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({
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              email: 'string',
              firstname: 'string',
              lastName: 'string',
              custom_identify: 'string',
              company: 'string',
              phone: 'string',
              address: 'string',
              birthdate: '2019-08-24',
              city: 'string',
              zipCode: 'string',
              province: 'string',
              country_id: 'string',
              countryCode: 'PL',
              avatarUrl: 'string',
              sex: '0',
              tags: ['string'],
              additionalProperties: null
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/crm/v1/contacts/%7BclientId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"uuid":"07243772-008a-42e1-ba37-c3807cebde8f","email":"string","firstname":"string","lastName":"string","custom_identify":"string","company":"string","phone":"string","address":"string","birthdate":"2019-08-24","city":"string","zipCode":"string","province":"string","country_id":"string","countryCode":"PL","avatarUrl":"string","sex":"0","tags":["string"],"additionalProperties":null}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/crm/v1/contacts/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"email\":\"string\",\"firstname\":\"string\",\"lastName\":\"string\",\"custom_identify\":\"string\",\"company\":\"string\",\"phone\":\"string\",\"address\":\"string\",\"birthdate\":\"2019-08-24\",\"city\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"country_id\":\"string\",\"countryCode\":\"PL\",\"avatarUrl\":\"string\",\"sex\":\"0\",\"tags\":[\"string\"],\"additionalProperties\":null}")
              .asString();
  /morph/exports/clients/segmentation:
    post:
      tags:
        - Profile management
      operationId: runProfileExport
      summary: Create and run profile export
      description: |
        Request an export of profiles. The group of profiles to export is selected by pointing to a segmentation. After the export is completed, you can access the data with [GET /exports/clients/{taskId}/data](#operation/getExportedProfileData) or from [https://app.synerise.com/assets/exports](https://app.synerise.com/assets/exports).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `CLIENT_EXPORTER_REPORT_CREATE`

        **User role permission required:** `settings_export: create`
      security:
        - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/morph-NewProfileExport"
      responses:
        "200":
          description: Export task created and queued
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/morph-ExportResponse"
        "400":
          $ref: "#/components/responses/morph-BadRequest"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/runProfileExport
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/morph/exports/clients/segmentation \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","fields":["id","attr1","attr2"],"agreementFilter":"NONE","segmentationHash":"e7cff342-b484-4fcb-aa34-4735122bc9e7","tags":["string"],"expressions":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"aggregates":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"segmentations":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"excludedIds":[0]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"name\":\"string\",\"fields\":[\"id\",\"attr1\",\"attr2\"],\"agreementFilter\":\"NONE\",\"segmentationHash\":\"e7cff342-b484-4fcb-aa34-4735122bc9e7\",\"tags\":[\"string\"],\"expressions\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"aggregates\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"segmentations\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"excludedIds\":[0]}"

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

            conn.request("POST", "/morph/exports/clients/segmentation", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "name": "string",
              "fields": [
                "id",
                "attr1",
                "attr2"
              ],
              "agreementFilter": "NONE",
              "segmentationHash": "e7cff342-b484-4fcb-aa34-4735122bc9e7",
              "tags": [
                "string"
              ],
              "expressions": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "aggregates": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "segmentations": [
                "497f6eca-6276-4993-bfeb-53cbbbba6f08"
              ],
              "excludedIds": [
                0
              ]
            });

            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/morph/exports/clients/segmentation");
            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": "/morph/exports/clients/segmentation",
              "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({
              name: 'string',
              fields: ['id', 'attr1', 'attr2'],
              agreementFilter: 'NONE',
              segmentationHash: 'e7cff342-b484-4fcb-aa34-4735122bc9e7',
              tags: ['string'],
              expressions: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              aggregates: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              segmentations: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
              excludedIds: [0]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/morph/exports/clients/segmentation');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"name":"string","fields":["id","attr1","attr2"],"agreementFilter":"NONE","segmentationHash":"e7cff342-b484-4fcb-aa34-4735122bc9e7","tags":["string"],"expressions":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"aggregates":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"segmentations":["497f6eca-6276-4993-bfeb-53cbbbba6f08"],"excludedIds":[0]}');

            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/morph/exports/clients/segmentation")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"name\":\"string\",\"fields\":[\"id\",\"attr1\",\"attr2\"],\"agreementFilter\":\"NONE\",\"segmentationHash\":\"e7cff342-b484-4fcb-aa34-4735122bc9e7\",\"tags\":[\"string\"],\"expressions\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"aggregates\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"segmentations\":[\"497f6eca-6276-4993-bfeb-53cbbbba6f08\"],\"excludedIds\":[0]}")
              .asString();
  /morph/exports/clients/{taskId}/status:
    get:
      tags:
        - Profile management
      operationId: getProfileExportStatus
      summary: Check profile export status
      description: |
        After creating an export with [POST /exports/clients/segmentation](#operation/runProfileExport), you can check its status. When the export is ready, you can access the data with [GET /exports/clients/{taskId}/data](#operation/getExportedProfileData).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `CLIENT_EXPORTER_REPORT_CREATE`

        **User role permission required:** `settings_export: create`
      security:
        - JWT: []
      parameters:
        - name: taskId
          in: path
          required: true
          description: Unique ID of the export task
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: Status of the export task
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/morph-JobStatus"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getProfileExportStatus
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/status \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/morph/exports/clients/%7BtaskId%7D/status", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/status");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/morph/exports/clients/%7BtaskId%7D/status",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/status');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/status")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /morph/exports/clients/{taskId}/data:
    get:
      tags:
        - Profile management
      operationId: getExportedProfileData
      summary: Get exported profiles
      description: |
        Get exported profiles as a list. To create the export, use [POST /exports/clients/segmentation](#operation/runProfileExport).

        **Tip**: If you want to download a CSV, JSON, or JSONL, find your export in [https://app.synerise.com/assets/exports](https://app.synerise.com/assets/exports).


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `CLIENT_EXPORTER_REPORT_CREATE`

        **User role permission required:** `settings_export: create`
      security:
        - JWT: []
      parameters:
        - name: taskId
          in: path
          required: true
          description: Unique ID of the export task
          schema:
            type: string
            format: uuid
        - name: offset
          in: query
          required: true
          description: The index of the first record to retrieve. Use this to paginate the exported data.
          schema:
            type: number
            minimum: 0
        - name: limit
          in: query
          required: true
          description: The number of records to retrieve. Use this to paginate the exported data.
          schema:
            type: integer
            minimum: 1
      responses:
        "200":
          description: Exported profile data
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  example:
                    id: "1234"
                    exampleAttribute: foo
                    exampleTag: "true"
                    exampleExpression: "23"
                    exampleAggregate: "74"
                    exampleSegmentation: "false"
                  additionalProperties:
                    type: string
                    description: |
                      - Profile attributes are key/value pairs.
                      - Tags are key/value pairs, where the key is the name of the tag and the value is "true" (string) if the tag is assigned to the profile.
                      - Expressions are key/value pairs, where the key is the name of the expression and the value is the result of the expression.
                      - Aggregates are key/value pairs, where the key is the name of the aggregate and the value is the result of the aggregate.
                      - Segmentations are key/value pairs, where the key is the name of the segmentation, and the value is "true" (string) if the profile belongs to the segmentation.
        "400":
          $ref: "#/components/responses/morph-BadRequest"
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getExportedProfileData
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'offset' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/morph/exports/clients/%7BtaskId%7D/data?offset=SOME_NUMBER_VALUE&limit=SOME_INTEGER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /notes-service/by-id/{clientId}:
    get:
      tags:
        - Profile management
      summary: Get all Profile notes
      description: |
        Retrieve all notes associated with a single profile.

        ---

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

        **User role permission required:** `client_notes: read`
      operationId: getAllNotesUsingGET
      parameters:
        - $ref: "#/components/parameters/notes-service-profileId"
      responses:
        "200":
          description: An array of notes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/notes-service-NoteResponse"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getAllNotesUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/notes-service/by-id/%7BclientId%7D", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/notes-service/by-id/%7BclientId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/notes-service/by-id/%7BclientId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/notes-service/by-id/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      tags:
        - Profile management
      summary: Create a note
      description: |
        Create a new note in the profile

        ---

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

        **User role permission required:** `client_notes: create`
      operationId: createNoteUsingPOST
      parameters:
        - $ref: "#/components/parameters/notes-service-profileId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/notes-service-NoteRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/notes-service-NoteResponse"
        "201":
          description: Created
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/createNoteUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"subject":"Note 1","body":"<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"}"

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

            conn.request("POST", "/notes-service/by-id/%7BclientId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "subject": "Note 1",
              "body": "<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n"
            });

            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/notes-service/by-id/%7BclientId%7D");
            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": "/notes-service/by-id/%7BclientId%7D",
              "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({
              subject: 'Note 1',
              body: '<h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"subject":"Note 1","body":"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n"}');

            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/notes-service/by-id/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"}")
              .asString();
  /notes-service/by-id/{clientId}/{noteId}:
    get:
      tags:
        - Profile management
      summary: Get note
      description: |
        Retrieve a single note

        ---

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

        **User role permission required:** `client_notes: read`
      operationId: getNoteUsingGET
      parameters:
        - $ref: "#/components/parameters/notes-service-profileId"
        - name: noteId
          in: path
          description: Note UUID
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/notes-service-NoteResponse"
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/getNoteUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("GET", "https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    put:
      tags:
        - Profile management
      summary: Update note
      description: |
        You can update an existing note.

        ---

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

        **User role permission required:** `client_notes: update`
      operationId: updateNoteUsingPUT
      parameters:
        - name: clientId
          in: path
          required: true
          description: Profile ID
          schema:
            type: integer
            format: int64
        - name: noteId
          in: path
          description: Note UUID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/notes-service-NoteRequest"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/notes-service-NoteResponse"
        "201":
          description: Created
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/updateNoteUsingPUT
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request PUT \
              --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"subject":"Note 1","body":"<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"}"

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

            conn.request("PUT", "/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "subject": "Note 1",
              "body": "<h1>NOTE 1</h1>\\n<p>Some text</p>\\n<ul>\\n<li>1</li>\\n<li>2</li>\\n<li>3</li>\\n</ul>\\n<blockquote>Lorem ipsum in quote</blockquote>\\n<p><strong>Lorem ipsum in bold</strong></p>\\n"
            });

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

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

            xhr.open("PUT", "https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D");
            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": "PUT",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D",
              "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({
              subject: 'Note 1',
              body: '<h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D');
            $request->setMethod(HTTP_METH_PUT);

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

            $request->setBody('{"subject":"Note 1","body":"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n"}');

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.put("https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"subject\":\"Note 1\",\"body\":\"<h1>NOTE 1</h1>\\\\n<p>Some text</p>\\\\n<ul>\\\\n<li>1</li>\\\\n<li>2</li>\\\\n<li>3</li>\\\\n</ul>\\\\n<blockquote>Lorem ipsum in quote</blockquote>\\\\n<p><strong>Lorem ipsum in bold</strong></p>\\\\n\"}")
              .asString();
    delete:
      tags:
        - Profile management
      summary: Delete note
      description: |
        You can delete a note. This operation is irreversible.

        ---

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

        **User role permission required:** `client_notes: delete`
      operationId: deleteNoteUsingDELETE
      parameters:
        - $ref: "#/components/parameters/notes-service-profileId"
        - name: noteId
          in: path
          description: Note UUID
          required: true
          schema:
            type: string
      responses:
        "200":
          description: OK
        "204":
          description: No Content
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/deleteNoteUsingDELETE
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request DELETE \
              --url https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("DELETE", "/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D", headers=headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

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

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

            xhr.open("DELETE", "https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

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

            const options = {
              "method": "DELETE",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            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.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

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

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.delete("https://api.synerise.com/notes-service/by-id/%7BclientId%7D/%7BnoteId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /push-devices/web-push/clean-up/{clientId}:
    post:
      security:
        - JWT: []
      tags:
        - Profile devices
      operationId: cleanUpWebPushSubscriber
      summary: |
        Clean up web push tokens
      description: |
        Remove mobile push Firebase tokens from profile. You can use this endpoint to clean up tokens updated before a selected date or by service worker version. 

        Using this endpoint generates a `webpush.tokenDelete` event for each deleted token.

        If no tokens are left after the clean-up, the `has_webpush_devices` attribute in the profile is set to false.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `PUSH_DEVICES_SERVICE_WEB_PUSH_DEVICES_DELETE`

        **User role permission required:** `client_detail: delete`
      parameters:
        - $ref: "#/components/parameters/push-devices-service-pathClientId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/push-devices-service-WebPushCleanupRequest"
        required: true
      responses:
        "200":
          description: Tokens deleted
        4xx:
          $ref: "#/components/responses/push-devices-service-4xx"
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/cleanUpWebPushSubscriber
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/push-devices/web-push/clean-up/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"BY_UPDATED_BEFORE","updated":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}"

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

            conn.request("POST", "/push-devices/web-push/clean-up/%7BclientId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "type": "BY_UPDATED_BEFORE",
              "updated": "2019-08-24T14:15:22Z"
            });

            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/push-devices/web-push/clean-up/%7BclientId%7D");
            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": "/push-devices/web-push/clean-up/%7BclientId%7D",
              "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({type: 'BY_UPDATED_BEFORE', updated: '2019-08-24T14:15:22Z'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/push-devices/web-push/clean-up/%7BclientId%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"type":"BY_UPDATED_BEFORE","updated":"2019-08-24T14:15:22Z"}');

            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/push-devices/web-push/clean-up/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /push-devices/mobile-push-subscriber/clean-up/{clientId}:
    post:
      security:
        - JWT: []
      tags:
        - Profile devices
      operationId: cleanUpMobilePushSubscriber
      summary: Clean up mobile push tokens
      description: |
        Remove mobile push Firebase tokens from profile. You can use this endpoint to clean up tokens updated before a selected date. 

        Using this endpoint generates a `push.tokenDelete` event for each deleted token.  

        If no tokens are left after the clean-up, the `has_mobile_push_devices` attribute in the profile is set to false.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `PUSH_DEVICES_SERVICE_MOBILE_PUSH_DEVICES_DELETE`

        **User role permission required:** `client_detail: delete`
      parameters:
        - $ref: "#/components/parameters/push-devices-service-pathClientId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/push-devices-service-MobilePushCleanupRequest"
        required: true
      responses:
        "200":
          description: Tokens deleted
        4xx:
          $ref: "#/components/responses/push-devices-service-4xx"
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/cleanUpMobilePushSubscriber
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"type":"BY_UPDATED_BEFORE","updated":"2019-08-24T14:15:22Z"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}"

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

            conn.request("POST", "/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "type": "BY_UPDATED_BEFORE",
              "updated": "2019-08-24T14:15:22Z"
            });

            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/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D");
            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": "/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D",
              "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({type: 'BY_UPDATED_BEFORE', updated: '2019-08-24T14:15:22Z'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"type":"BY_UPDATED_BEFORE","updated":"2019-08-24T14:15:22Z"}');

            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/push-devices/mobile-push-subscriber/clean-up/%7BclientId%7D")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"type\":\"BY_UPDATED_BEFORE\",\"updated\":\"2019-08-24T14:15:22Z\"}")
              .asString();
  /push-devices/clients/by-uuid/{identifierValue}/linked-devices:
    post:
      security:
        - JWT: []
      summary: Link a device by other parameters
      description: |2
         Assign a device to a profile UUID. A profile may have many devices assigned. If request is made by PROFILE or ANONYMOUS_PROFILE uuid is taken from jwt token.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **API key permission required:** `API_BY_IDENTIFY_DEVICE_CLIENT_UPDATE`

        **User role permission required:** `client_info: update`
      operationId: LinkAClientDeviceByClientUuid
      parameters:
        - name: identifierType
          in: path
          required: true
          description: The profile identifier to use for the request
          schema:
            type: string
            enum:
              - by-customId
              - by-uuid
        - $ref: "#/components/parameters/push-devices-service-pathIdentifierValue"
        - $ref: "#/components/parameters/push-devices-service-acceptHeader"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/push-devices-service-LinkaClientdeviceRequest"
        required: true
      responses:
        "202":
          description: Request accepted
          headers: {}
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/push-devices-service-HTTP400"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T12:34:02.222Z
                path: /clients/by-uuid/779465fc-a0c5-41e5-9be2-51c00b2588b4/linked-devices
                message: Some fields did not pass validation
                errors:
                  - code: 12301
                    field: deviceId
                    message: "12301"
        "401":
          $ref: "#/components/responses/push-devices-service-401"
        "403":
          $ref: "#/components/responses/push-devices-service-403"
        "404":
          description: Profile not found
        "415":
          $ref: "#/components/responses/push-devices-service-415"
      deprecated: false
      tags:
        - Profile devices
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientUuid
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}"

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

            conn.request("POST", "/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "registrationId": "string",
              "type": "android",
              "bluetoothAddress": "string",
              "macAddress": "string",
              "manufacturer": "string",
              "model": "string",
              "osVersion": "string",
              "product": "a51ul_htc_europe",
              "screenHeight": 0,
              "screenWidth": 0,
              "publicKey": "string"
            });

            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/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            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": "/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "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({
              deviceId: 'string',
              registrationId: 'string',
              type: 'android',
              bluetoothAddress: 'string',
              macAddress: 'string',
              manufacturer: 'string',
              model: 'string',
              osVersion: 'string',
              product: 'a51ul_htc_europe',
              screenHeight: 0,
              screenWidth: 0,
              publicKey: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}');

            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/push-devices/clients/by-uuid/%7BidentifierValue%7D/linked-devices")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}")
              .asString();
  /push-devices/clients/linked-devices:
    post:
      security:
        - JWT: []
      summary: Link a device by other parameters
      description: |2
         Assign a device to a profile UUID from JWT token. A profile may have many devices assigned.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>

        **User role permission required:** `client_info: update`
      operationId: LinkAClientDeviceByClientUuidFromJwtToken
      parameters:
        - name: identifierType
          in: path
          required: true
          description: The profile identifier to use for the request
          schema:
            type: string
            enum:
              - by-customId
              - by-uuid
        - $ref: "#/components/parameters/push-devices-service-pathIdentifierValue"
        - $ref: "#/components/parameters/push-devices-service-acceptHeader"
      requestBody:
        description: ""
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/push-devices-service-LinkaClientdeviceRequest"
        required: true
      responses:
        "202":
          description: Request accepted
          headers: {}
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/push-devices-service-HTTP400"
              example:
                error: Bad Request
                status: 400
                timestamp: 2020-10-29T12:34:02.222Z
                path: /clients/linked-devices
                message: Some fields did not pass validation
                errors:
                  - code: 12301
                    field: deviceId
                    message: "12301"
        "401":
          $ref: "#/components/responses/push-devices-service-401"
        "403":
          $ref: "#/components/responses/push-devices-service-403"
        "404":
          description: Profile not found
        "415":
          $ref: "#/components/responses/push-devices-service-415"
      deprecated: false
      tags:
        - Profile devices
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-devices/operation/LinkAClientDeviceByClientUuidFromJwtToken
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/push-devices/clients/linked-devices \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}"

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

            conn.request("POST", "/push-devices/clients/linked-devices", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "registrationId": "string",
              "type": "android",
              "bluetoothAddress": "string",
              "macAddress": "string",
              "manufacturer": "string",
              "model": "string",
              "osVersion": "string",
              "product": "a51ul_htc_europe",
              "screenHeight": 0,
              "screenWidth": 0,
              "publicKey": "string"
            });

            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/push-devices/clients/linked-devices");
            xhr.setRequestHeader("Accept", "SOME_STRING_VALUE");
            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": "/push-devices/clients/linked-devices",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "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({
              deviceId: 'string',
              registrationId: 'string',
              type: 'android',
              bluetoothAddress: 'string',
              macAddress: 'string',
              manufacturer: 'string',
              model: 'string',
              osVersion: 'string',
              product: 'a51ul_htc_europe',
              screenHeight: 0,
              screenWidth: 0,
              publicKey: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/push-devices/clients/linked-devices');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"deviceId":"string","registrationId":"string","type":"android","bluetoothAddress":"string","macAddress":"string","manufacturer":"string","model":"string","osVersion":"string","product":"a51ul_htc_europe","screenHeight":0,"screenWidth":0,"publicKey":"string"}');

            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/push-devices/clients/linked-devices")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"registrationId\":\"string\",\"type\":\"android\",\"bluetoothAddress\":\"string\",\"macAddress\":\"string\",\"manufacturer\":\"string\",\"model\":\"string\",\"osVersion\":\"string\",\"product\":\"a51ul_htc_europe\",\"screenHeight\":0,\"screenWidth\":0,\"publicKey\":\"string\"}")
              .asString();
  /sauth/clients/registered:
    post:
      tags:
        - Profile registration
      summary: Register a Profile
      description: |
        Create a new account for a Profile. This account is owned by the Profile and can be accessed and edited by it. If you don't have some information about the profile, don't insert a null-value parameter - omit the parameter entirely.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_REGISTER_CLIENT_CREATE`
      operationId: RegisterAClient
      requestBody:
        content:
          application/json:
            schema:
              required:
                - uuid
                - email
                - password
              $ref: "#/components/schemas/sauth-RegisterAClientRequestBody"
        required: true
      responses:
        "202":
          description: Request accepted
        "400":
          description: Profile already exists or request body malformed
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-603`: A profile with this UUID already exists, you probably need to re-generate the UUID
                          - `SAU-604`: A profile with this id already exists
                          - `SAU-605`: A profile with this customId already exists and is registered
                          - `SAU-606`: This UUID cannot be used, re-generate the UUID and try again
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "424":
          description: "Only if customId was obtained from loyalty card code pool: provided customId does not exist in loyalty card code pool"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-registration/operation/RegisterAClient
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/registered \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","password":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","whatsAppId":"string","birthDate":"string","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"password\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"whatsAppId\":\"string\",\"birthDate\":\"string\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}"

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

            conn.request("POST", "/sauth/clients/registered", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "password": "string",
              "phone": "+48111222333",
              "customId": "string",
              "firstName": "string",
              "lastName": "string",
              "displayName": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "avatarUrl": "string",
              "whatsAppId": "string",
              "birthDate": "string",
              "company": "string",
              "city": "string",
              "address": "string",
              "zipCode": "string",
              "province": "string",
              "countryCode": "PL",
              "sex": "FEMALE",
              "agreements": {
                "email": true,
                "sms": true,
                "push": true,
                "bluetooth": false,
                "rfid": false,
                "wifi": false
              },
              "attributes": {
                "property1": null,
                "property2": null
              },
              "tags": [
                "string"
              ]
            });

            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/clients/registered");
            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/clients/registered",
              "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({
              email: 'string',
              password: 'string',
              phone: '+48111222333',
              customId: 'string',
              firstName: 'string',
              lastName: 'string',
              displayName: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              avatarUrl: 'string',
              whatsAppId: 'string',
              birthDate: 'string',
              company: 'string',
              city: 'string',
              address: 'string',
              zipCode: 'string',
              province: 'string',
              countryCode: 'PL',
              sex: 'FEMALE',
              agreements: {email: true, sms: true, push: true, bluetooth: false, rfid: false, wifi: false},
              attributes: {property1: null, property2: null},
              tags: ['string']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"email":"string","password":"string","phone":"+48111222333","customId":"string","firstName":"string","lastName":"string","displayName":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","avatarUrl":"string","whatsAppId":"string","birthDate":"string","company":"string","city":"string","address":"string","zipCode":"string","province":"string","countryCode":"PL","sex":"FEMALE","agreements":{"email":true,"sms":true,"push":true,"bluetooth":false,"rfid":false,"wifi":false},"attributes":{"property1":null,"property2":null},"tags":["string"]}');

            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/clients/registered")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"password\":\"string\",\"phone\":\"+48111222333\",\"customId\":\"string\",\"firstName\":\"string\",\"lastName\":\"string\",\"displayName\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"avatarUrl\":\"string\",\"whatsAppId\":\"string\",\"birthDate\":\"string\",\"company\":\"string\",\"city\":\"string\",\"address\":\"string\",\"zipCode\":\"string\",\"province\":\"string\",\"countryCode\":\"PL\",\"sex\":\"FEMALE\",\"agreements\":{\"email\":true,\"sms\":true,\"push\":true,\"bluetooth\":false,\"rfid\":false,\"wifi\":false},\"attributes\":{\"property1\":null,\"property2\":null},\"tags\":[\"string\"]}")
              .asString();
  /sauth/clients/activation/by-pin-code/confirmation:
    post:
      security:
        - JWT: []
      tags:
        - Profile registration
      summary: Confirm registration with PIN code
      description: |
        Confirm account registration with PIN code received by email (code is sent automatically at registration).

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: confirmByPinCodeUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-PinCodeConfirmationRequest"
      responses:
        "200":
          description: OK, account confirmed
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-602`: Account is already confirmed
                          - `SAU-601`: Device ID is required and missing
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-304`: Wrong PIN
                          - `SAU-305`: PIN expired
                          - `SAU-306`: PIN was sent from a different device than the account was registered (by default, this is not allowed)
        "404":
          description: Not Found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-registration/operation/confirmByPinCodeUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/activation/by-pin-code/confirmation \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"deviceId":"string","email":"string","pinCode":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"deviceId\":\"string\",\"email\":\"string\",\"pinCode\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}"

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

            conn.request("POST", "/sauth/clients/activation/by-pin-code/confirmation", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "deviceId": "string",
              "email": "string",
              "pinCode": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f"
            });

            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/clients/activation/by-pin-code/confirmation");
            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/clients/activation/by-pin-code/confirmation",
              "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({
              deviceId: 'string',
              email: 'string',
              pinCode: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/activation/by-pin-code/confirmation');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"deviceId":"string","email":"string","pinCode":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}');

            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/clients/activation/by-pin-code/confirmation")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"deviceId\":\"string\",\"email\":\"string\",\"pinCode\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /sauth/clients/activation/by-pin-code/request:
    post:
      security:
        - JWT: []
      tags:
        - Profile registration
      summary: Re-send PIN code
      description: |
        Re-send a PIN code to the Profile's email.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>
      operationId: resendByPinCodeUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientPinActivationResendRequest"
      responses:
        "200":
          description: OK
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-601`: Device ID is required and missing
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-304`: Wrong PIN
                          - `SAU-305`: PIN expired
                          - `SAU-306`: PIN was sent from a different device than the account was registered (by default, this is not allowed)
        "404":
          description: Not Found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-registration/operation/resendByPinCodeUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/activation/by-pin-code/request \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","deviceId":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}"

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

            conn.request("POST", "/sauth/clients/activation/by-pin-code/request", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "deviceId": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f"
            });

            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/clients/activation/by-pin-code/request");
            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/clients/activation/by-pin-code/request",
              "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({
              email: 'string',
              deviceId: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/activation/by-pin-code/request');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","deviceId":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f"}');

            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/clients/activation/by-pin-code/request")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\"}")
              .asString();
  /sauth/clients/activation/confirmation:
    post:
      tags:
        - Profile registration
      summary: Activate a Profile's account
      description: |
        Activate the Profile's account. This is used when registration is configured to keep the account inactive until the email is confirmed.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_CONFIRMATION_CLIENT_CREATE`
      operationId: ConfirmAClientAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ConfirmAClientAccountRequestBody"
            example:
              token: 8a0be35a-f6be-437b-ab18-339cc6194df5
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
        "400":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-602`: Account is already confirmed
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          description: Request failed, see error message for details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                timestamp: 2018-08-09T07:53:32.406+00:00
                status: 409
                error: Conflict
                message: Account already activated
                path: /clients/activation/request
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-registration/operation/ConfirmAClientAccount
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/activation/confirmation \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"token":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"token\":\"string\"}"

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

            conn.request("POST", "/sauth/clients/activation/confirmation", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "token": "string"
            });

            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/clients/activation/confirmation");
            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/clients/activation/confirmation",
              "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({token: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"token":"string"}');

            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/clients/activation/confirmation")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"token\":\"string\"}")
              .asString();
  /sauth/clients/activation/request:
    post:
      tags:
        - Profile registration
      summary: Re-send email confirmation
      description: |
        Request a re-sending of the confirmation email.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_CONFIRMATION_CLIENT_CREATE`
      operationId: resendUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientActivationResendRequest"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-registration/operation/resendUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/activation/request \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","deviceId":"string","uuid":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"string\"}"

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

            conn.request("POST", "/sauth/clients/activation/request", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "deviceId": "string",
              "uuid": "string"
            });

            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/clients/activation/request");
            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/clients/activation/request",
              "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({email: 'string', deviceId: 'string', uuid: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"email":"string","deviceId":"string","uuid":"string"}');

            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/clients/activation/request")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"deviceId\":\"string\",\"uuid\":\"string\"}")
              .asString();
  /sauth/clients/password-reset/request:
    post:
      tags:
        - Profile account management
      summary: Request Profile password reset
      description: |
        Allows a Profile to send a password reset request. A reset link is sent to the specified email address.
        To confirm the request, use the [Confirm a Profile's password reset](#operation/ConfirmClientPasswordReset) endpoint.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_PASSWORD_RESET_CLIENT_CREATE`
      operationId: RequestClientPasswordReset
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-RequestClientpasswordresetRequest"
        required: true
      responses:
        "200":
          description: Request accepted
        "201":
          description: Created
          content: {}
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/sauth-4xx-base"
                  - type: object
                    properties:
                      errorCode:
                        type: string
                        description: |
                          Error code, if applicable.
                          - `SAU-307`: Cannot reset password, email confirmation by hash code (activation link) required
                          - `SAU-308`: Cannot reset password, email confirmation by PIN (activation link) required
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/RequestClientPasswordReset
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/password-reset/request \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"testDoc@example.com"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"testDoc@example.com\"}"

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

            conn.request("POST", "/sauth/clients/password-reset/request", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "testDoc@example.com"
            });

            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/clients/password-reset/request");
            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/clients/password-reset/request",
              "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({email: 'testDoc@example.com'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"email":"testDoc@example.com"}');

            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/clients/password-reset/request")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"testDoc@example.com\"}")
              .asString();
  /sauth/clients/password-reset/confirmation:
    post:
      tags:
        - Profile account management
      summary: Confirm Profile password reset
      description: |
        Confirm a password reset using the token obtained from the [Request Profile password reset](#operation/RequestClientPasswordReset) endpoint.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=LogInAnonymouslyV3" target="_blank" rel="noopener">Anonymous Profile</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_PASSWORD_RESET_CLIENT_CREATE`
      operationId: ConfirmClientPasswordReset
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ConfirmClientpasswordresetRequest"
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/ConfirmClientPasswordReset
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/password-reset/confirmation \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"password":"testPass1!","token":"token_from_pass_reset_req"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"password\":\"testPass1!\",\"token\":\"token_from_pass_reset_req\"}"

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

            conn.request("POST", "/sauth/clients/password-reset/confirmation", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "password": "testPass1!",
              "token": "token_from_pass_reset_req"
            });

            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/clients/password-reset/confirmation");
            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/clients/password-reset/confirmation",
              "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({password: 'testPass1!', token: 'token_from_pass_reset_req'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/password-reset/confirmation');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"password":"testPass1!","token":"token_from_pass_reset_req"}');

            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/clients/password-reset/confirmation")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"password\":\"testPass1!\",\"token\":\"token_from_pass_reset_req\"}")
              .asString();
  /sauth/my-account/change-password:
    post:
      tags:
        - Profile account management
      summary: Change Profile password
      description: |
        A Profile can update the password to its account.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: ChangeClientPassword
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ChangeClientPasswordRequestBody"
            example: '{"oldPassword":"test1.1234","password":"Test.1234","deviceId":"optional"}'
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
          content:
            text/plain:
              schema:
                type: object
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
              example:
                error: Bad Request
                status: 400
                timestamp: 2018-08-01T19:46:52.178Z
                message: Password must have at least 6 characters and must contain at least one digit, one letter and one special character
                path: /my-account/change-password
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/ChangeClientPassword
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/my-account/change-password \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"oldPassword":"string","password":"string","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"oldPassword\":\"string\",\"password\":\"string\",\"deviceId\":\"string\"}"

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

            conn.request("POST", "/sauth/my-account/change-password", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "oldPassword": "string",
              "password": "string",
              "deviceId": "string"
            });

            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/my-account/change-password");
            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/my-account/change-password",
              "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({oldPassword: 'string', password: 'string', deviceId: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/my-account/change-password');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"oldPassword":"string","password":"string","deviceId":"string"}');

            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/my-account/change-password")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"oldPassword\":\"string\",\"password\":\"string\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/v2/my-account/delete:
    post:
      tags:
        - Profile account management
      summary: Delete account
      description: |
        A Profile can delete its own account. Its history shows an `client.deleteAccount` event. All marketing agreements are cancelled. The profile is signed out on all devices and cannot sign in again.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: deleteAccountUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeleteAccountV2RequestBody"
        required: true
      responses:
        "200":
          description: Account deleted
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-invalid-credentials-in-body"
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/deleteAccountUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v2/my-account/delete \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","externalToken":"string","customId":"string","identityProvider":"FACEBOOK","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"externalToken\":\"string\",\"customId\":\"string\",\"identityProvider\":\"FACEBOOK\",\"deviceId\":\"string\"}"

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

            conn.request("POST", "/sauth/v2/my-account/delete", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "password": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "externalToken": "string",
              "customId": "string",
              "identityProvider": "FACEBOOK",
              "deviceId": "string"
            });

            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/v2/my-account/delete");
            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/v2/my-account/delete",
              "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({
              password: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              externalToken: 'string',
              customId: 'string',
              identityProvider: 'FACEBOOK',
              deviceId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v2/my-account/delete');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","externalToken":"string","customId":"string","identityProvider":"FACEBOOK","deviceId":"string"}');

            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/v2/my-account/delete")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"externalToken\":\"string\",\"customId\":\"string\",\"identityProvider\":\"FACEBOOK\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/v2/my-account/email-change/request:
    post:
      tags:
        - Profile account management
      summary: Request Profile email change
      description: |
        A Profile can request an email change for its own account. A confirmation token is sent to the new email by and must be applied by clicking the link in the message or using the [Confirm Profile email change](#operation/confirmClientEmailChange) endpoint.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: changeEmailRequestUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-GenericClientEmailChangeRequest"
      responses:
        "200":
          description: Email change requested, confirmation token sent to new email
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-invalid-credentials-in-body"
        "404":
          description: Not Found
          content: {}
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/changeEmailRequestUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v2/my-account/email-change/request \
              --header 'content-type: application/json' \
              --data '{"email":"string","externalToken":"string","password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"externalToken\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/v2/my-account/email-change/request", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "externalToken": "string",
              "password": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "customId": "string"
            });

            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/v2/my-account/email-change/request");
            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/v2/my-account/email-change/request",
              "headers": {
                "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({
              email: 'string',
              externalToken: 'string',
              password: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              customId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v2/my-account/email-change/request');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","externalToken":"string","password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"string"}');

            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/v2/my-account/email-change/request")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"externalToken\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}")
              .asString();
  /sauth/v3/my-account/logout:
    post:
      tags:
        - Profile account management
      summary: Log out a Profile
      description: |
        Log out a Profile when authenticated as that Profile.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>, ANONYMOUS_CLIENT_CONDITIONAL
      operationId: logoutUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientLogoutRequest"
      responses:
        "200":
          description: OK
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Profile not found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/logoutUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/v3/my-account/logout \
              --header 'content-type: application/json' \
              --data '{"action":"LOGOUT"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"LOGOUT\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/v3/my-account/logout", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "LOGOUT"
            });

            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/v3/my-account/logout");
            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/v3/my-account/logout",
              "headers": {
                "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({action: 'LOGOUT'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/v3/my-account/logout');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"action":"LOGOUT"}');

            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/v3/my-account/logout")
              .header("content-type", "application/json")
              .body("{\"action\":\"LOGOUT\"}")
              .asString();
  /sauth/my-account/email-change/confirmation:
    post:
      tags:
        - Profile account management
      summary: Confirm Profile email change
      description: |
        The Profile can confirm the email change by providing the token that they received by email as a result of the [Request a Profile email change](#operation/changeEmailRequestUsingPOST) call.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: confirmClientEmailChange
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ConfirmClientEmailChangeRequestBody"
            example: '{"token":"token_from_email_change_mail","newsletterAgreement":true}'
        required: true
      responses:
        "200":
          description: Request accepted
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          description: Invalid confirmation token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/sauth-4xx-base"
      deprecated: false
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/confirmClientEmailChange
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/my-account/email-change/confirmation \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"token":"58acd5bd-8efd-47ed-b101-32eb56e13839","newsletterAgreement":true}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"token\":\"58acd5bd-8efd-47ed-b101-32eb56e13839\",\"newsletterAgreement\":true}"

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

            conn.request("POST", "/sauth/my-account/email-change/confirmation", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "token": "58acd5bd-8efd-47ed-b101-32eb56e13839",
              "newsletterAgreement": true
            });

            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/my-account/email-change/confirmation");
            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/my-account/email-change/confirmation",
              "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({token: '58acd5bd-8efd-47ed-b101-32eb56e13839', newsletterAgreement: true}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/my-account/email-change/confirmation');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"token":"58acd5bd-8efd-47ed-b101-32eb56e13839","newsletterAgreement":true}');

            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/my-account/email-change/confirmation")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"token\":\"58acd5bd-8efd-47ed-b101-32eb56e13839\",\"newsletterAgreement\":true}")
              .asString();
  /sauth/clients/facebook/email-change/request:
    post:
      tags:
        - Profile account management
      summary: Change Facebook Profile email
      description: |
        Change the email address of a Profile registered by Facebook

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: changeEmailUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientEmailChangeRequest"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/changeEmailUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/facebook/email-change/request \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}"

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

            conn.request("POST", "/sauth/clients/facebook/email-change/request", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string"
            });

            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/clients/facebook/email-change/request");
            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/clients/facebook/email-change/request",
              "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({
              email: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/clients/facebook/email-change/request');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}');

            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/clients/facebook/email-change/request")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/management/client/{clientID}/logout:
    post:
      tags:
        - Profile management
      summary: Log out a Profile
      description: |
        Log out a Profile when authenticated as a Synerise User or a Workspace.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `SAUTH_LOGOUT_CLIENT_CREATE`

        **User role permission required:** `settings_customers_iam: create`
      operationId: logoutClientUsingPOST
      parameters:
        - $ref: "#/components/parameters/sauth-pathClientId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-ClientLogoutRequest"
      responses:
        "200":
          description: OK
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Profile not found
      deprecated: false
      x-snr-doc-urls:
        - /api-reference/data-management#tag/Profile-management/operation/logoutClientUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/management/client/434428563/logout \
              --header 'content-type: application/json' \
              --data '{"action":"LOGOUT"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"action\":\"LOGOUT\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/sauth/management/client/434428563/logout", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "action": "LOGOUT"
            });

            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/management/client/434428563/logout");
            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/management/client/434428563/logout",
              "headers": {
                "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({action: 'LOGOUT'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/management/client/434428563/logout');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"action":"LOGOUT"}');

            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/management/client/434428563/logout")
              .header("content-type", "application/json")
              .body("{\"action\":\"LOGOUT\"}")
              .asString();
  /sauth/clients/oauth/deleted:
    post:
      deprecated: true
      tags:
        - Profile account management
      summary: Delete Client Account (OAuth)
      description: |
        
        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Client can delete their own account.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: deleteOauthClientUsingPOST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeleteOauthClientRequestBody"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-invalid-credentials-in-body"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/deleteOauthClientUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/oauth/deleted \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"accessToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}"

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

            conn.request("POST", "/sauth/clients/oauth/deleted", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "accessToken": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "customId": "string"
            });

            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/clients/oauth/deleted");
            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/clients/oauth/deleted",
              "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({
              accessToken: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              customId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"accessToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"string"}');

            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/clients/oauth/deleted")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}")
              .asString();
  /sauth/clients/apple/deleted:
    post:
      deprecated: true
      tags:
        - Profile account management
      summary: Delete Profile account (Sign in with Apple)
      description: |
        
        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Profile can delete its own account.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: deleteAppleClientUsingPOST
      security:
        - JWT: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeleteAppleClientRequestBody"
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-forbidden"
        "404":
          description: Not Found
          content: {}
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/deleteAppleClientUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/apple/deleted \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"accessToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}"

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

            conn.request("POST", "/sauth/clients/apple/deleted", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "accessToken": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string",
              "customId": "string"
            });

            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/clients/apple/deleted");
            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/clients/apple/deleted",
              "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({
              accessToken: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string',
              customId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"accessToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string","customId":"string"}');

            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/clients/apple/deleted")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"accessToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\",\"customId\":\"string\"}")
              .asString();
  /sauth/clients/facebook/deleted:
    post:
      deprecated: true
      tags:
        - Profile account management
      summary: Delete Facebook Profile Account
      description: |
        
        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Profile can delete its own account.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: DeleteAFacebookClientAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeleteAFacebookClientAccountRequestBody"
        required: true
      responses:
        "200":
          description: Request accepted
          headers: {}
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-invalid-credentials-in-body"
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/DeleteAFacebookClientAccount
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/clients/facebook/deleted \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"facebookToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"facebookToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}"

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

            conn.request("POST", "/sauth/clients/facebook/deleted", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "facebookToken": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string"
            });

            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/clients/facebook/deleted");
            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/clients/facebook/deleted",
              "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({
              facebookToken: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"facebookToken":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}');

            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/clients/facebook/deleted")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"facebookToken\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/my-account/delete:
    post:
      deprecated: true
      tags:
        - Profile account management
      summary: Delete account
      description: |
        
        This endpoint is deprecated. Use [this one](#operation/deleteAccountUsingPOST).

        A Profile can delete its own account.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: deleteAccountUsingPOST-v1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-DeleteAccountV1RequestBody"
      responses:
        "200":
          description: OK
          content: {}
        "400":
          $ref: "#/components/responses/sauth-400-malformed"
        "401":
          $ref: "#/components/responses/sauth-401-unauthorized"
        "403":
          $ref: "#/components/responses/sauth-403-invalid-credentials-in-body"
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/deleteAccountUsingPOST-v1
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/my-account/delete \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"password":"string","uuid":"string","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\"}"

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

            conn.request("POST", "/sauth/my-account/delete", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "password": "string",
              "uuid": "string",
              "deviceId": "string"
            });

            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/my-account/delete");
            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/my-account/delete",
              "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({password: 'string', uuid: 'string', deviceId: 'string'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

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

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

            $request->setBody('{"password":"string","uuid":"string","deviceId":"string"}');

            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/my-account/delete")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"password\":\"string\",\"uuid\":\"string\",\"deviceId\":\"string\"}")
              .asString();
  /sauth/my-account/email-change/request:
    post:
      deprecated: true
      tags:
        - Profile account management
      summary: Request Profile email change
      description: |
        
        This endpoint is deprecated. Use [this one](#operation/changeEmailRequestUsingPOST).

        A Profile can request an email change for its account. A confirmation token is sent by and must be applied using the [Confirm Profile email change](#operation/confirmClientEmailChange) endpoint.


        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=authenticateUsingPOST_v3" target="_blank" rel="noopener">Profile (Client)</a>
      operationId: requestClientEmailChange
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/sauth-RequestClientEmailChangeRequestBody"
            example: '{"email":"newEmail","password":"my_password","uuid":"my_uuid","deviceId":"optional"}'
        required: true
      responses:
        "202":
          description: Request accepted
        "400":
          description: Clients not recognizable by email
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/profile-management#tag/Profile-account-management/operation/requestClientEmailChange
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/sauth/my-account/email-change/request \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"string","password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"email\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}"

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

            conn.request("POST", "/sauth/my-account/email-change/request", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "password": "string",
              "uuid": "07243772-008a-42e1-ba37-c3807cebde8f",
              "deviceId": "string"
            });

            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/my-account/email-change/request");
            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/my-account/email-change/request",
              "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({
              email: 'string',
              password: 'string',
              uuid: '07243772-008a-42e1-ba37-c3807cebde8f',
              deviceId: 'string'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/sauth/my-account/email-change/request');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"email":"string","password":"string","uuid":"07243772-008a-42e1-ba37-c3807cebde8f","deviceId":"string"}');

            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/my-account/email-change/request")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"password\":\"string\",\"uuid\":\"07243772-008a-42e1-ba37-c3807cebde8f\",\"deviceId\":\"string\"}")
              .asString();
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.
    TrackerKey:
      type: apiKey
      name: token
      in: query
      description: Authorization by tracker key sent as a query parameter. This is the same key as used in the website tracking code.
  schemas:
    api-service-HTTP400-apiv4:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: Additional details of the errors, if applicable
          items:
            $ref: "#/components/schemas/api-service-Error-apiv4"
    api-service-Error-apiv4:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: 12082
          description: A numeric identifier of the error type
        field:
          type: string
          example: countryCode
          description: Field in the request body that caused the error
        message:
          type: string
          example: Country Code must have 0 or 3 characters as per ISO format.
          description: A detailed description of the problem
        rejectedValue:
          type: string
          example: Poland
          description: The value that caused the error
    api-service-CreateatransactionRequest-apiv4:
      required:
        - client
        - orderId
        - paymentInfo
        - products
        - revenue
        - value
        - source
      type: object
      properties:
        client:
          $ref: "#/components/schemas/api-service-Client-apiv4"
        discountAmount:
          description: How much the total cost decreased
          type: object
          nullable: true
          properties:
            amount:
              type: number
              description: The discount amount
              minimum: 0
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        metadata:
          $ref: "#/components/schemas/api-service-TransactionMeta-apiv4"
        orderId:
          $ref: "#/components/schemas/api-service-OrderId-apiv4"
        paymentInfo:
          $ref: "#/components/schemas/api-service-PaymentInfo-apiv4"
        products:
          type: array
          items:
            $ref: "#/components/schemas/api-service-Product-apiv4"
          description: |
            A list of items in the transaction.

            Each item creates a `product.buy` event. The UUID of that event is generated from a combination of:
              - the UUID of the `transaction.charge` event created by the transaction
              - the position of the item in this array. This has an effect on updating transaction events. 

            This means that when you update a transaction (a transaction can only be updated if it has an `eventSalt` and the same timestamp as the original), you must keep the original order of items in the array. Otherwise, you may accidentally overwrite a `product.buy` event with another item's event. The system does NOT recognize the item by SKU in this case.

            **Example**:
              1. You create a transaction with items A, B and C (in that order).
              2. You update the transaction and the items are now A, B, D, and C (in that order).
              3. Because item D took the position of C in the event, it has the same UUID as C had earlier. The event of D overwrites the event of C, and C is generated as a new event.

            Additionally, because events can't be deleted from the database, cancelled items remain as events in a Profile's history. You can use a custom free-form property to tag items as cancelled. This way, you can keep cancelled items in `products` when updating a transaction without breaking the order of items. You can also use the property to filter cancelled items out in Analytics.
        recordedAt:
          $ref: "#/components/schemas/api-service-Time-apiv4"
        revenue:
          required:
            - amount
            - currency
          type: object
          description: Transaction revenue (amount after taxation). This field is not calculated automatically by the backend, you must provide the value by summing up the results of `finalUnitPrice * quantity` from all items in the `products` array.
          properties:
            amount:
              type: number
              minimum: 0
              description: The total amount
              example: 64.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        value:
          required:
            - amount
            - currency
          type: object
          description: If you want to display the price before taxation, use this object. If you only want to display the price after taxation, set the values to the same as in `revenue`.
          properties:
            amount:
              type: number
              minimum: 0
              description: The total amount
              example: 112.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        source:
          $ref: "#/components/schemas/api-service-eventSource-apiv4"
        eventSalt:
          $ref: "#/components/schemas/api-service-EventSalt-apiv4"
    api-service-EventSalt-apiv4:
      type: string
      example: 972346context.action2019-02-07T09:53:56.999+00:00
      description: |
        When an event has an `eventSalt`, it can be overwritten by sending another event. The event's UUID stays the same.

        `eventSalt` must be unique in a workspace. An example of creating a salt is by generating a UUID or concatenating the profile ID, event's name, and timestamp, including milliseconds. This creates a value whose possibility of being duplicated is practically zero.

        To overwrite an event with another one, the new event MUST:
        - have the same `eventSalt` as the original event
        - have the same date and time as the original event (If the date and time don't match the original event, event salt doesn't have any effect.)
        - belong to the same `clientId` as the original event
        - have the same action (event name) as the original event

        ------
        **IMPORTANT**:  
        - DO NOT send the same `eventSalt` to different profiles!
        - DO NOT send the same `eventSalt` with a different action!
        - Pay attention to timezones - more details in the description of the `time` property (in v4/transactions events, it's called `recordedAt`).
        - If you send a future time in an event, it is rejected and the current time is assigned automatically. This means it's impossible to use event salt with future times.
        - An event without an `eventSalt` can't be overwritten. The parameter cannot be added to an event at a later time.
        - The parameter can't be retrieved later. You must keep track of the values that you send.  
        - In Automations that use the overwritten event as a trigger, the **automation is triggered if the new event is sent more than 72 hours after the original**. This is because the event UUID stays the same, and Automation treats events with the same UUID within 72 hours as duplicates that were sent due to an error.
    api-service-eventSource-apiv4:
      type: string
      enum:
        - WEB_DESKTOP
        - WEB_MOBILE
        - MOBILE_APP
        - POS
        - MOBILE
        - DESKTOP
      description: |
        Source of the event. 
      example: MOBILE
    api-service-Time-apiv4:
      type: string
      description: |
        Time when the event occurred, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601). 

        This time isn't affected and doesn't affect the timezone of your workspace - you can send events with a timezone different than that of the workspace. Synerise calculates the times into UTC standard when saving events in the database.

        If not defined, the backend inserts the time of receiving the event.

        A time with a "Z" at the end (for example, `2022-10-14T12:02:06Z`) denotes a time in the UTC standard.

        If you want to send time in a different timezone, you can do this by appending `{+|-}hh:mm` at the end of the string.  

        Note that if the timezone is ahead (+) of UTC, the UTC time is calculated by subtraction. When the timezone is behind (-) UTC, the UTC time is calculated by addition.  
        For example:
          - if your timezone is UTC+1, append `+01:00`. When you send `2022-10-14T15:00:000+01:00`, it is saved in the database as `2022-10-14T14:00:000Z`
          - if your timezone is UTC-8, append `-08:00`. When you send `2022-10-14T22:00:000-08:00`, it is saved in the database as `2022-10-15T06:00:000Z` (note that the date also changes between timezones in this example)

        **IMPORTANT**: If you send an event with a future time, the parameter is rejected and the time of receiving the event is saved as the occurrence time. For example, if your timezone is UTC+1 and you send the event at 15:00 local time, future times are:  
        - later than 15:00 local time
        - later than 14:00 UTC

        When you retrieve an event, its time is always shown as UTC. The original time string that you sent (even if it was a future time and was rejected) can be retrieved with the [activities](https://developers.synerise.com/DataManagement/DataManagement.html#tag/Activities) endpoints, as `snr-original-time`.
      example: 2019-02-07T09:53:56.999+00:00
    api-service-Product-apiv4:
      required:
        - finalUnitPrice
        - quantity
        - sku
      type: object
      additionalProperties:
        description: Additional, free-form properties of the item
      properties:
        finalUnitPrice:
          description: Total final price of the item per unit, including tax and discounts
          required:
            - amount
            - currency
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The price of the items
              example: 3.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        name:
          type: string
          example: Soft drink
          description: Name of the item
        sku:
          $ref: "#/components/schemas/api-service-ItemSku-apiv4"
        categories:
          type: array
          description: A list of the item's categories
          items:
            type: string
        image:
          type: string
          description: URL of the item's image
        url:
          type: string
          description: URL of the item's page
        netUnitPrice:
          required:
            - amount
            - currency
          type: object
          description: Price before taxation (before or after discounts, depending on your implementation and discount type)
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 3.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        tax:
          type: number
          format: float
          description: Tax as a percentage
        quantity:
          type: number
          example: 2.5
          description: The number or amount of purchased items
        regularPrice:
          description: Regular price of the item after taxation, before discounts
          required:
            - amount
            - currency
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 3.25
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        discountPrice:
          description: Discount as an amount. For example, if the regular price is 500, and the final price is 450, the discount amount is 50.
          type: object
          properties:
            amount:
              type: number
              minimum: 0
              description: The amount of money
              example: 15.5
            currency:
              $ref: "#/components/schemas/api-service-Currency-apiv4"
        discountPercent:
          type: number
          format: float
          description: Discount as a percentage
    api-service-ItemSku-apiv4:
      type: string
      example: "189784563455"
      description: SKU of the item
    api-service-Currency-apiv4:
      type: string
      description: The currency of the transaction in ISO 4217
      example: USD
    api-service-PaymentInfo-apiv4:
      description: Payment details
      required:
        - method
      type: object
      properties:
        method:
          description: Payment method
          type: string
          example: CASH
    api-service-OrderId-apiv4:
      type: string
      description: |-
        ID of the transaction.
        If you want to be able to overwrite this transaction in the future, you use `eventSalt`. If you send a transaction with the same `orderId` multiple times, the system generates multiple transaction events.
      example: be466362-71e9-4bdd-ad11-bfacead5276b
    api-service-TransactionMeta-apiv4:
      type: object
      description: |
        Any custom parameters.   
        If you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.   
        Include these parameters in the `metadata` object, so Synerise can redeem it automatically.
      additionalProperties: true
      properties:
        promotionCode:
          $ref: "#/components/schemas/api-service-promotionCode-apiv4"
        quantityToRedeem:
          $ref: "#/components/schemas/api-service-quantityToRedeem-apiv4"
    api-service-quantityToRedeem-apiv4:
      type: integer
      description: |
        The number of items to which the promotion has been applied.  
        If you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.  
        Include these parameters in the metadata object, so Synerise can redeem it automatically.
    api-service-promotionCode-apiv4:
      type: string
      description: |
        Unique promotion ID.  
        If you want to send `promotionCode` and `quantityToRedeem`, contact the Synerise support to enable it for your workspace.  
        Include these parameters in the metadata object, so Synerise can redeem it automatically.
    api-service-Client-apiv4:
      type: object
      description: |
        You must provide at least one of those profile identifiers.

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      properties:
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        id:
          $ref: "#/components/schemas/api-service-ClientId-apiv4"
        uuid:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
    api-service-inBodyClientEmail-apiv4:
      type: string
      description: |
        The profile's e-mail address. 

        - Must match the pattern (ECMA flavor): `/^(([^<>()[\]\\.,;:\s@\\"]+(\.[^<>()[\]\\.,;:\s@\\"]+)*)|(\\".+\\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/`  
        - The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

        By default, email is a unique identifier.

        If [non-unique emails](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/) are enabled, this field should not be used. It is no longer an identifier. The configuration of non-unique emails includes creating an email parameter for communication.

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
    api-service-inBodyClientUuid-apiv4:
      type: string
      description: |
        UUID of the Profile. It is a unique identifier.

        The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      example: 07243772-008a-42e1-ba37-c3807cebde8f
    api-service-ClientId-apiv4:
      description: |
        Unique ID. This ID is generated by the system during profile creation.

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      type: integer
      format: int64
      example: 433230297
    api-service-inBodyClientCustomId-apiv4:
      type: string
      description: |
        A custom ID for the Profile. It is a unique identifier.

        The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
    api-service-CreateClientRequestBody-apiv4:
      type: object
      properties:
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
        phone:
          $ref: "#/components/schemas/api-service-inBodyClientPhone-apiv4"
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        firstName:
          $ref: "#/components/schemas/api-service-inBodyClientFirstName-apiv4"
        lastName:
          $ref: "#/components/schemas/api-service-inBodyClientLastName-apiv4"
        displayName:
          $ref: "#/components/schemas/api-service-inBodyClientDisplayName-apiv4"
        uuid:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        avatarUrl:
          $ref: "#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"
        birthDate:
          $ref: "#/components/schemas/api-service-inBodyClientBirthDate-apiv4"
        company:
          $ref: "#/components/schemas/api-service-inBodyClientCompany-apiv4"
        city:
          $ref: "#/components/schemas/api-service-inBodyClientCity-apiv4"
        address:
          $ref: "#/components/schemas/api-service-inBodyClientAddress-apiv4"
        zipCode:
          $ref: "#/components/schemas/api-service-inBodyClientZipCode-apiv4"
        province:
          $ref: "#/components/schemas/api-service-inBodyClientProvince-apiv4"
        countryCode:
          $ref: "#/components/schemas/api-service-inBodyClientCountryCode-apiv4"
        sex:
          $ref: "#/components/schemas/api-service-inBodyClientSex-apiv4"
        agreements:
          $ref: "#/components/schemas/api-service-Agreements-apiv4"
        attributes:
          $ref: "#/components/schemas/api-service-Attributes-apiv4-apiv4"
        tags:
          $ref: "#/components/schemas/api-service-Tags-apiv4"
    api-service-Tags-apiv4:
      type: array
      description: |
        Tags can be used to group profiles.

        Tag names (strings):
        - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
      items:
        type: string
        description: |
          Tag names (strings):
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-Attributes-apiv4-apiv4:
      type: object
      description: |
        This object contains custom attributes that can have any name (except for reserved attributes, see warning below) and data type, as required by your integration.

        The attribute names can't include any characters that match the pattern (ECMA flavor): `/[\r\n\u2028\u2029\u00AD\u0000\uFE00-\uFE0F]/`

        String values:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)

        If you want to send a date/time attribute for use in analytics, take the following into account:
        - The date/time should be formatted according to ISO 8601.
        - The time zone of the workspace affects dates/times in the attributes that DON'T have a defined timezone. Example:
            - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.
            - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.
            - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.

        <strong><span style="color:red">WARNING<span></strong>: Some attributes cannot be sent in this object and will be ignored. Some of these are reserved for system use, and others must be sent as properties of the profile in the root object of the request body instead of inside the `attributes` object.

        <details><summary><span style="background:red;color:white">Click to expand the list of reserved attributes</span></summary>
        <code>email</code><br><code>id</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br>
        <code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br>
        <code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br>
        <code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br>
        <code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br>
        <code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br>
        <code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br>
        <code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_country</code><br><code>geo_loc_isp</code><br>
        <code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>deletedAt</code><br><code>deleted_unique</code><br><code>status</code><br><code>recognized</code><br><code>previous_clients</code><br><code>testProfile</code><br>
        <code>apikey</code><br><code>apiKey</code><br><code>ApiKey</code><br><code>Apikey</code><br><code>tracker</code><br><code>snr_sdk_version</code><br><code>eventCreateTime</code><br><code>correlationId</code>
        </details>
      additionalProperties:
        description: |
          The attribute names can't include any characters that match the pattern (ECMA flavor): `/[\r\n\u2028\u2029\u00AD\u0000\uFE00-\uFE0F]/`

          String values:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-Agreements-apiv4:
      description: |-
        This object contains the marketing agreements of the Profile.

        You can also pass the values as strings (`"true"`;`"True"`/`"false"`;`"False"`) or integers (`1` for true and `0` for false).
      type: object
      properties:
        email:
          type: boolean
          description: Permission to receive marketing information by e-mail. This field has no effect if [email is not a unique identifier](https://hub.synerise.com/docs/settings/configuration/non-unique-emails/).
          default: false
        sms:
          type: boolean
          description: Permission to receive marketing information by SMS
          default: false
        push:
          type: boolean
          description: Permission to receive push notifications
          default: false
        webPush:
          type: boolean
          description: Permission to receive webpush notifications
          default: false
        bluetooth:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
        rfid:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
        wifi:
          type: boolean
          deprecated: true
          description: This field is ignored when sent.
          default: false
    api-service-inBodyClientSex-apiv4:
      type: string
      description: Profile's sex
      enum:
        - FEMALE
        - MALE
        - NOT_SPECIFIED
        - OTHER
    api-service-inBodyClientCountryCode-apiv4:
      type: string
      description: Code of profile's country of residence in accordance with the ISO 3166 format
      example: PL
    api-service-inBodyClientProvince-apiv4:
      type: string
      description: |
        Profile's province of residence

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientZipCode-apiv4:
      type: string
      description: |
        Profile's zip code

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientAddress-apiv4:
      type: string
      description: |
        Profile's street address.

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientCity-apiv4:
      type: string
      description: |
        Profile's city of residence.

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientCompany-apiv4:
      type: string
      description: |
        Profiles's company

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientBirthDate-apiv4:
      type: string
      description: "Date of birth in the profile. Must be in `yyyy-mm-dd` format and later than `1900-01-01`. Must be a date in the past. <br>**IMPORTANT**: Months and days must be zero-padded. For example: May 3, 1993 is `1993-05-03`."
      example: 1987-10-24
    api-service-inBodyClientAvatarUrl-apiv4:
      type: string
      nullable: true
      description: |
        URL of the profile's avatar picture

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientDisplayName-apiv4:
      type: string
      description: Currently unused
    api-service-inBodyClientLastName-apiv4:
      type: string
      description: |
        Profile's last name

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
        - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientFirstName-apiv4:
      type: string
      description: |
        Profile's first name.

        The value:
          - can't include variation selectors (`[\uFE00-\uFE0F]`), unless there are other characters in the string.
          - can't include the "null" control character (`\u0000`)
    api-service-inBodyClientPhone-apiv4:
      type: string
      description: |
        Phone number of the profile

        - Must match the pattern (ECMA flavor): `/(^\+[0-9 \-()/]{6,19}$)|(^[0-9 \-()/]{6,20}$)/`  
        - The value can't include any characters that match the pattern (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      example: "+48111222333"
    api-service-inResponseClientDetails-apiv4:
      type: object
      properties:
        clientId:
          $ref: "#/components/schemas/api-service-ClientId-apiv4"
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
        phone:
          $ref: "#/components/schemas/api-service-inBodyClientPhone-apiv4"
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        uuid:
          $ref: "#/components/schemas/api-service-inBodyClientUuid-apiv4"
        firstName:
          $ref: "#/components/schemas/api-service-inBodyClientFirstName-apiv4"
        lastName:
          $ref: "#/components/schemas/api-service-inBodyClientLastName-apiv4"
        displayName:
          $ref: "#/components/schemas/api-service-inBodyClientDisplayName-apiv4"
        company:
          $ref: "#/components/schemas/api-service-inBodyClientCompany-apiv4"
        address:
          $ref: "#/components/schemas/api-service-inBodyClientAddress-apiv4"
        city:
          $ref: "#/components/schemas/api-service-inBodyClientCity-apiv4"
        province:
          $ref: "#/components/schemas/api-service-inBodyClientProvince-apiv4"
        zipCode:
          $ref: "#/components/schemas/api-service-inBodyClientZipCode-apiv4"
        countryCode:
          $ref: "#/components/schemas/api-service-inBodyClientCountryCode-apiv4"
        birthDate:
          $ref: "#/components/schemas/api-service-inBodyClientBirthDate-apiv4"
        sex:
          $ref: "#/components/schemas/api-service-inBodyClientSex-apiv4"
        avatarUrl:
          $ref: "#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"
        anonymous:
          description: Information if the profile is anonymous
          type: boolean
          example: false
        agreements:
          $ref: "#/components/schemas/api-service-Agreements-apiv4"
        attributes:
          $ref: "#/components/schemas/api-service-Attributes-apiv4-apiv4"
        tags:
          $ref: "#/components/schemas/api-service-Tags-apiv4"
        previousClients:
          $ref: "#/components/schemas/api-service-PreviousClients-apiv4"
        lastActivityDate:
          deprecated: true
          type: string
          example: 2019-03-19T14:05:39Z
          description: "**Don't use** the values from this field. The last activity calculation mechanism is disabled and the value is always the profile's creation date. The field will be removed in a future release."
    api-service-PreviousClients-apiv4:
      type: array
      description: |
        - When retrieving profile data, this field is always empty.
        - In the response after a profile merge, the format depends on the merge type.  
              This field only provides information about the last merge. If a profile in the last merge was the result of another merge in the past, the data of the previous merge isn't included.
      items:
        oneOf:
          - type: integer
            title: Merged by ID
            description: IDs of the profiles which were merged into the target profile
          - type: object
            title: Merged by customId
            description: Profiles which were merged into the target profile
            properties:
              customId:
                type: string
                description: customId of a profile merged into the target profile
    api-service-Tag-apiv4:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/api-service-TagId-apiv4"
        name:
          $ref: "#/components/schemas/api-service-TagName-apiv4"
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagColor-apiv4:
      description: Display color of the tag; hexadecimal value
      type: string
      example: "#0768ff"
    api-service-TagName-apiv4:
      description: Name of the tag
      type: string
      example: nice tag
    api-service-TagId-apiv4:
      description: ID of the tag
      type: integer
      format: int32
      example: 645
    api-service-LinkaClientdeviceRequest-apiv4:
      type: object
      required:
        - deviceId
        - type
        - registrationId
      properties:
        deviceId:
          $ref: "#/components/schemas/api-service-inBodyClientDeviceId-apiv4"
        registrationId:
          type: string
          description: Registration ID for [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)
        type:
          type: string
          description: Device type
          enum:
            - android
            - ios
            - windows
        bluetoothAddress:
          type: string
          description: Bluetooth MAC address of the device
        macAddress:
          type: string
          description: MAC address of the network adapter
        manufacturer:
          type: string
          description: Manufacturer of the device
        model:
          type: string
          description: Model of the device
        osVersion:
          type: string
          description: Operating system of the device
        product:
          type: string
          description: Additional information about the OS on the device
          example: a51ul_htc_europe
        screenHeight:
          type: integer
          format: int32
          description: Screen height in pixels
        screenWidth:
          type: integer
          format: int32
          description: Screen width in pixels
        publicKey:
          type: string
          description: Public key used to encrypt push messages
    api-service-inBodyClientDeviceId-apiv4:
      type: string
      description: Unique Android or iOS device ID
    api-service-inResponseClientDetailsArray-apiv4:
      type: array
      items:
        $ref: "#/components/schemas/api-service-inResponseClientDetails-apiv4"
    api-service-ClientChangeset-apiv4:
      type: object
      properties:
        address:
          $ref: "#/components/schemas/api-service-inBodyClientAddress-apiv4"
        agreements:
          $ref: "#/components/schemas/api-service-Agreements-apiv4"
        attributes:
          $ref: "#/components/schemas/api-service-Attributes-apiv4-apiv4"
        avatarUrl:
          $ref: "#/components/schemas/api-service-inBodyClientAvatarUrl-apiv4"
        birthDate:
          $ref: "#/components/schemas/api-service-inBodyClientBirthDate-apiv4"
        city:
          $ref: "#/components/schemas/api-service-inBodyClientCity-apiv4"
        company:
          $ref: "#/components/schemas/api-service-inBodyClientCompany-apiv4"
        countryCode:
          $ref: "#/components/schemas/api-service-inBodyClientCountryCode-apiv4"
        customId:
          $ref: "#/components/schemas/api-service-inBodyClientCustomId-apiv4"
        displayName:
          $ref: "#/components/schemas/api-service-inBodyClientDisplayName-apiv4"
        email:
          $ref: "#/components/schemas/api-service-inBodyClientEmail-apiv4"
        firstName:
          $ref: "#/components/schemas/api-service-inBodyClientFirstName-apiv4"
        lastName:
          $ref: "#/components/schemas/api-service-inBodyClientLastName-apiv4"
        phone:
          $ref: "#/components/schemas/api-service-inBodyClientPhone-apiv4"
        province:
          $ref: "#/components/schemas/api-service-inBodyClientProvince-apiv4"
        sex:
          $ref: "#/components/schemas/api-service-inBodyClientSex-apiv4"
        zipCode:
          $ref: "#/components/schemas/api-service-inBodyClientZipCode-apiv4"
    api-service-TagResponse-apiv4:
      type: object
      properties:
        businessProfileId:
          type: integer
          description: ID of the Workspace where the tag was created
          example: 100005
        id:
          $ref: "#/components/schemas/api-service-TagId-apiv4"
        name:
          $ref: "#/components/schemas/api-service-TagName-apiv4"
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagCreate-apiv4:
      type: object
      required:
        - name
      properties:
        name:
          $ref: "#/components/schemas/api-service-TagName-apiv4"
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagUpdate-apiv4:
      type: object
      properties:
        color:
          $ref: "#/components/schemas/api-service-TagColor-apiv4"
    api-service-TagAssociation-apiv4:
      type: object
      properties:
        clientId:
          $ref: "#/components/schemas/api-service-ClientId-apiv4"
        id:
          type: integer
          format: int64
          description: ID of the assignment
          example: 73
        tagId:
          type: integer
          format: int64
          description: ID of the tag
          example: 645
    api-service-GetClientevents-HTTP200-apiv4:
      type: object
      properties:
        time:
          type: string
          description: |
            Time when the event occurred. 

            This is the time that:
            - is sent as `recordedAt` to **v4/transactions/** endpoints
            - is sent as `time` to **v4/events/** endpoints
            - is the occurrence time of system events

            If the event had no time provided when sending, the time of saving in the database is used.

            If the event had a future time when sending, it was rejected and the time of saving in the database is used.

            This is the value that needs to be used as `time` (`recordedAt` in v4/transactions endpoints) when overwriting events by using eventSalt.
        action:
          type: string
          example: client.updateData
          description: The system name for the action
        label:
          $ref: "#/components/schemas/api-service-eventLabel-apiv4"
        client:
          $ref: "#/components/schemas/api-service-Client-apiv4"
        params:
          type: object
          properties:
            eventCreateTime:
              type: string
              description: |
                Time when the event was received. If the event had no time or a future time, this value is used as the time when the event occurred.

                This parameter does not exist in system events.

                When you overwrite an event with eventSalt, this value changes to the time of overwriting.
              format: date-time
              example: 2022-11-23T18:39:26.789Z
            ip:
              description: IP of the source device. This parameter does not exist in system events.
          additionalProperties:
            description: Additional properties depending on event type and custom parameters.
          description: |
            Details of the event, depending on event type and the requirements of your own system. This can be almost any type of data.

              <span style="color:red"><strong>WARNING:</strong></span>
              - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
              - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:
              <details><summary>Click to expand the list of reserved params</summary>
              <code>modifiedBy</code><br>
              <code>apiKey</code><br>
              <code>eventUUID</code><br>
              <code>ip</code><br>
              <code>time</code><br>
              <code>businessProfileId</code>
              </details>
    api-service-eventLabel-apiv4:
      type: string
      example: Human-readable label
      minLength: 1
      description: This parameter is required, but not saved in the database. It can't be used in Analytics, Automations, and so on.
    api-service-ApplicationstartedRequest-apiv4:
      allOf:
        - $ref: "#/components/schemas/api-service-EventBase-apiv4"
        - required:
            - params
          type: object
          properties:
            params:
              $ref: "#/components/schemas/api-service-ClientApplicationStartedEventParams-apiv4"
    api-service-ClientApplicationStartedEventParams-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      required:
        - applicationName
        - version
      properties:
        applicationName:
          $ref: "#/components/schemas/api-service-ApplicationName-apiv4"
        version:
          $ref: "#/components/schemas/api-service-Version-apiv4"
      additionalProperties: true
    api-service-Version-apiv4:
      type: string
      description: Version of the application which sends the event
    api-service-ApplicationName-apiv4:
      type: string
      description: Name of the application which sends the event
    api-service-EventBase-apiv4:
      type: object
      required:
        - label
        - client
      properties:
        label:
          $ref: "#/components/schemas/api-service-eventLabel-apiv4"
        client:
          $ref: "#/components/schemas/api-service-Client-apiv4"
        time:
          $ref: "#/components/schemas/api-service-Time-apiv4"
        eventSalt:
          $ref: "#/components/schemas/api-service-EventSalt-apiv4"
    api-service-DefaultParamSource-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        If you want to send a date/time param for use in analytics, take the following into account:
        - The date/time should be formatted according to ISO 8601.
        - The time zone of the workspace affects dates/times in the params that DON'T have a defined timezone. Example:
            - `2023-10-09T12:00:00` doesn't have a timezone indicator and will be considered as a time in the workspace's time zone.
            - `2023-10-09T12:00:00+02:00` has a timezone indicator (`+02:00`), so the timezone of the workspace doesn't affect it.
            - `2023-10-09T12:00:00Z` is a time in the UTC time zone (denoted by the `Z` at the end), so the timezone of the workspace doesn't affect it.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile which generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      additionalProperties: true
    api-service-ClientCartEventRequest-apiv4:
      allOf:
        - $ref: "#/components/schemas/api-service-EventBase-apiv4"
        - required:
            - params
          type: object
          properties:
            params:
              type: object
              description: |
                Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                  <span style="color:red"><strong>WARNING:</strong></span>
                  - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
                  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                  <code>modifiedBy</code><br>
                  <code>apiKey</code><br>
                  <code>eventUUID</code><br>
                  <code>ip</code><br>
                  <code>time</code><br>
                  <code>businessProfileId</code>
              required:
                - sku
                - source
                - finalUnitPrice
                - quantity
              properties:
                sku:
                  $ref: "#/components/schemas/api-service-ItemSku-apiv4"
                name:
                  $ref: "#/components/schemas/api-service-ItemName-apiv4"
                category:
                  $ref: "#/components/schemas/api-service-ItemCategory-apiv4"
                categories:
                  $ref: "#/components/schemas/api-service-ItemCategories-apiv4"
                offline:
                  $ref: "#/components/schemas/api-service-Offline-apiv4"
                source:
                  $ref: "#/components/schemas/api-service-eventSource-apiv4"
                regularUnitPrice:
                  $ref: "#/components/schemas/api-service-RegularUnitPrice-apiv4"
                discountedUnitPrice:
                  $ref: "#/components/schemas/api-service-DiscountedUnitPrice-apiv4"
                finalUnitPrice:
                  $ref: "#/components/schemas/api-service-FinalUnitPrice-apiv4"
                ItemUrlAddress:
                  $ref: "#/components/schemas/api-service-ItemUrlAddress-apiv4"
                producer:
                  $ref: "#/components/schemas/api-service-Producer-apiv4"
                quantity:
                  $ref: "#/components/schemas/api-service-Quantity-apiv4"
              additionalProperties: true
    api-service-Quantity-apiv4:
      description: The amount of goods
      type: number
    api-service-Producer-apiv4:
      type: string
      description: Manufacturer of the item
    api-service-ItemUrlAddress-apiv4:
      type: string
      description: URL address of the item page
    api-service-FinalUnitPrice-apiv4:
      description: Final price per unit. This value must be multiplied by `quantity` and added to `revenue`.
      required:
        - amount
        - currency
      type: object
      properties:
        amount:
          type: number
          minimum: 0
          description: The price of the items
          example: 3.25
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-DiscountedUnitPrice-apiv4:
      required:
        - amount
        - currency
      description: Price after discounts
      type: object
      properties:
        amount:
          type: number
          minimum: 0
          description: The amount of currency
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-RegularUnitPrice-apiv4:
      description: The regular price of the items
      required:
        - amount
        - currency
      type: object
      properties:
        amount:
          type: number
          minimum: 0
          description: The price of the items
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-Offline-apiv4:
      type: boolean
      description: Set to `true` if the event occurred outside a website, for example in a cash register
    api-service-ItemCategories-apiv4:
      type: array
      items:
        type: string
      description: If an item belongs to more than one category, include the categories in an array
    api-service-ItemCategory-apiv4:
      type: string
      description: Item category
      example: Beverages
    api-service-ItemName-apiv4:
      type: string
      description: Item name
      example: Soft drink
    api-service-CampaignHash-apiv4:
      type: string
      description: If the event results from a recommendation, this is the from the `x-Correlation-Id` header of AI Recommendations download
      example: 21e0d4b0-bd4e-497b-817b-4fr660284918
    api-service-FromRecommendation-apiv4:
      type: boolean
      description: Set to `true` if the event is triggered by an element from a recommendation.
    api-service-Products-apiv4:
      type: array
      items:
        $ref: "#/components/schemas/api-service-Product-apiv4"
      description: A list of items in the transaction
    api-service-Revenue-apiv4:
      required:
        - amount
        - currency
      type: object
      description: Transaction revenue (`net + taxes - discounts`). This field is not calculated automatically by the backend, you must provide the value by summing up the results of `finalUnitPrice * quantity` from all items in the `products` array.
      properties:
        amount:
          type: number
          minimum: 0
          description: The total amount
          example: 64.25
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-Value-apiv4:
      required:
        - amount
        - currency
      type: object
      description: If you want to display the price without tax, use this object. If you only want to display the total price of the transaction, set the values to the same as in `revenue`.
      properties:
        amount:
          type: number
          minimum: 0
          description: The total amount
          example: 112.25
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-DiscountCode-apiv4:
      description: Discount code
      type: string
    api-service-DiscountPercent-apiv4:
      description: Discount as a percentage
      type: number
      format: float
    api-service-DiscountAmount-apiv4:
      description: How much the total cost decreased
      type: object
      nullable: true
      properties:
        amount:
          type: number
          description: The discount amount
          minimum: 0
        currency:
          $ref: "#/components/schemas/api-service-Currency-apiv4"
    api-service-OrderStatus-apiv4:
      description: Status of the order
      type: string
    api-service-recommendationEventParams-apiv4:
      type: object
      description: |
        Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

        Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

        <span style="color:red"><strong>WARNING:</strong></span>
        - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
        - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
        <code>modifiedBy</code><br>
        <code>apiKey</code><br>
        <code>eventUUID</code><br>
        <code>ip</code><br>
        <code>time</code><br>
        <code>businessProfileId</code>
      properties:
        productId:
          $ref: "#/components/schemas/api-service-ItemSku-apiv4"
        name:
          $ref: "#/components/schemas/api-service-ItemName-apiv4"
        source:
          $ref: "#/components/schemas/api-service-eventSource-apiv4"
        campaignHash:
          $ref: "#/components/schemas/api-service-CampaignHash-apiv4"
        url:
          $ref: "#/components/schemas/api-service-inBodyResourceUrl-apiv4"
        category:
          $ref: "#/components/schemas/api-service-ItemCategory-apiv4"
    api-service-inBodyResourceUrl-apiv4:
      type: string
      description: URL address of the resource
    api-service-EventAction-apiv4:
      type: string
      example: context.action
      pattern: ^[a-zA-Z0-9\.\-_]{2,64}$
      description: |
        For custom events, enter your own action name. For pre-defined events, omit this field.<br>The action name can be up to 32 characters long and must match the following regular expression (ECMA flavor): `^[a-zA-Z0-9\\.\\-_]{2,64}$`
    api-service-EventType-apiv4:
      type: string
      description: |
        The type of event. If custom event, use `custom`.

        If other type, use the value that corresponds to the single event's endpoint.(for example, "content shared" events, which use the `/v4/events/shared` endpoint when sent as single events, have the type set to `shared`).
    api-service-RecommendationViewEventData-apiv4:
      type: object
      allOf:
        - type: object
          required:
            - params
          properties:
            params:
              type: object
              description: |
                Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                  <span style="color:red"><strong>WARNING:</strong></span>
                  - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
                  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                  <code>modifiedBy</code><br>
                  <code>apiKey</code><br>
                  <code>eventUUID</code><br>
                  <code>ip</code><br>
                  <code>time</code><br>
                  <code>businessProfileId</code>
              required:
                - items
                - correlationId
              properties:
                items:
                  $ref: "#/components/schemas/api-service-RecommendationItems-apiv4"
                correlationId:
                  $ref: "#/components/schemas/api-service-CorrelationId-apiv4"
                campaignId:
                  $ref: "#/components/schemas/api-service-CampaignId-apiv4"
              additionalProperties: true
        - $ref: "#/components/schemas/api-service-EventBase-apiv4"
    api-service-CampaignId-apiv4:
      type: string
      description: ID of the campaign related to the event
    api-service-CorrelationId-apiv4:
      type: string
      description: |
        `correlationId` of the request which this event relates to, for example a recommendation or search request (the parameter is included in the response to that request).
    api-service-RecommendationItems-apiv4:
      type: array
      description: An array of items included in the recommendation. The items are identified by their `itemId` (also called `sku`, `productId`, and `retailer_part_no` in other APIs and SDKs)
      minItems: 0
      items:
        $ref: "#/components/schemas/api-service-Item-apiv4"
    api-service-Item-apiv4:
      type: string
      description: itemId (also called `sku`, `productId`, and `retailer_part_no` in other APIs and SDKs) of the item
    api-service-ItemSearchClickEventData-apiv4:
      type: object
      allOf:
        - type: object
          required:
            - params
          properties:
            params:
              type: object
              description: |
                Additional parameters. Remember that you can use [event enrichment](https://hub.synerise.com/docs/assets/events/adding-event-parameters/) to add the data automatically from a catalog.

                Aside from the required parameters (if any exist), all events accept custom, free-form parameters, with the following restrictions:

                  <span style="color:red"><strong>WARNING:</strong></span>
                  - If you want to send the `email` param, it must be exactly the same as the email of the profile who generated the event.
                  - Some params are reserved for system use. If you send them in the `params` object, they are ignored or overwritten with system-assigned values:<br>
                  <code>modifiedBy</code><br>
                  <code>apiKey</code><br>
                  <code>eventUUID</code><br>
                  <code>ip</code><br>
                  <code>time</code><br>
                  <code>businessProfileId</code>
              required:
                - item
                - correlationId
                - position
                - searchType
              properties:
                item:
                  $ref: "#/components/schemas/api-service-Item-apiv4"
                correlationId:
                  $ref: "#/components/schemas/api-service-CorrelationId-apiv4"
                position:
                  $ref: "#/components/schemas/api-service-ItemPosition-apiv4"
                searchType:
                  $ref: "#/components/schemas/api-service-SearchType-apiv4"
              additionalProperties: true
        - $ref: "#/components/schemas/api-service-EventBase-apiv4"
    api-service-SearchType-apiv4:
      type: string
      description: Type of the search
      enum:
        - full-text-search
        - autocomplete
        - listing
        - visual
    api-service-ItemPosition-apiv4:
      type: integer
      description: Position of the clicked item in the result list (count starts with 1)
    crm-ClientDetails:
      type: object
      properties:
        base:
          type: object
          description: The details of a Profile
          additionalProperties:
            description: The name of a parameter
            type: object
            properties:
              label:
                type: string
                description: A name for the parameter (can be a default parameter created by Synerise or a custom one)
              value:
                description: The value of the parameter
        tags:
          type: array
          description: The Profile's tags
          items:
            type: string
    crm-CustomerCommon:
      type: object
      properties:
        uuid:
          type: string
          description: |
            UUID of the Profile

            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
          example: 07243772-008a-42e1-ba37-c3807cebde8f
        email:
          type: string
          description: |
            Profile's e-mail address

            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
        firstname:
          type: string
          description: Profile's first name
        lastName:
          type: string
          description: Profile's last name
        custom_identify:
          type: string
          description: |
            A custom ID for the Profile

            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
        company:
          type: string
          description: Profile's company
        phone:
          type: string
          description: |
            Profile's phone number

            **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
        address:
          type: string
          description: Profile's street address
        birthdate:
          type: string
          format: date
          description: Profile's date of birth. Must be a past date.
        city:
          type: string
          description: Profile's city of residence
        zipCode:
          type: string
          description: Profile's zip code
        province:
          type: string
          description: Profile's province of residence
        country_id:
          type: string
          description: ID of the Profile's country of residence
        countryCode:
          type: string
          description: Code of Profile's country of residence
          example: PL
        avatarUrl:
          type: string
          nullable: true
          description: URL of the Profile's avatar picture
        sex:
          type: string
          description: |
            Profile's sex.

            - 0: undefined
            - 1: female
            - 2: male
            - 3: other
          enum:
            - "0"
            - "1"
            - "2"
            - "3"
        tags:
          type: array
          description: Custom tags. They can be used, for example, to group Profiles.
          items:
            type: string
        additionalProperties:
          description: |
            Additional attributes, including custom attributes.

            The following attributes are reserved for system use and can't be modified:
            <details><summary>Click to expand the list of reserved attributes</summary>
            <code>email</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br><code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br><code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br><code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br><code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br><code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br><code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br><code>confirmation_hash</code><br><code>ownerId</code><br><code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_city</code><br><code>geo_loc_country</code><br><code>geo_loc_as</code><br><code>geo_loc_country_code</code><br><code>geo_loc_isp</code><br><code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>geo_loc_org</code><br><code>geo_loc_query</code><br><code>geo_loc_region</code><br><code>geo_loc_region_name</code><br><code>geo_loc_status</code><br><code>geo_loc_timezone</code><br><code>geo_loc_zip</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>status</code>
            </details>
    morph-HttpErrorDetails:
      type: object
      required:
        - error
        - status
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the error occurred
        message:
          type: string
          description: Description of the problem. If an error code is included, check the [API Error Reference](https://developers.synerise.com/errors.html) for details.
    morph-ExportResponse:
      type: object
      required:
        - taskId
        - columnOrder
        - estimatedCount
      properties:
        taskId:
          type: string
          format: uuid
          description: ID of the submitted task. Save this ID to be able to retrieve the data.
        columnOrder:
          type: array
          description: Fields included in the export
          items:
            type: string
            description: Name of an exported attribute/tag/analysis
        estimatedCount:
          type: number
          description: Estimated number of profiles in the exported segment
    morph-NewProfileExport:
      type: object
      required:
        - name
        - fields
        - agreementFilter
        - segmentationHash
        - excludedIds
      properties:
        name:
          type: string
          description: Name of the export, visible at [https://app.synerise.com/assets/](https://app.synerise.com/assets/exports)
        fields:
          type: array
          example:
            - id
            - attr1
            - attr2
          minItems: 1
          items:
            type: string
          description: |
            Profile attributes to export.

            **The first attribute in this array MUST BE `id`**
        agreementFilter:
          type: string
          enum:
            - NONE
            - EMAIL
            - WEB_PUSH
            - PUSH
            - SMS
            - RECOGNIZED
            - ANONYMOUS
          description: You can filter the profiles by their marketing agreement. `NONE` means no filter.
        segmentationHash:
          type: string
          format: uuid
          description: UUID of the segmentation which defines the profiles to export. The segmentation conditions are checked at the time of sending the "create and run export" request.
        tags:
          type: array
          description: Profile tags to check for an exported profile. In the results, the tag name is the key and the value is "true" (string) if the tag is assigned to a given profile, otherwise it's "false".
          items:
            type: string
        expressions:
          type: array
          description: UUIDs of expressions to check for an exported profile. In the results, the name of the expression is the key and the value is the result of the expression.
          items:
            type: string
            format: uuid
        aggregates:
          type: array
          description: UUIDs of aggregates to check for an exported profile. In the results, the name of the aggregate is the key and the value is the result of the aggregate.
          items:
            type: string
            format: uuid
        segmentations:
          type: array
          description: UUIDs of segmentations to check for an exported profile. In the results, the name of the segmentation is the key and the value is "true" (string) if the profile belongs to the segmentation, otherwise it's "false".
          items:
            type: string
            format: uuid
        excludedIds:
          type: array
          minItems: 0
          items:
            type: number
          description: List of clientIds to exclude from the exported data
    morph-JobStatus:
      type: string
      description: High-level status of the job. If a given type of job doesn't exist in a workflow (for example, `transformData` in a workflow without any Data Transformation nodes), the status is `Pending`.
      enum:
        - Pending
        - InProgress
        - Finished
        - Failed
        - Warning
      example: Pending
    notes-service-NoteResponse:
      type: object
      description: The content and metadata of the note
      properties:
        body:
          type: string
          description: Text of the note
          example: <h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n
        created:
          type: string
          format: date-time
          description: Creation time
          example: 2019-08-01T08:03:31.556Z
        createdBy:
          type: string
          description: ID of the Synerise User who created the note
          example: example@example.com
        id:
          type: string
          description: UUID of the note
          example: 69b0e925-086a-4964-b8dc-4c9e58213cf5
        subject:
          type: string
          description: The title of the note
          example: Note 1
        updated:
          type: string
          format: date-time
          description: Last update time
          example: 2019-08-01T08:03:38.556Z
        updatedBy:
          type: string
          description: ID of the last user who updated the note
          example: example@example.com
        userId:
          type: integer
          format: int64
          description: Numerical ID of the last user who updated the note
          example: 11405
    notes-service-NoteRequest:
      type: object
      description: The content of the note
      properties:
        subject:
          type: string
          description: The title of the note
          example: Note 1
        body:
          type: string
          description: Text of the note
          example: <h1>NOTE 1</h1>\n<p>Some text</p>\n<ul>\n<li>1</li>\n<li>2</li>\n<li>3</li>\n</ul>\n<blockquote>Lorem ipsum in quote</blockquote>\n<p><strong>Lorem ipsum in bold</strong></p>\n
    push-devices-service-WebPushCleanupRequest:
      oneOf:
        - type: object
          title: By update time
          required:
            - type
            - updated
          properties:
            type:
              type: string
              enum:
                - BY_UPDATED_BEFORE
            updated:
              $ref: "#/components/schemas/push-devices-service-Updated"
        - type: object
          title: By version
          required:
            - type
            - version
          properties:
            type:
              type: string
              enum:
                - BY_VERSION
            version:
              type: string
              example: 0.0.1
              description: Tokens with this service worker version will be deleted.
    push-devices-service-Updated:
      type: string
      description: Tokens updated before this date will be deleted.
      format: date-time
    push-devices-service-MobilePushCleanupRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - BY_UPDATED_BEFORE
        updated:
          $ref: "#/components/schemas/push-devices-service-Updated"
      required:
        - type
        - updated
    push-devices-service-HTTP400:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: Additional details of the errors, if applicable
          items:
            $ref: "#/components/schemas/push-devices-service-Error"
    push-devices-service-Error:
      type: object
      properties:
        code:
          type: integer
          format: int32
          example: 12082
          description: A numeric identifier of the error type
        field:
          type: string
          example: countryCode
          description: Field in the request body that caused the error
        message:
          type: string
          example: Country Code must have 0 or 3 characters as per ISO format.
          description: A detailed description of the problem
        rejectedValue:
          type: string
          example: Poland
          description: The value that caused the error
    push-devices-service-LinkaClientdeviceRequest:
      type: object
      required:
        - deviceId
        - type
        - registrationId
      properties:
        deviceId:
          $ref: "#/components/schemas/push-devices-service-inBodyClientDeviceId"
        registrationId:
          type: string
          description: Registration ID for [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)
        type:
          type: string
          description: Device type
          enum:
            - android
            - ios
            - windows
        bluetoothAddress:
          type: string
          description: Bluetooth MAC address of the device
        macAddress:
          type: string
          description: MAC address of the network adapter
        manufacturer:
          type: string
          description: Manufacturer of the device
        model:
          type: string
          description: Model of the device
        osVersion:
          type: string
          description: Operating system of the device
        product:
          type: string
          description: Additional information about the OS on the device
          example: a51ul_htc_europe
        screenHeight:
          type: integer
          format: int32
          description: Screen height in pixels
        screenWidth:
          type: integer
          format: int32
          description: Screen width in pixels
        publicKey:
          type: string
          description: Public key used to encrypt push messages
    push-devices-service-inBodyClientDeviceId:
      type: string
      description: Unique Android or iOS device ID
    sauth-4xx-base:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        message:
          type: string
          description: Description of the problem
        errors:
          type: array
          description: An array of detailed error messages, if applicable
          items:
            type: object
            properties:
              code:
                type: integer
                description: Error code
              field:
                type: string
                description: Name of the field that did not pass validation
              message:
                type: string
                description: Details of the problem
              rejectedValue:
                description: The value that did not pass validation
                anyOf:
                  - type: string
                  - type: number
                  - type: integer
                  - type: boolean
                  - type: array
                    items: {}
                  - type: object
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        path:
          type: string
          description: URL of the requested resource
        traceId:
          type: string
          description: ID for debugging
    sauth-RegisterAClientRequestBody:
      type: object
      properties:
        email:
          $ref: "#/components/schemas/sauth-inBodyClientEmail"
        password:
          type: string
          description: Password for the Profile
        phone:
          $ref: "#/components/schemas/sauth-inBodyClientPhone"
        customId:
          $ref: "#/components/schemas/sauth-inBodyClientCustomId"
        firstName:
          $ref: "#/components/schemas/sauth-inBodyClientFirstName"
        lastName:
          $ref: "#/components/schemas/sauth-inBodyClientLastName"
        displayName:
          $ref: "#/components/schemas/sauth-inBodyClientDisplayName"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        avatarUrl:
          $ref: "#/components/schemas/sauth-inBodyClientAvatarUrl"
        whatsAppId:
          type: string
          description: WhatsApp identifier of the Profile
          maxLength: 255
        birthDate:
          $ref: "#/components/schemas/sauth-inBodyClientBirthDate"
        company:
          $ref: "#/components/schemas/sauth-inBodyClientCompany"
        city:
          $ref: "#/components/schemas/sauth-inBodyClientCity"
        address:
          $ref: "#/components/schemas/sauth-inBodyClientAddress"
        zipCode:
          $ref: "#/components/schemas/sauth-inBodyClientZipCode"
        province:
          $ref: "#/components/schemas/sauth-inBodyClientProvince"
        countryCode:
          $ref: "#/components/schemas/sauth-inBodyClientCountryCode"
        sex:
          $ref: "#/components/schemas/sauth-inBodyClientSex"
        agreements:
          $ref: "#/components/schemas/sauth-Agreements"
        attributes:
          $ref: "#/components/schemas/sauth-Attributes"
        tags:
          $ref: "#/components/schemas/sauth-Tags"
    sauth-Tags:
      type: array
      description: Tags can be used to group Profile accounts.
      items:
        type: string
    sauth-Attributes:
      type: object
      description: |
        Custom attributes (with any names)

        <strong><span style="color:red">WARNING<span></strong>: Some attributes cannot be sent in this object and will be ignored. Some of these are reserved for system use, and others must be sent as properties of the profile in the root object of the request body instead of inside the `attributes` object.

        <details><summary><span style="background:red;color:white">Click to expand the list of reserved attributes</span></summary>
        <code>email</code><br><code>id</code><br><code>clientId</code><br><code>phone</code><br><code>customId</code><br><code>uuid</code><br><code>firstName</code><br><code>lastName</code><br>
        <code>displayName</code><br><code>company</code><br><code>address</code><br><code>city</code><br><code>province</code><br><code>zipCode</code><br><code>countryCode</code><br>
        <code>birthDate</code><br><code>sex</code><br><code>avatarUrl</code><br><code>anonymous</code><br><code>agreements</code><br><code>tags</code><br><code>businessProfileId</code><br>
        <code>time</code><br><code>ip</code><br><code>source</code><br><code>newsletter_agreement</code><br><code>custom_identify</code><br><code>firstname</code><br>
        <code>lastname</code><br><code>created</code><br><code>updated</code><br><code>last_activity_date</code><br><code>birthdate</code><br><code>external_avatar_url</code><br>
        <code>displayname</code><br><code>receive_smses</code><br><code>receive_push_messages</code><br><code>receive_webpush_messages</code><br>
        <code>receive_btooth_messages</code><br><code>receive_rfid_messages</code><br><code>receive_wifi_messages</code><br><code>receive_whatsapp_messages</code><br><code>whatsapp_id</code><br>
        <code>zipCode</code><br><code>anonymous_type</code><br><code>country_id</code><br><code>geo_loc_country</code><br><code>geo_loc_isp</code><br>
        <code>geo_loc_lat</code><br><code>geo_loc_lon</code><br><code>club_card_id</code><br><code>type</code><br><code>confirmed</code><br><code>facebookId</code><br><code>deletedAt</code><br><code>deleted_unique</code><br><code>status</code><br><code>recognized</code><br><code>previous_clients</code><br><code>testProfile</code><br>
        <code>apikey</code><br><code>apiKey</code><br><code>ApiKey</code><br><code>Apikey</code><br><code>tracker</code><br><code>snr_sdk_version</code><br>
        <code>eventCreateTime</code><br><code>correlationId</code>
        </details>
      additionalProperties:
        description: Can be numbers, strings, or booleans.
    sauth-Agreements:
      description: |-
        Marketing agreements of the Profile.

        You can also pass the values as strings (`"true"`;`"TRUE"`;`"True"`/`"false"`;`"FALSE"`;`"False"`) or integers (`1` for true and `0` for false).
      type: object
      properties:
        email:
          type: boolean
          description: Permission to receive marketing information by email
          default: true
        sms:
          type: boolean
          description: Permission to receive marketing information by SMS
          default: true
        push:
          type: boolean
          description: Permission to receive push notifications
          default: true
        bluetooth:
          type: boolean
          deprecated: true
          description: This field is ignored.
          default: false
        rfid:
          type: boolean
          deprecated: true
          description: This field is ignored.
          default: false
        wifi:
          type: boolean
          deprecated: true
          description: This field is ignored.
          default: false
        whatsApp:
          type: boolean
          description: Permission to receive WhatsApp messages
          default: false
      example:
        email: true
        sms: true
        push: true
        bluetooth: false
        rfid: false
        wifi: false
    sauth-inBodyClientSex:
      type: string
      description: Profile's sex
      enum:
        - FEMALE
        - MALE
        - NOT_SPECIFIED
        - OTHER
    sauth-inBodyClientCountryCode:
      type: string
      description: Code of Profile's country of residence (Alpha-2 code according to ISO 3166-1)
      example: PL
    sauth-inBodyClientProvince:
      type: string
      description: Profile's province of residence
    sauth-inBodyClientZipCode:
      type: string
      description: Profile's zip code
    sauth-inBodyClientAddress:
      type: string
      description: Profile's street address
    sauth-inBodyClientCity:
      type: string
      description: Profile's city of residence
    sauth-inBodyClientCompany:
      type: string
      description: Profile's company
    sauth-inBodyClientBirthDate:
      type: string
      description: Profile's date of birth
    sauth-inBodyClientAvatarUrl:
      type: string
      nullable: true
      description: URL of the Profile's avatar picture
    sauth-inBodyClientUuid:
      type: string
      description: UUID of the Profile
      example: 07243772-008a-42e1-ba37-c3807cebde8f
    sauth-inBodyClientDisplayName:
      type: string
      description: Currently unused
    sauth-inBodyClientLastName:
      type: string
      description: Profile's last name
    sauth-inBodyClientFirstName:
      type: string
      description: Profile's first name
    sauth-inBodyClientCustomId:
      type: string
      description: Profile's custom ID
    sauth-inBodyClientPhone:
      type: string
      description: Phone number of the Profile. Can only include digits, spaces, and an optional `+` at the beginning
      example: "+48111222333"
    sauth-inBodyClientEmail:
      type: string
      description: Profile's email address
    sauth-PinCodeConfirmationRequest:
      type: object
      properties:
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        email:
          $ref: "#/components/schemas/sauth-inBodyClientEmail"
        pinCode:
          type: string
          description: The PIN code received by email
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
    sauth-inBodyClientDeviceId:
      type: string
      description: |
        Unique Android or iOS device ID.

        We recommend sending this attribute every time, to assign a web push registration to the device.

        Required when any form of [unknown device control](https://hub.synerise.com/docs/settings/tool/iam-for-apps/access/#unknown-device-control) is enabled.
    sauth-ClientPinActivationResendRequest:
      type: object
      properties:
        email:
          $ref: "#/components/schemas/sauth-inBodyClientEmail"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
      title: ClientPinActivationResendRequest
    sauth-ConfirmAClientAccountRequestBody:
      type: object
      description: Activation token received by email
      properties:
        token:
          description: Activation token received by email
          type: string
    sauth-ClientActivationResendRequest:
      type: object
      properties:
        email:
          type: string
          description: Email address
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        uuid:
          type: string
          description: UUID of the Client
    sauth-RequestClientpasswordresetRequest:
      required:
        - email
      type: object
      properties:
        email:
          type: string
          description: Email address where the password reset link will be sent
      example:
        email: testDoc@example.com
    sauth-ConfirmClientpasswordresetRequest:
      required:
        - password
        - token
      type: object
      properties:
        password:
          type: string
          description: New password
        token:
          type: string
          description: Token received by email
      example:
        password: testPass1!
        token: token_from_pass_reset_req
    sauth-ChangeClientPasswordRequestBody:
      type: object
      properties:
        oldPassword:
          type: string
          description: Current password
        password:
          type: string
          description: New password
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-DeleteAccountV2RequestBody:
      type: object
      required:
        - password
        - identityProvider
      properties:
        password:
          type: string
          description: Profile password. Only applicable if the Profile is **not** authenticated by an external identity provider.
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        externalToken:
          type: string
          description: External authorization token. Only applicable if the Profile is authenticated by an external identity provider.
        customId:
          type: string
          description: Custom ID of the Profile, if applicable
        identityProvider:
          type: string
          enum:
            - FACEBOOK
            - OAUTH
            - APPLE
            - SYNERISE
          description: Authorization provider
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-GenericClientEmailChangeRequest:
      type: object
      required:
        - email
        - uuid
      properties:
        email:
          description: New email address
          type: string
        externalToken:
          type: string
          description: External authorization token. Only applicable if the Profile is authenticated by an external identity provider.
        password:
          type: string
          description: Profile password. Only applicable if the Profile is **not** authenticated by an external identity provider.
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        customId:
          type: string
          description: Custom ID of the Profile, if applicable
      title: GenericClientEmailChangeRequest
    sauth-ClientLogoutRequest:
      type: object
      properties:
        action:
          type: string
          enum:
            - LOGOUT
            - LOGOUT_WITH_SESSION_CLEARING
    sauth-ConfirmClientEmailChangeRequestBody:
      type: object
      properties:
        token:
          type: string
          format: uuid
          example: 58acd5bd-8efd-47ed-b101-32eb56e13839
          description: Token received by email
        newsletterAgreement:
          type: boolean
          description: Permission to receive email newsletters
    sauth-ClientEmailChangeRequest:
      type: object
      properties:
        email:
          type: string
          description: New email address
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-DeleteOauthClientRequestBody:
      type: object
      properties:
        accessToken:
          type: string
          description: OAuth access token
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        customId:
          $ref: "#/components/schemas/sauth-inBodyClientCustomId"
    sauth-DeleteAppleClientRequestBody:
      type: object
      properties:
        accessToken:
          type: string
          description: Apple access token
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
        customId:
          $ref: "#/components/schemas/sauth-inBodyClientCustomId"
    sauth-DeleteAFacebookClientAccountRequestBody:
      type: object
      properties:
        facebookToken:
          type: string
          description: Facebook authentication token
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-DeleteAccountV1RequestBody:
      type: object
      properties:
        password:
          type: string
          description: Profile password
        uuid:
          type: string
          description: Profile UUID
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
    sauth-RequestClientEmailChangeRequestBody:
      type: object
      properties:
        email:
          type: string
          description: New email address
        password:
          type: string
          description: Profile password
        uuid:
          $ref: "#/components/schemas/sauth-inBodyClientUuid"
        deviceId:
          $ref: "#/components/schemas/sauth-inBodyClientDeviceId"
  parameters:
    api-service-apiVersionHeader-apiv4:
      name: Api-Version
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - "4.4"
    api-service-contentTypeHeader-apiv4:
      name: Content-Type
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    api-service-acceptHeader-apiv4:
      name: Accept
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    api-service-pathTargetCustomId-apiv4:
      name: targetCustomID
      in: path
      description: The custom ID of the profile to merge the `sourceCustomIDs` into
      required: true
      schema:
        type: string
        example: customIdExample
    api-service-pathClientCustomIds-apiv4:
      name: sourceCustomIDs
      in: path
      description: Comma-delimited string with custom IDs of the profiles to merge
      required: true
      schema:
        type: string
        example: customIdExample,customIdExample2,customIdExample3,customIdExample4,customIdExample5
    api-service-pathToClientId-apiv4:
      name: toClientId
      in: path
      description: The ID of the profile to merge the `fromClientIds` into
      required: true
      schema:
        type: integer
        format: int64
        example: 434428563
    api-service-pathFromClientIds-apiv4:
      name: fromClientIds
      in: path
      description: Comma-delimited string with client IDs of the profiles to merge
      required: true
      schema:
        type: string
        example: 434428563,33322211,232212342
    api-service-pathClientId-apiv4:
      name: clientId
      in: path
      description: |
        The ID of the profile

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      required: true
      schema:
        type: integer
        format: int64
        example: 434428563
    api-service-pathClientEmail-apiv4:
      name: clientEmail
      in: path
      description: |
        The profile's email address

        - Must match the pattern (ECMA flavor): `/^(([^<>()[\]\\.,;:\s@\\"]+(\.[^<>()[\]\\.,;:\s@\\"]+)*)|(\\".+\\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/`
        - The value can't include any characters that match the patternn (ECMA flavor): `/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\r\n\u2028\u2029\u00AD]|[\uFE00-\uFE0F]|[\u0000])/`

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      required: true
      schema:
        type: string
        example: clientemail@synerise.com
    api-service-pathClientCustomId-apiv4:
      name: customId
      in: path
      description: |
        The custom ID of the profile

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      required: true
      schema:
        type: string
        example: customIdExample
    api-service-pathIdentifierValue-apiv4:
      name: identifierValue
      in: path
      description: |
        The value of the selected identifier. It must be URL-encoded.

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      required: true
      schema:
        type: string
    api-service-pathTagId-apiv4:
      name: tagID
      in: path
      description: ID of the tag
      required: true
      schema:
        type: integer
        example: 645
    api-service-queryEventsLimit-apiv4:
      in: query
      name: limit
      description: The number of events to retrieve
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 500
    api-service-queryAction-apiv4:
      in: query
      name: action
      description: Filter events by action type. For example, to retrieve completed transactions, enter `transaction.charge`
      required: false
      schema:
        type: string
        example: transaction.charge
    api-service-queryDateTo-apiv4:
      in: query
      name: time[to]
      description: End of the time range to query. UTC time in ISO 8601 (for example, `2020-10-19T13:47:53Z`). If no value is provided, the current time applies.
      required: false
      schema:
        type: string
        format: date-time
    api-service-queryDateFrom-apiv4:
      in: query
      name: time[from]
      description: Start of the time range to query. UTC time in ISO 8601 (for example, `2020-10-19T13:47:53Z`). If no value is provided, the results are returned starting with the oldest entry in the database.
      required: false
      schema:
        type: string
        format: date-time
    crm-pathClientId:
      name: clientId
      in: path
      description: |
        Profile ID

        **Upcoming breaking change (effective July 6, 2026):** Synerise is introducing changes to how user identifiers and UUIDs are handled. These changes may affect profiles with accented or diacritical characters in identifiers, profiles with leading or trailing whitespace in identifiers, and profiles with duplicate UUIDs. For details and recommended actions, see [Upcoming changes to identifier and UUID handling](https://hub.synerise.com/docs/settings/configuration/identifier-standardization/).
      required: true
      schema:
        type: integer
    notes-service-profileId:
      in: path
      name: clientId
      required: true
      description: Profile ID
      schema:
        type: integer
        format: int64
    push-devices-service-pathClientId:
      name: clientId
      description: Unique identifier of a profile
      in: path
      required: true
      schema:
        type: integer
        format: int64
    push-devices-service-acceptHeader:
      name: Accept
      in: header
      required: true
      style: simple
      explode: false
      schema:
        type: string
        enum:
          - application/json
    push-devices-service-pathIdentifierValue:
      name: identifierValue
      in: path
      description: The value of the selected identifier
      required: true
      schema:
        type: string
    sauth-pathClientId:
      name: clientID
      in: path
      description: The ID of the Profile
      required: true
      schema:
        type: string
        example: "434428563"
  responses:
    api-service-415-apiv4:
      description: Unsupported Media Type
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            timestamp: 2018-06-07T07:27:23.136+00:00
            status: 415
            error: Unsupported Media Type
            message: Content type 'application/xml' not supported
            path: /path_of_the_endpoint
    api-service-404-pii:
      description: Profile not found or access blocked by PII protection settings
      content:
        application/json:
          schema:
            type: string
            description: Description of the problem. If the access is blocked by insufficient PII permissions, the message is the same as when the profile doesn't exist.
            example: Client 5005535044 not found
    api-service-403-apiv4:
      description: Forbidden; insufficient permissions (when PII protection is enabled, PII permissions are required in addition to the permissions listed in the method description)
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            timestamp: 2018-06-07T07:29:27.489+00:00
            status: 403
            error: Forbidden
            message: Forbidden
            path: /path_of_the_endpoint
    api-service-401-apiv4:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            error: Bad Request
            status: 400
            timestamp: 2020-10-29T13:08:16.235Z
            path: /exampleEndpoint
            message: Some fields did not pass validation
            errors:
              - code: 120
                field: exampleField
                message: "120"
                rejectedValue: exampleValue
    api-service-400-apiv4:
      description: "Bad request: input data missing or malformed"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/api-service-HTTP400-apiv4"
          example:
            timestamp: 2018-06-07T07:28:26.078+00:00
            status: 400
            error: Bad Request
            message: Version header content is invalid
            path: /path_of_the_endpoint
    crm-404-pii:
      description: Resource not found or access blocked by PII protection settings
      content:
        text/plain:
          schema:
            type: string
            description: Description of the problem
    morph-BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/morph-HttpErrorDetails"
          example:
            error: Bad Request
            status: 400
            timestamp: 2021-01-04T16:15:51.703Z
            message: Message describing issue with provided request
    push-devices-service-4xx:
      description: See error message for details
      content:
        application/json:
          schema:
            type: object
            properties:
              httpStatus:
                type: integer
                description: HTTP status of the error
              errorCode:
                type: string
                description: Code of the error. See [https://developers.synerise.com/errors.html](https://developers.synerise.com/errors.html)
              timestamp:
                type: string
                format: date/time
                description: Time when the error occurred
              message:
                type: string
                description: Short summary of the error
              traceId:
                type: string
                description: Trace ID for debugging
    push-devices-service-415:
      description: Unsupported Media Type
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/push-devices-service-HTTP400"
          example:
            timestamp: 2018-06-07T07:27:23.136+00:00
            status: 415
            error: Unsupported Media Type
            message: Content type 'application/xml' not supported
            path: /path_of_the_endpoint
    push-devices-service-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/push-devices-service-HTTP400"
          example:
            timestamp: 2018-06-07T07:29:27.489+00:00
            status: 403
            error: Forbidden
            message: Forbidden
            path: /path_of_the_endpoint
    push-devices-service-401:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/push-devices-service-HTTP400"
          example:
            error: Bad Request
            status: 400
            timestamp: 2020-10-29T13:08:16.235Z
            path: /exampleEndpoint
            message: Some fields did not pass validation
            errors:
              - code: 120
                field: exampleField
                message: "120"
                rejectedValue: exampleValue
    sauth-403-forbidden:
      description: Insufficient permissions or wrong JWT scope (for example, profile token where a workspace token was required)
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
    sauth-401-unauthorized:
      description: JWT missing, expired, or invalid
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
    sauth-403-invalid-credentials-in-body:
      description: Invalid credentials in request body
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
    sauth-400-malformed:
      description: Request body malformed/invalid
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/sauth-4xx-base"
