openapi: 3.0.0
info:
  title: Organizations - 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: Consumption
  - name: Organization workspaces
x-tagGroups:
  - name: Organizations
    tags:
      - Consumption
      - Organization workspaces
paths:
  /business-profile-service/organizations/usage/stats/newDataPoints:
    post:
      operationId: generateDailyNewDataPointsStats
      summary: Get consumption metric with new data points
      description: |
        Retrieve the number of new events (events added to the database on a particular day), listed by day. You can limit the metric to particular workspaces and event types (actions).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <span title="Contact support">Organization</span>
      security:
        - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/business-profile-service-OrganizationDailyUsageReportRequest"
      responses:
        "200":
          description: Statistics of new events for the specified date range
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/business-profile-service-DailyUsageStats"
        "401":
          $ref: "#/components/responses/business-profile-service-401-bpservice"
        "403":
          $ref: "#/components/responses/business-profile-service-403-bpservice"
        4xx:
          $ref: "#/components/responses/business-profile-service-4xx-bpservice"
      tags:
        - Consumption
      x-snr-doc-urls:
        - /api-reference/organizations#tag/Consumption/operation/generateDailyNewDataPointsStats
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/business-profile-service/organizations/usage/stats/newDataPoints \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"from":"2025-05-29","to":"2025-05-30","actions":["page.visit"],"bpGuids":["34eea35e-3ac4-44f4-95b5-fd00a3b45eff"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}"

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

            conn.request("POST", "/business-profile-service/organizations/usage/stats/newDataPoints", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "from": "2025-05-29",
              "to": "2025-05-30",
              "actions": [
                "page.visit"
              ],
              "bpGuids": [
                "34eea35e-3ac4-44f4-95b5-fd00a3b45eff"
              ]
            });

            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/business-profile-service/organizations/usage/stats/newDataPoints");
            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": "/business-profile-service/organizations/usage/stats/newDataPoints",
              "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({
              from: '2025-05-29',
              to: '2025-05-30',
              actions: ['page.visit'],
              bpGuids: ['34eea35e-3ac4-44f4-95b5-fd00a3b45eff']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/business-profile-service/organizations/usage/stats/newDataPoints');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"from":"2025-05-29","to":"2025-05-30","actions":["page.visit"],"bpGuids":["34eea35e-3ac4-44f4-95b5-fd00a3b45eff"]}');

            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/business-profile-service/organizations/usage/stats/newDataPoints")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}")
              .asString();
  /business-profile-service/organizations/usage/stats/retentionDataPoints:
    post:
      operationId: generateDailyRetentionDataPointsStats
      summary: Get consumption metric with retention data points
      description: |
        Retrieve the number of events kept in the database, listed by day. This includes events saved in the past, which currently exist in the database according to their retention period. 

        You can limit the metric to particular workspaces and event types (actions).


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <span title="Contact support">Organization</span>
      security:
        - JWT: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/business-profile-service-OrganizationDailyUsageReportRequest"
      responses:
        "200":
          description: Statistics of retention events for the specified date range
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/business-profile-service-RetentionUsageStats"
        "401":
          $ref: "#/components/responses/business-profile-service-401-bpservice"
        "403":
          $ref: "#/components/responses/business-profile-service-403-bpservice"
        4xx:
          $ref: "#/components/responses/business-profile-service-4xx-bpservice"
      tags:
        - Consumption
      x-snr-doc-urls:
        - /api-reference/organizations#tag/Consumption/operation/generateDailyRetentionDataPointsStats
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/business-profile-service/organizations/usage/stats/retentionDataPoints \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"from":"2025-05-29","to":"2025-05-30","actions":["page.visit"],"bpGuids":["34eea35e-3ac4-44f4-95b5-fd00a3b45eff"]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            payload = "{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}"

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

            conn.request("POST", "/business-profile-service/organizations/usage/stats/retentionDataPoints", payload, headers)

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

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "from": "2025-05-29",
              "to": "2025-05-30",
              "actions": [
                "page.visit"
              ],
              "bpGuids": [
                "34eea35e-3ac4-44f4-95b5-fd00a3b45eff"
              ]
            });

            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/business-profile-service/organizations/usage/stats/retentionDataPoints");
            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": "/business-profile-service/organizations/usage/stats/retentionDataPoints",
              "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({
              from: '2025-05-29',
              to: '2025-05-30',
              actions: ['page.visit'],
              bpGuids: ['34eea35e-3ac4-44f4-95b5-fd00a3b45eff']
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/business-profile-service/organizations/usage/stats/retentionDataPoints');
            $request->setMethod(HTTP_METH_POST);

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

            $request->setBody('{"from":"2025-05-29","to":"2025-05-30","actions":["page.visit"],"bpGuids":["34eea35e-3ac4-44f4-95b5-fd00a3b45eff"]}');

            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/business-profile-service/organizations/usage/stats/retentionDataPoints")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"from\":\"2025-05-29\",\"to\":\"2025-05-30\",\"actions\":[\"page.visit\"],\"bpGuids\":[\"34eea35e-3ac4-44f4-95b5-fd00a3b45eff\"]}")
              .asString();
  /business-profile-service/business-profiles:
    get:
      tags:
        - Organization workspaces
      summary: Get universal list of organization workspaces
      operationId: getBusinessProfilesUniversalList
      description: |
        Retrieve a universal list of workspaces available to the user.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      parameters:
        - $ref: "#/components/parameters/business-profile-service-listPage"
        - $ref: "#/components/parameters/business-profile-service-listLimit"
        - name: favorite
          in: query
          required: false
          schema:
            type: boolean
        - $ref: "#/components/parameters/business-profile-service-listSearch"
        - name: sortBy
          in: query
          schema:
            type: string
            default: CREATED:ASC
            enum:
              - ID:ASC
              - ID:DESC
              - NAME:ASC
              - NAME:DESC
              - CREATED:ASC
              - CREATED:DESC
              - FAVORITE:ASC
              - FAVORITE:DESC
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/business-profile-service-UniversalListBusinessProfilesResponse"
      x-snr-doc-urls:
        - /api-reference/organizations#tag/Organization-workspaces/operation/getBusinessProfilesUniversalList
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("GET", "/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE")

            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/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE");

            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": "/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE",
              "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/business-profile-service/business-profiles');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'favorite' => 'SOME_BOOLEAN_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'sortBy' => 'SOME_STRING_VALUE'
            ]);

            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/business-profile-service/business-profiles?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&favorite=SOME_BOOLEAN_VALUE&search=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE")
              .asString();
  /business-profile-service/organizations/workspaces:
    get:
      summary: Get all workspaces from organization
      description: |
        Retrieve a list of all workspaces in an organization.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <span title="Contact support">Organization</span>
      tags:
        - Organization workspaces
      operationId: getWorkspacesOfOrganization
      responses:
        "200":
          description: List of workspaces
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/business-profile-service-OrganizationWorkspacesResponse"
      x-snr-doc-urls:
        - /api-reference/organizations#tag/Organization-workspaces/operation/getWorkspacesOfOrganization
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/business-profile-service/organizations/workspaces
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("GET", "/business-profile-service/organizations/workspaces")

            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/business-profile-service/organizations/workspaces");

            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": "/business-profile-service/organizations/workspaces",
              "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/business-profile-service/organizations/workspaces');
            $request->setMethod(HTTP_METH_GET);

            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/business-profile-service/organizations/workspaces")
              .asString();
  /business-profile-service/organizations/business-profiles/with-identifiers:
    get:
      tags:
        - Organization workspaces
      summary: Get universal list of organization workspaces with profile identifiers
      operationId: getBusinessProfilesWithIdentifiersForOrganizationUserUniversalList
      description: |
        Retrieve a universal list of workspaces in context of the current user; with profile identifiers used in each workspace.

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>
      parameters:
        - $ref: "#/components/parameters/business-profile-service-listPage"
        - $ref: "#/components/parameters/business-profile-service-listLimit"
        - name: businessProfileGroupId
          in: query
          required: false
          description: Workspace group to filter by.
          schema:
            type: string
        - name: sortBy
          in: query
          required: false
          schema:
            type: string
            default: NAME:ASC
            enum:
              - NAME:ASC
              - NAME:DESC
              - CREATED:ASC
              - CREATED:DESC
        - name: search
          in: query
          required: false
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/business-profile-service-UniversalListBusinessProfilesForOrganizationWithIdentifiersUserResponse"
      x-snr-doc-urls:
        - /api-reference/organizations#tag/Organization-workspaces/operation/getBusinessProfilesWithIdentifiersForOrganizationUserUniversalList
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE'
        - lang: Python
          label: Python
          source: |-
            import http.client

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

            conn.request("GET", "/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE")

            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/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE");

            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": "/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE",
              "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/business-profile-service/organizations/business-profiles/with-identifiers');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'limit' => 'SOME_INTEGER_VALUE',
              'businessProfileGroupId' => 'SOME_STRING_VALUE',
              'sortBy' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE'
            ]);

            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/business-profile-service/organizations/business-profiles/with-identifiers?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&businessProfileGroupId=SOME_STRING_VALUE&sortBy=SOME_STRING_VALUE&search=SOME_STRING_VALUE")
              .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:
    business-profile-service-ErrorErrorsArray:
      type: array
      description: Details of the problems
      items:
        type: object
        properties:
          errorCode:
            $ref: "#/components/schemas/business-profile-service-ErrorCode"
          message:
            $ref: "#/components/schemas/business-profile-service-ErrorMessage"
          details:
            type: object
            description: Details of the problem, if applicable.
          source:
            type: object
            description: Properties that caused a problem, if applicable.
            properties:
              parameter:
                type: string
                description: The name of the property that caused an error
    business-profile-service-ErrorMessage:
      type: string
      description: Description of the problem
    business-profile-service-ErrorCode:
      type: string
      description: Synerise error code. See [error reference](https://developers.synerise.com/errors.html).
    business-profile-service-ErrorTimestamp:
      type: string
      format: date-time
      description: Time when the error occurred
    business-profile-service-ErrorStatus:
      type: integer
      description: HTTP status of the response
    business-profile-service-AuthError:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/business-profile-service-ErrorStatus"
        error:
          $ref: "#/components/schemas/business-profile-service-ErrorCode"
        message:
          $ref: "#/components/schemas/business-profile-service-ErrorMessage"
        timestamp:
          $ref: "#/components/schemas/business-profile-service-ErrorTimestamp"
    business-profile-service-DailyUsageStats:
      type: object
      properties:
        dailyUsageStatistics:
          $ref: "#/components/schemas/business-profile-service-UsageStatsByDay"
        eventsTotal:
          $ref: "#/components/schemas/business-profile-service-EventsStats"
        totalAll:
          type: integer
          description: The total number of all events in all requested days
        totalOther:
          type: integer
          description: The total number of all events in all requested days which were no included in the top 5 from `eventsTotal`
    business-profile-service-EventsStats:
      type: object
      description: The top 5 most popular event types. The keys in the object are action names.
      additionalProperties:
        type: integer
        description: The number of events
    business-profile-service-UsageStatsByDay:
      type: object
      description: Statistics for individual days
      properties:
        day:
          type: string
          format: date
          description: Date of the data in this object
        events:
          $ref: "#/components/schemas/business-profile-service-EventsStats"
        other:
          type: integer
          description: The number of events which were not included in the top 5 from `events`
        total:
          type: integer
          description: The total number of events
    business-profile-service-OrganizationDailyUsageReportRequest:
      type: object
      properties:
        from:
          type: string
          example: 2025-05-29
          description: First day to retrieve, in `YYYY-MM-DD` format
        to:
          type: string
          example: 2025-05-30
          description: Last day to retrieve, in `YYYY-MM-DD` format
        actions:
          type: array
          description: You can limit the events added to the report. Without this parameter, all events are included.
          items:
            type: string
            example: page.visit
        bpGuids:
          type: array
          description: You can limit the workspaces added to the report. Without this parameter, all workspaces in the organization are included.
          items:
            type: string
            format: uuid
            example: 34eea35e-3ac4-44f4-95b5-fd00a3b45eff
      required:
        - from
        - to
    business-profile-service-RetentionUsageStats:
      type: object
      properties:
        dailyUsageStatistics:
          $ref: "#/components/schemas/business-profile-service-UsageStatsByDay"
        eventsAverage:
          type: object
          description: The average number of top 5 most popular events kept in the database, calculated from all the requested days.
          additionalProperties:
            type: integer
            description: The average number of events
        averageAll:
          type: integer
          description: The average number of all events kept in the database on all the requested days.
        averageOther:
          type: integer
          description: The average number of events kept in the databse on all the requested days, other than the top 5 events from `eventsAverage`
    business-profile-service-UniversalListBusinessProfilesResponse:
      type: object
      properties:
        data:
          type: array
          description: List of workspaces
          items:
            $ref: "#/components/schemas/business-profile-service-BusinessProfileExtendedResponse"
        meta:
          $ref: "#/components/schemas/business-profile-service-UniversalListResponseMeta"
    business-profile-service-UniversalListResponseMeta:
      type: object
      description: Pagination data
      properties:
        count:
          type: integer
          format: int32
          description: Total number of items
        limit:
          type: integer
          format: int32
          description: Number of items per page
        links:
          type: array
          description: Links to other pages
          items:
            $ref: "#/components/schemas/business-profile-service-UniversalListResponseMetaLink"
    business-profile-service-UniversalListResponseMetaLink:
      type: object
      properties:
        rel:
          type: string
          description: Type of page relation
          enum:
            - first
            - next
            - prev
        url:
          type: string
          description: URL of the page
    business-profile-service-BusinessProfileExtendedResponse:
      type: object
      properties:
        id:
          type: number
          format: int64
          description: ID of the workspace
        guid:
          $ref: "#/components/schemas/business-profile-service-WorkspaceGuid"
        organizationId:
          type: number
          format: int64
          description: ID of the organization
        organizationGuid:
          type: string
          format: uuid
          description: GUID of the organization
        name:
          $ref: "#/components/schemas/business-profile-service-WorkspaceName"
        subdomain:
          $ref: "#/components/schemas/business-profile-service-WorkspaceSubdomain"
        logo:
          $ref: "#/components/schemas/business-profile-service-WorkspaceLogo"
        hash:
          $ref: "#/components/schemas/business-profile-service-WorkspaceHash"
        created:
          $ref: "#/components/schemas/business-profile-service-CreationDate"
        updated:
          $ref: "#/components/schemas/business-profile-service-LastUpdateTime"
        ipRestriction:
          type: string
          enum:
            - OFF
            - PASSB
            - FAIL
            - ENFORCED
        mfaRestriction:
          type: string
          enum:
            - OFF
            - PASS
            - FAIL
            - ENFORCED
        tags:
          type: array
          items:
            type: string
        favorite:
          type: boolean
    business-profile-service-LastUpdateTime:
      type: integer
      format: int64
      description: Last update time
    business-profile-service-CreationDate:
      type: integer
      format: int64
      description: Creation date
    business-profile-service-WorkspaceHash:
      type: string
      description: Hash ID of the workspace
    business-profile-service-WorkspaceLogo:
      type: string
      description: Logo of the workspace
    business-profile-service-WorkspaceSubdomain:
      type: string
      description: Subdomain of the workspace
    business-profile-service-WorkspaceName:
      type: string
      description: Name of the workspace
    business-profile-service-WorkspaceGuid:
      type: string
      format: uuid
      description: GUID of the workspace
    business-profile-service-OrganizationWorkspacesResponse:
      type: object
      properties:
        organizationGuid:
          $ref: "#/components/schemas/business-profile-service-WorkspaceGuid"
        workspaces:
          type: array
          items:
            $ref: "#/components/schemas/business-profile-service-BusinessProfileResponse"
    business-profile-service-BusinessProfileResponse:
      type: object
      description: List of workspaces
      properties:
        name:
          $ref: "#/components/schemas/business-profile-service-WorkspaceName"
        subdomain:
          $ref: "#/components/schemas/business-profile-service-WorkspaceSubdomain"
        logo:
          $ref: "#/components/schemas/business-profile-service-WorkspaceLogo"
        hash:
          $ref: "#/components/schemas/business-profile-service-WorkspaceHash"
        guid:
          $ref: "#/components/schemas/business-profile-service-WorkspaceGuid"
        created:
          $ref: "#/components/schemas/business-profile-service-CreationDate"
        updated:
          $ref: "#/components/schemas/business-profile-service-LastUpdateTime"
    business-profile-service-UniversalListBusinessProfilesForOrganizationWithIdentifiersUserResponse:
      type: object
      properties:
        data:
          type: array
          description: A list of workspaces
          items:
            $ref: "#/components/schemas/business-profile-service-BusinessProfileWithIdentifiersForOrganizationUserResponse"
        meta:
          $ref: "#/components/schemas/business-profile-service-UniversalListResponseMeta"
    business-profile-service-BusinessProfileWithIdentifiersForOrganizationUserResponse:
      type: object
      properties:
        author:
          $ref: "#/components/schemas/business-profile-service-UserId"
        name:
          $ref: "#/components/schemas/business-profile-service-WorkspaceName"
        subdomain:
          $ref: "#/components/schemas/business-profile-service-WorkspaceSubdomain"
        logo:
          $ref: "#/components/schemas/business-profile-service-WorkspaceLogo"
        hash:
          $ref: "#/components/schemas/business-profile-service-WorkspaceHash"
        guid:
          $ref: "#/components/schemas/business-profile-service-WorkspaceGuid"
        created:
          $ref: "#/components/schemas/business-profile-service-CreationDate"
        updated:
          $ref: "#/components/schemas/business-profile-service-LastUpdateTime"
        businessProfileGroup:
          $ref: "#/components/schemas/business-profile-service-BusinessProfileGroupSimpleResponse"
        identifiers:
          type: array
          description: Identifiers (keys) used in the workspace
          items:
            type: string
    business-profile-service-BusinessProfileGroupSimpleResponse:
      type: object
      description: The group that this workspace belongs to (if applicable)
      properties:
        id:
          type: string
          format: uuid
          description: ID of the group
        name:
          type: string
          description: Name of the group
        profileIdentifier:
          type: string
          description: Profile identifier (key) used in the group
        createdAt:
          type: string
          format: date-time
          description: Creation time
        updatedAt:
          type: string
          format: date-time
          description: Last update time
    business-profile-service-UserId:
      type: integer
      description: Unique ID of a Synerise user
  parameters:
    business-profile-service-listSearch:
      name: search
      description: String to search for
      in: query
      required: false
      schema:
        type: string
        default: ""
    business-profile-service-listLimit:
      name: limit
      description: Limit of items per page
      in: query
      required: false
      schema:
        type: integer
        format: int32
        default: 20
    business-profile-service-listPage:
      name: page
      description: Page to retrieve
      in: query
      required: false
      schema:
        type: integer
        format: int32
        default: 1
  responses:
    business-profile-service-4xx-bpservice:
      description: Request failed. See response for details.
      content:
        application/json:
          schema:
            type: object
            required:
              - message
              - timestamp
            properties:
              httpStatus:
                $ref: "#/components/schemas/business-profile-service-ErrorStatus"
              errorCode:
                $ref: "#/components/schemas/business-profile-service-ErrorCode"
              timestamp:
                $ref: "#/components/schemas/business-profile-service-ErrorTimestamp"
              message:
                $ref: "#/components/schemas/business-profile-service-ErrorMessage"
              traceId:
                type: string
                description: Trace ID for troubleshooting
              errors:
                $ref: "#/components/schemas/business-profile-service-ErrorErrorsArray"
    business-profile-service-403-bpservice:
      description: "Unauthorized: insufficient permissions."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/business-profile-service-AuthError"
    business-profile-service-401-bpservice:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/business-profile-service-AuthError"
