{
  "openapi": "3.0.3",
  "info": {
    "version": "1.0.0",
    "title": "Axeptio API",
    "description": "The Axeptio API is a RESTful API that allows you to automate configuration and management of Axeptio.\n\n## Going further\n\nYou can find useful scripts and code samples for more specific use cases in [this repository](https://github.com/axeptio/customers-code-samples/)",
    "termsOfService": "https://www.axept.io/?axeptio_contract=630cb704236a1ad31f1a63e5",
    "contact": {
      "email": "contact@axeptio.eu"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "servers": [
    {
      "url": "https://api.axept.io/v1",
      "description": "API Server (production)"
    }
  ],
  "tags": [
    {
      "name": "Auth service",
      "description": "Endpoints related to the authentication service (login, logout, create/update/invite user etc.)"
    },
    {
      "name": "Projects",
      "description": "Previously called \"Client\", the following endpoints related to Axeptio projects"
    },
    {
      "name": "Cookies",
      "description": "Endpoints related to cookies"
    },
    {
      "name": "Organizations",
      "description": "Endpoints related to organizations",
      "externalDocs": {
        "description": "Going further 💡",
        "url": "https://github.com/axeptio/customers-code-samples#organization-related-scripts"
      }
    },
    {
      "name": "Statistics",
      "description": "Endpoints related to statistics"
    },
    {
      "name": "Vendors",
      "description": "Endpoints related to vendors"
    }
  ],
  "paths": {
    "/auth/me": {
      "get": {
        "tags": [
          "Auth service"
        ],
        "summary": "Get the current user",
        "description": "Get the current user for the given token",
        "parameters": [
          {
            "name": "redirectURI",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyUserResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Auth service"
        ],
        "summary": "Update the current user",
        "description": "Update the current user fields only present in the request body",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyUserResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            }
          }
        }
      }
    },
    "/auth/logout": {
      "get": {
        "tags": [
          "Auth service"
        ],
        "summary": "Logout the current user",
        "description": "Logout the current user",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoutResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/auth/invitations": {
      "post": {
        "tags": [
          "Auth service"
        ],
        "summary": "Invite a user",
        "description": "Invite a user on a project or organization",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationRequest"
              }
            }
          }
        }
      }
    },
    "/auth/local/signin": {
      "post": {
        "tags": [
          "Auth service"
        ],
        "summary": "Request a bearer token",
        "description": "By requesting a bearer token, you'll have the ability to use the client and vault routes. \n\nOnce you've successfully retrieved a token\n  - Click on the \"Authorize\" button on the top of the page\n - Paste the token value in the text field\n - Click on Authorize\n \n\nYou can now execute requests on the client and vault routes.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CredentialRequest"
              }
            }
          }
        }
      }
    },
    "/client": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Get all the projects",
        "description": "Get all the projects for the current user",
        "parameters": [],
        "responses": {
          "200": {
            "description": "List of all the projects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectListResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/client/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Get a project",
        "description": "Get a project by its ID",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Project ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/client/{projectId}/consents/{token}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Get a consent for a given project ID and token",
        "description": "Get a consent for a given project ID and token",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Project ID"
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Token"
          }
        ],
        "responses": {
          "200": {
            "description": "List of the tokens for a project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/vault/projects/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": " Retrieve a project",
        "description": "",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Project ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Return the project matching the ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultGetProjectResponse"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultGetProjectNotFoundResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Projects"
        ],
        "summary": "Update a project",
        "description": "",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Project ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultCreateProjectResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VaultCreateProjectRequest"
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Projects"
        ],
        "summary": "Update some project properties",
        "description": "With this endpoint, you can attach the project to an organization",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Project ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultCreateProjectResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VaultPatchProjectRequest"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "summary": "Delete a project",
        "description": "",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Project ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Return the deletion result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultDeleteProjectResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/app/consents/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Get consents for a given project ID",
        "description": "",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Project ID"
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "'cookies', 'contractsV2', ..."
          },
          {
            "name": "identifier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "config id"
          },
          {
            "name": "token",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "token"
          },
          {
            "name": "start/end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "valid Date"
          }
        ],
        "responses": {
          "200": {
            "description": "List of the consents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentResponseList"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/publish/job/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "summary": "Publish a cookies version, a terms version, ...",
        "description": "",
        "parameters": [
          {
            "name": "jobID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Publish Job ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Return the job",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultPublishJobResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "summary": "Publish a cookies version, a terms version, ...",
        "description": "",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Project ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Return the job",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultPublishJobResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VaultPublishJobRequest"
              }
            }
          }
        }
      }
    },
    "/vault/cookies": {
      "get": {
        "tags": [
          "Cookies"
        ],
        "summary": " Retrieve all cookies configurations",
        "description": "",
        "parameters": [
          {
            "name": "data.projectId",
            "in": "query",
            "description": "Project ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get all cookies config from a project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultGetAllCookieConfigurationResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cookie configuration not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultGetCookieConfigurationNotFoundResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Cookies"
        ],
        "summary": "Create a cookie configuration",
        "description": "",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Cookie configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultCreateCookieConfigurationResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VaultCreateCookieConfigurationRequest"
              }
            }
          }
        }
      }
    },
    "/vault/cookies/{cookieConfigurationId}": {
      "get": {
        "tags": [
          "Cookies"
        ],
        "summary": " Retrieve a cookie configuration",
        "description": "",
        "parameters": [
          {
            "name": "cookieConfigurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Cookie configuration ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Cookie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultGetCookieConfigurationResponse"
                }
              }
            }
          },
          "404": {
            "description": "Cookie configuration not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultGetCookieConfigurationNotFoundResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Cookies"
        ],
        "summary": "Update a cookie configuration",
        "description": "",
        "parameters": [
          {
            "name": "cookieConfigurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Cookie configuration ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated cookie",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultCreateCookieConfigurationResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VaultCreateCookieConfigurationRequest"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Cookies"
        ],
        "summary": "Delete a cookie configuration",
        "description": "",
        "parameters": [
          {
            "name": "cookieConfigurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Cookie configuration ID"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VaultDeleteCookieConfigurationResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/cookies/{cookieConfigurationId}/duplicate": {
      "post": {
        "tags": [
          "Cookies"
        ],
        "summary": "Duplicate a cookie configuration",
        "description": "Duplicate a cookie configuration",
        "parameters": [
          {
            "name": "cookieConfigurationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Cookie configuration id"
          }
        ],
        "responses": {
          "200": {
            "description": "Duplicate cookie configuration response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DuplicateCookieConfigurationResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DuplicateCookieConfigurationRequest"
              }
            }
          }
        }
      }
    },
    "/vault/organizations": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "Get all organizations",
        "description": "Get all the organizations for the current user",
        "responses": {
          "200": {
            "description": "List of all the organizations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationListResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/vault/organizations/{organizationId}": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization ID"
          }
        ],
        "summary": "Get organization by id",
        "description": "Get organization by id",
        "responses": {
          "200": {
            "description": "Organization object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organization"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationNotFound"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/vault/organizations/{organizationId}/users": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "parameters": [
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Organization ID"
          }
        ],
        "summary": "Get all users for this organization",
        "description": "Get all users for this organization",
        "responses": {
          "200": {
            "description": "List of all the users for this organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationUserListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationNotFound"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/stats/{projectId}": {
      "post": {
        "tags": [
          "Statistics"
        ],
        "summary": "Get stats for a project",
        "description": "",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "description": "Project ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "body",
            "in": "body",
            "description": "Stats request body",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/StatsRequest"
            },
            "examples": {
              "ChartType globalStats": {
                "value": {
                  "projectId": "651eaf2e42bfc64d3b5983fg",
                  "startDate": "2023-11-18T00:00:00.000Z",
                  "endDate": "2023-12-18T23:59:59.999Z",
                  "filters": [],
                  "chartType": "globalStats",
                  "statsV2": true
                }
              },
              "ChartType line": {
                "value": {
                  "projectId": "651eaf2e42bfc64d3b5983fg",
                  "startDate": "2023-11-18T00:00:00.000Z",
                  "endDate": "2023-12-18T23:59:59.999Z",
                  "filters": [],
                  "chartType": "line",
                  "chartMetrics": [
                    "accept",
                    "partial",
                    "reject"
                  ],
                  "statsV2": true
                }
              },
              "ChartType byDimension": {
                "value": {
                  "projectId": "651eaf2e42bfc64d3b5983fg",
                  "startDate": "2023-11-18T00:00:00.000Z",
                  "endDate": "2023-12-18T23:59:59.999Z",
                  "filters": [],
                  "chartType": "byDimension",
                  "chartMetrics": [
                    "accept",
                    "partial",
                    "reject"
                  ],
                  "chartDimension": "device",
                  "statsV2": true
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stats for a project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsResponse"
                },
                "examples": {
                  "ChartType globalStats": {
                    "value": {
                      "dimensions": {
                        "browser": [
                          "Chrome",
                          "Firefox"
                        ],
                        "device": [
                          "Desktop",
                          "Mobile"
                        ],
                        "os": [
                          "Windows",
                          "Linux"
                        ],
                        "host": [
                          "localhost",
                          "example.com"
                        ],
                        "config": [
                          "config1",
                          "config2"
                        ]
                      },
                      "result": [
                        {
                          "pageview": 1124,
                          "visitor": 600,
                          "newVisitor": 536,
                          "consentRate": 0.532075,
                          "interactionRate": 0.380201,
                          "optInRate": 0.202295447075,
                          "interactionRateMobile": 0.480769,
                          "consentRateMobile": 0.59,
                          "interactionRateDesktop": 0.338205,
                          "consentRateDesktop": 0.487654,
                          "quickBounceRate": 0.143727
                        }
                      ]
                    }
                  },
                  "ChartType line": {
                    "value": {
                      "dimensions": {
                        "browser": [
                          "Chrome",
                          "Firefox"
                        ],
                        "device": [
                          "Desktop",
                          "Mobile"
                        ],
                        "os": [
                          "Windows",
                          "Linux"
                        ],
                        "host": [
                          "localhost",
                          "example.com"
                        ],
                        "config": [
                          "config1",
                          "config2"
                        ]
                      },
                      "result": [
                        {
                          "date": "2023-11-18T00:00:00.000Z",
                          "accept": 33,
                          "partial": 6,
                          "reject": 38
                        },
                        {
                          "date": "2023-11-19T00:00:00.000Z",
                          "accept": 12,
                          "partial": 1,
                          "reject": 19
                        },
                        {
                          "date": "2023-11-20T00:00:00.000Z",
                          "accept": 11,
                          "partial": 1,
                          "reject": 9
                        },
                        {
                          "date": "2023-11-21T00:00:00.000Z",
                          "accept": 6,
                          "partial": 0,
                          "reject": 8
                        },
                        {
                          "date": "2023-11-22T00:00:00.000Z",
                          "accept": 3,
                          "partial": 1,
                          "reject": 4
                        }
                      ]
                    }
                  },
                  "ChartType byDimension": {
                    "value": {
                      "dimensions": {
                        "browser": [
                          "Chrome",
                          "Firefox"
                        ],
                        "device": [
                          "Desktop",
                          "Mobile"
                        ],
                        "os": [
                          "Windows",
                          "Linux"
                        ],
                        "host": [
                          "localhost",
                          "example.com"
                        ],
                        "config": [
                          "config1",
                          "config2"
                        ]
                      },
                      "result": [
                        {
                          "date": null,
                          "visitor": 585,
                          "newVisitor": 418,
                          "accept": 70,
                          "partial": 9,
                          "reject": 83,
                          "consentRate": 48.76543209876543,
                          "device": "desktop"
                        },
                        {
                          "date": null,
                          "visitor": 226,
                          "newVisitor": 201,
                          "accept": 56,
                          "partial": 3,
                          "reject": 41,
                          "consentRate": 59,
                          "device": "mobile"
                        },
                        {
                          "date": null,
                          "visitor": 9,
                          "newVisitor": 9,
                          "accept": 1,
                          "partial": 1,
                          "reject": 0,
                          "consentRate": 0,
                          "device": "tablet"
                        },
                        {
                          "date": null,
                          "visitor": 1,
                          "newVisitor": 1,
                          "accept": 1,
                          "partial": 0,
                          "reject": 0,
                          "consentRate": 0,
                          "device": "smarttv",
                          "host": "taste.axept.io",
                          "config": "651eaf2e02a7182956bea833"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectNotFound"
                }
              }
            }
          }
        }
      }
    },
    "/vendors/solutions": {
      "get": {
        "tags": [
          "Vendors"
        ],
        "summary": "Get all Axeptio vendors",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Vendor"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/vendors/solutions/most-used": {
      "get": {
        "tags": [
          "Vendors"
        ],
        "summary": "Get the most used vendor solutions",
        "description": "Public shortlist of the vendor solutions referenced by the most banner (cookies) configurations, for the onboarding \"Add a few vendors\" step. The ranking is cached and recomputed lazily on expiry; localized fields resolve for the active cookies language.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of vendors to return. Defaults to 10 and is clamped to 50.",
            "schema": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "Language used to localize the vendor name/logo; falls back to the default when not an active cookies language.",
            "schema": {
              "type": "string",
              "example": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Most used vendors, ordered by usage descending (at most `limit`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MostUsedVendor"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/vendors/categories": {
      "get": {
        "tags": [
          "Vendors"
        ],
        "summary": "Get all vendors categories",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Category"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/vault/vendors": {
      "get": {
        "tags": [
          "Vendors"
        ],
        "summary": "Get all Custom vendors",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomVendor"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Vendors"
        ],
        "summary": "Create a Custom vendor",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  },
                  "longDescription": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "shortDescription": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "policyUrl": {
                    "type": "string"
                  },
                  "projectId": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ObjectId"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomVendor"
                }
              }
            }
          }
        }
      }
    },
    "/vault/vendors/{vendorId}": {
      "patch": {
        "tags": [
          "Vendors"
        ],
        "summary": "Update a Custom vendor",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vendorId",
            "in": "path",
            "description": "Vendor id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Attributes to update",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  },
                  "longDescription": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "shortDescription": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  },
                  "policyUrl": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "$ref": "#/components/schemas/ObjectId"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "domain": {
                          "type": "string"
                        },
                        "longDescription": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "shortDescription": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "policyUrl": {
                          "type": "string"
                        },
                        "projectId": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/ObjectId"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Vendor not found"
          }
        }
      },
      "delete": {
        "tags": [
          "Vendors"
        ],
        "summary": "Delete a Custom vendor",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "vendorId",
            "in": "path",
            "description": "Vendor id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "acknowledged": {
                      "type": "boolean",
                      "example": true
                    },
                    "deletedCount": {
                      "type": "number",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Vendor not found"
          }
        }
      }
    },
    "/app/onboarding/banner": {
      "post": {
        "tags": [
          "Onboarding"
        ],
        "summary": "Create an onboarding banner, optionally triggering a free Shake scan",
        "description": "Onboarding banner-creation endpoint (ENG-13590). The optional `triggerShakeScan` flag is `false` by default: when absent/false the endpoint triggers no scan and responds `200 { scanTriggered: false }` (blank-banner creation stays on `POST /vault/cookies`). When `true`, it triggers a Shake scan that scans `scanUrl` and provisions the banner automatically — free for everyone, regardless of subscription level, so it can be used during onboarding. The route deliberately bypasses the automator entitlement/quota gate (no service-entitlement, subscription or monthly-quota check, no usage token consumed); safety rests on authentication, project ownership (the caller must own `projectId`), and a per-IP abuse limiter applied only to actual scan requests.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OnboardingBannerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "No scan triggered (triggerShakeScan absent or false).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "scanTriggered": {
                      "type": "boolean",
                      "example": false
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Shake scan job created (verbatim shake-api job). The scan scans the site and provisions the banner asynchronously.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Missing/invalid scan parameter (projectId, scanUrl, country, regulation or language)."
          },
          "403": {
            "description": "The authenticated caller does not own the target project."
          },
          "503": {
            "description": "Per-IP onboarding-scan rate limit exceeded; retry after the window."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ObjectId": {
        "type": "string",
        "pattern": "^[0-9a-fA-F]{24}$",
        "example": "5ffc24255558222597d6afa9",
        "description": "MongoDB ObjectId"
      },
      "InvitationRequest": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "collection": {
                "type": "string",
                "description": "`project` or `organization`"
              },
              "id": {
                "$ref": "#/components/schemas/ObjectId"
              },
              "language": {
                "type": "string"
              },
              "templateVars": {
                "type": "object",
                "properties": {
                  "inviter": {
                    "type": "object",
                    "properties": {
                      "displayName": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "_id": {
                        "$ref": "#/components/schemas/ObjectId"
                      }
                    }
                  },
                  "project": {
                    "type": "object",
                    "description": "Required if collection is `project`",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "id": {
                        "$ref": "#/components/schemas/ObjectId"
                      },
                      "_id": {
                        "$ref": "#/components/schemas/ObjectId"
                      }
                    }
                  },
                  "organization": {
                    "type": "object",
                    "description": "Required if collection is `organization`",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "id": {
                        "$ref": "#/components/schemas/ObjectId"
                      },
                      "_id": {
                        "$ref": "#/components/schemas/ObjectId"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "InvitationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "insertToken": {
            "type": "object",
            "properties": {
              "expiration": {
                "type": "date-time"
              },
              "value": {
                "type": "string"
              }
            }
          },
          "invitationToken": {
            "type": "object",
            "properties": {
              "expiration": {
                "type": "date-time"
              },
              "value": {
                "type": "string"
              }
            }
          }
        }
      },
      "CreateUserRequest": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "passwordConfirm": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "country": {
                "type": "string"
              },
              "preferredLanguage": {
                "type": "string"
              },
              "preferredLocale": {
                "type": "string"
              }
            }
          }
        }
      },
      "MyUserResponse": {
        "type": "object",
        "properties": {
          "_id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "country": {
                "type": "string"
              },
              "preferredLanguage": {
                "type": "string"
              },
              "preferredLocale": {
                "type": "string"
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "token": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "LogoutResponse": {
        "message": {
          "type": "string",
          "example": "signed out"
        }
      },
      "CredentialRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "VaultCreateProjectRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "websiteURL": {
            "type": "string"
          },
          "languages": {
            "type": "array",
            "items": {
              "value": {
                "type": "string",
                "example": "fr"
              },
              "label": {
                "type": "string",
                "example": "Français"
              }
            }
          }
        }
      },
      "VaultPatchProjectRequest": {
        "type": "object",
        "properties": {
          "organizationId": {
            "type": "string"
          }
        }
      },
      "TokenResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "VaultCreateProjectResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VaultRootResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/VaultCreateProjectRequest"
              }
            }
          }
        ]
      },
      "VaultGetProjectResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VaultRootResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/VaultCreateProjectRequest"
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "states": {
                "type": "object",
                "properties": {
                  "published": {
                    "type": "object",
                    "properties": {
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "createdBy": {
                        "type": "string"
                      },
                      "modifiedAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "modifiedBy": {
                        "type": "string"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "_id": {
                            "$ref": "#/components/schemas/ObjectId"
                          },
                          "id": {
                            "$ref": "#/components/schemas/ObjectId"
                          },
                          "name": {
                            "type": "string"
                          },
                          "websiteURL": {
                            "type": "string"
                          },
                          "DPO": {
                            "type": "object"
                          },
                          "language": {
                            "type": "array"
                          },
                          "colors": {
                            "type": "object"
                          },
                          "customButton": {
                            "type": "object"
                          },
                          "fonts": {
                            "type": "object"
                          },
                          "isCustomStyle": {
                            "type": "boolean"
                          },
                          "overlayStyle": {
                            "type": "object"
                          },
                          "widgetStyle": {
                            "type": "object"
                          },
                          "billing": {
                            "$ref": "#/components/schemas/StripeBillingOject"
                          },
                          "marketPlace": {
                            "type": "array"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "StripeBillingOject": {
        "type": "object",
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/StripeSubscriptionObject"
          }
        }
      },
      "StripeSubscriptionObject": {
        "type": "object",
        "properties": {
          "start_date": {
            "type": "string",
            "description": "Unix timestamp"
          },
          "status": {
            "type": "string",
            "enum": [
              "incomplete",
              "incomplete_expired",
              "trialing",
              "active",
              "past_due",
              "canceled",
              "unpaid"
            ]
          },
          "items": {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "nickname": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "VaultGetCookieConfigurationResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VaultRootResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/VaultCreateCookieConfigurationRequest"
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "states": {
                "type": "object"
              }
            }
          }
        ]
      },
      "VaultGetAllCookieConfigurationResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/VaultGetCookieConfigurationResponse"
        }
      },
      "VaultCreateCookieConfigurationRequest": {
        "type": "object",
        "properties": {
          "projectId": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "aboutUsId": {
            "type": "string"
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Step"
            }
          },
          "strings": {
            "type": "object"
          },
          "a11yStrings": {
            "type": "object"
          },
          "settings": {
            "type": "object"
          },
          "uiSettings": {
            "type": "object"
          },
          "version": {
            "type": "object"
          },
          "title": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "VaultGetCookieConfigurationNotFoundResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "VaultPublishJobRequest": {
        "type": "object",
        "properties": {
          "contracts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/ObjectId"
                }
              }
            }
          },
          "contractsV2": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/ObjectId"
                }
              }
            }
          },
          "cookies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/ObjectId"
                }
              }
            }
          },
          "processings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/ObjectId"
                }
              }
            }
          },
          "project": {
            "type": "object",
            "properties": {
              "dpo": {
                "type": "boolean"
              },
              "design": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "VaultCreateCookieConfigurationResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VaultRootResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/VaultCreateCookieConfigurationRequest"
              }
            }
          }
        ]
      },
      "VaultDeleteCookieConfigurationResponse": {
        "type": "object",
        "properties": {
          "acknowledged": {
            "type": "boolean"
          },
          "deletedCount": {
            "type": "integer"
          }
        }
      },
      "DuplicateCookieConfigurationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "DuplicateCookieConfigurationResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/VaultRootResponse"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/VaultCreateCookieConfigurationRequest"
              }
            }
          }
        ]
      },
      "VaultGetProjectNotFoundResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "VaultRootResponse": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "published"
            ]
          },
          "id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "type": "string"
          }
        }
      },
      "VaultDeleteProjectResponse": {
        "type": "object",
        "properties": {
          "acknowledged": {
            "type": "boolean"
          },
          "deletedCount": {
            "type": "integer"
          }
        }
      },
      "ProjectListResponse": {
        "type": "object",
        "properties": {
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProjectResponse"
            }
          }
        }
      },
      "ProjectResponse": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "modifiedAt": {
            "type": "string",
            "format": "date-time"
          },
          "active": {
            "type": "boolean"
          },
          "configuration": {
            "$ref": "#/components/schemas/Configuration"
          }
        }
      },
      "Links": {
        "type": "object",
        "properties": {
          "projects": {
            "type": "string"
          },
          "project": {
            "type": "string"
          },
          "tokens": {
            "type": "string"
          },
          "accepted": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "Document": {
        "type": "object"
      },
      "ProcessingActivity": {
        "type": "object"
      },
      "Configuration": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Document"
            }
          },
          "processingActivities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProcessingActivity"
            }
          }
        }
      },
      "TokenListByProjectResponse": {
        "type": "object",
        "properties": {
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "tokens": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "xywgilglkwjn9y319mx6rb": "https://api.axept.io/v1/client/5ffc24255558222597d6afa9/consents/xywgilglkwjn9y319mx6rb",
              "01jrd3uu30ppftf1xxbzwc4": "https://api.axept.io/v1/client/5ffc24255558222597d6afa9/consents/01jrd3uu30ppftf1xxbzwc4"
            }
          }
        }
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "hasNext": {
            "type": "boolean"
          },
          "hasPrev": {
            "type": "boolean"
          }
        }
      },
      "ConsentResponseList": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ConsentResponse"
        }
      },
      "ConsentResponse": {
        "type": "object",
        "properties": {
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "state": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/History"
            }
          }
        }
      },
      "History": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "identifier": {
            "type": "string"
          },
          "accept": {
            "type": "boolean"
          },
          "headers": {
            "type": "object",
            "properties": {
              "origin": {
                "type": "string"
              },
              "user-agent": {
                "type": "string"
              },
              "referer": {
                "type": "string"
              },
              "x-forward-for": {
                "type": "string"
              }
            }
          }
        },
        "preferences": {
          "type": "object",
          "properties": {
            "vendors": {
              "type": "object",
              "additionalProperties": {
                "type": "boolean"
              },
              "example": {
                "google_analytics": false,
                "hotjar": false
              }
            }
          }
        },
        "config": {
          "$ref": "#/components/schemas/Config"
        },
        "value": {
          "type": "string"
        }
      },
      "Config": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "language": {
            "type": "string",
            "enum": [
              "EN",
              "ES",
              "FR"
            ]
          }
        }
      },
      "AllConsentsListForAConfigResponse": {
        "type": "object",
        "properties": {
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "tokens": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "link": {
                  "type": "string"
                },
                "token": {
                  "type": "string"
                },
                "acceptedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "headers": {
                  "type": "object"
                },
                "preferences": {
                  "type": "object"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Step": {
        "type": "object",
        "properties": {
          "vendors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "label": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "layout": {
            "type": "string"
          },
          "hasVendors": {
            "type": "boolean"
          },
          "image": {
            "type": "string"
          },
          "onlyOnce": {
            "type": "boolean"
          },
          "allowOptOut": {
            "type": "boolean"
          },
          "strings": {
            "type": "object"
          },
          "showToggleAllSwitch": {
            "type": "boolean"
          },
          "titleTextAlign": {
            "type": "string"
          },
          "contentTextAlign": {
            "type": "string"
          },
          "imageWidth": {
            "type": "string"
          }
        }
      },
      "ProjectNotFound": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Document Not Found"
          }
        }
      },
      "Organization": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createBy": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "companyName": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "subscription": {
                "$ref": "#/components/schemas/StripeSubscriptionObject"
              }
            }
          }
        }
      },
      "OrganizationListResponse": {
        "type": "object",
        "properties": {
          "organizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Organization"
            }
          }
        }
      },
      "OrganizationUser": {
        "type": "object",
        "properties": {
          "_id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "country": {
                "type": "string"
              },
              "preferredLanguage": {
                "type": "string"
              },
              "preferredLocale": {
                "type": "string"
              }
            }
          }
        }
      },
      "OrganizationUserListResponse": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganizationUser"
            }
          }
        }
      },
      "OrganizationNotFound": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "StatsRequest": {
        "type": "object",
        "properties": {
          "chartType": {
            "type": "string",
            "enum": [
              "globalStats",
              "byDimension",
              "line"
            ],
            "required": true
          },
          "chartMetrics": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "accept",
                "partial",
                "reject",
                "visitor",
                "newVisitor"
              ]
            }
          },
          "chartDimensions": {
            "type": "string"
          },
          "projectId": {
            "require": true,
            "$ref": "#components/schemas/ObjectId"
          },
          "startDate": {
            "require": true,
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "require": true,
            "type": "string",
            "format": "date-time"
          },
          "statsV2": {
            "require": true,
            "type": "boolean",
            "description": "Should set true for statsV2, statsV1 is deprecated"
          },
          "filters": {
            "type": "array",
            "description": "Snowflake-native dimensions (device, os, browser, config, host) are forwarded as-is. country, regulation, and language are resolved server-side into a config filter (brand IDs) before querying Snowflake.",
            "items": {
              "type": "object",
              "properties": {
                "dimension": {
                  "type": "string",
                  "enum": [
                    "device",
                    "os",
                    "browser",
                    "config",
                    "host",
                    "country",
                    "regulation",
                    "language"
                  ]
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "granularity": {
            "type": "string",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "quarter"
            ],
            "default": "day",
            "description": "Timeseries bucket size for the line chart type (and the opt-out daily route). Ignored for globalStats and byDimension. Must be allowed by plan and smaller than the selected date range."
          }
        }
      },
      "StatsResponse": {
        "type": "object",
        "properties": {
          "dimensions": {
            "type": "object",
            "properties": {
              "browser": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "device": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "os": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "host": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "config": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "granularity": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Granularities available for the selected date range (from Snowflake GRANULARITY column)"
              }
            }
          },
          "results": {
            "description": "Array of results. The content of the array depends on the chartType",
            "type": "array"
          }
        }
      },
      "MostUsedVendor": {
        "type": "object",
        "description": "A vendor chip for the onboarding shortlist.",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Vendor solution id"
          },
          "name": {
            "type": "string",
            "description": "Localized commercial name (falls back to the technical name)"
          },
          "logo": {
            "type": "string",
            "nullable": true,
            "description": "Website used as the logo source (its favicon is rendered as the vendor logo)"
          },
          "domain": {
            "type": "string",
            "nullable": true,
            "description": "Localized website of the vendor"
          },
          "count": {
            "type": "integer",
            "description": "Number of banner configurations referencing this vendor"
          }
        }
      },
      "Logo": {
        "type": "object",
        "properties": {
          "createdFrom": {
            "type": "object"
          },
          "s3": {
            "type": "object"
          }
        }
      },
      "Category": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "data": {
            "type": "object",
            "properties": {
              "banner": {
                "$ref": "#/components/schemas/Logo"
              },
              "description": {
                "type": "object",
                "properties": {
                  "__lang": {
                    "$ref": "#/components/schemas/__langObject"
                  }
                }
              },
              "functionalIcon": {
                "$ref": "#/components/schemas/Logo"
              },
              "illustratedIcon": {
                "$ref": "#/components/schemas/Logo"
              },
              "name": {
                "type": "string"
              },
              "parentCategory": {
                "$ref": "#/components/schemas/ObjectId"
              },
              "shortDescription": {
                "type": "object",
                "properties": {
                  "__lang": {
                    "$ref": "#/components/schemas/__langObject"
                  }
                }
              },
              "title": {
                "type": "object",
                "properties": {
                  "__lang": {
                    "$ref": "#/components/schemas/__langObject"
                  }
                }
              }
            }
          }
        }
      },
      "__langObject": {
        "type": "object",
        "properties": {
          "de": {
            "type": "string"
          },
          "en": {
            "type": "string"
          },
          "es": {
            "type": "string"
          },
          "fr": {
            "type": "string"
          },
          "it": {
            "type": "string"
          },
          "nt": {
            "type": "string"
          },
          "pt": {
            "type": "string"
          }
        }
      },
      "VendorCategory": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Description Name"
          },
          "title": {
            "type": "object",
            "properties": {
              "__lang": {
                "$ref": "#/components/schemas/__langObject"
              }
            }
          },
          "_id": {
            "$ref": "#/components/schemas/ObjectId"
          }
        }
      },
      "VendorCreator": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "_id": {
            "$ref": "#/components/schemas/ObjectId"
          }
        }
      },
      "Vendor": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "creator": {
            "$ref": "#/components/schemas/VendorCreator"
          },
          "id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "data": {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "categoryIds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ObjectId"
                }
              },
              "companyId": {
                "$ref": "#/components/schemas/ObjectId"
              },
              "consentExemption": {
                "type": "boolean"
              },
              "iabId": {
                "type": "number"
              },
              "logo": {
                "type": "object"
              },
              "longDescription": {
                "type": "object",
                "properties": {
                  "__lang": {
                    "$ref": "#/components/schemas/__langObject"
                  }
                }
              },
              "name": {
                "type": "string"
              },
              "policyUrl": {
                "type": "object",
                "properties": {
                  "__lang": {
                    "$ref": "#/components/schemas/__langObject"
                  }
                }
              },
              "ShortDescription": {
                "type": "object",
                "properties": {
                  "__lang": {
                    "$ref": "#/components/schemas/__langObject"
                  }
                }
              },
              "title": {
                "type": "object",
                "properties": {
                  "__lang": {
                    "$ref": "#/components/schemas/__langObject"
                  }
                }
              },
              "website": {
                "type": "object",
                "properties": {
                  "__lang": {
                    "$ref": "#/components/schemas/__langObject"
                  }
                }
              },
              "__enabled": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "CustomVendor": {
        "type": "object",
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdBy": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "creator": {
            "$ref": "#/components/schemas/VendorCreator"
          },
          "id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "data": {
            "type": "object",
            "properties": {
              "domain": {
                "type": "string"
              },
              "longDescription": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "shortDescription": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "policyUrl": {
                "type": "string"
              },
              "projectId": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ObjectId"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        }
      },
      "OnboardingBannerRequest": {
        "type": "object",
        "properties": {
          "triggerShakeScan": {
            "type": "boolean",
            "default": false,
            "description": "When true, trigger a free Shake scan that provisions the banner. When absent/false the endpoint is a no-op."
          },
          "projectId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$",
            "description": "Project the banner belongs to. Required when triggerShakeScan is true; the caller must own it. Accepts either case (the endpoint canonicalizes to lowercase)."
          },
          "scanUrl": {
            "type": "string",
            "description": "URL/domain to scan. Required when triggerShakeScan is true.",
            "example": "example.com"
          },
          "scanName": {
            "type": "string",
            "description": "Optional human label for the scan (maps to the shake job params.customId)."
          },
          "notifyEmail": {
            "description": "Optional recipient(s) for the scan-done notification email (max 10, each a valid email).",
            "oneOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "email"
                },
                "maxItems": 10
              }
            ]
          },
          "country": {
            "type": "string",
            "description": "Provisioning config country code. Required when triggerShakeScan is true.",
            "example": "FR"
          },
          "subdivision": {
            "description": "Optional provisioning config subdivision — a single ISO 3166-2 code (e.g. US-CA) or an array of codes for multi-region targeting. Validated against the ISO 3166-2 format and passed through to the provisioning configuration.",
            "oneOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
                },
                "uniqueItems": true
              }
            ],
            "example": "US-CA"
          },
          "regulation": {
            "type": "string",
            "description": "Provisioning config regulation (shake-api format, e.g. gdpr). Required when triggerShakeScan is true.",
            "example": "gdpr"
          },
          "language": {
            "type": "string",
            "description": "Provisioning config language (banner target). Required when triggerShakeScan is true.",
            "example": "fr"
          }
        }
      },
      "VaultPublishJobResponse": {
        "type": "object",
        "properties": {
          "initiatedBy": {
            "type": "string"
          },
          "initiator": {
            "type": "array"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              }
            }
          },
          "projectId": {
            "type": "string"
          },
          "requestBody": {
            "$ref": "#/components/schemas/VaultPublishJobRequest"
          },
          "started": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "timeout": {
            "type": "integer"
          },
          "_id": {
            "$ref": "#/components/schemas/ObjectId"
          },
          "reason": {
            "type": "array",
            "items": {
              "type": "object",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "freeTrialProjectsLimitReached"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Free trial projects limit reached"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "inactiveSubscription"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Your subscription is inactive"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "noSubscription"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "You don't have a subscription"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "noTcfSubscription"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "You don't have a TCF subscription"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "paymentLinkPending"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Waiting for the client to pay the payment link"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "unableToFetchSubscription"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Unable to fetch subscription"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "unpaidSubscription"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Your subscription is unpaid"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "contractsButtons"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Delete one or more buttons in the contract widget"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "contractsV2Widgets"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "You can't use contracts service with your subscription"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "contractsWidgets"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Delete one or more contract widgets"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "aboutUs"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Content of the \"About Axeptio\" panel changed"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "contextualConsentWall"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "You can't show the contextual consent wall with a delay below 5s"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "cookiesAllowedLayouts"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Remove the premium screen"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "cookiesStepLayout"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Remove premium screen"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "cookiesSteps"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Delete one or more steps in your configuration"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "cookiesVendors"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Delete one or more services to reach the maximum allowed"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "specialSteps"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "You can't use contextual consent wall with your current subscription"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "portabilityVendors"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Disable the “hide axeptio button” option"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "portabilityWidgets"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Delete one or more portability widgets"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "processingsButtons"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Delete one or more buttons in the consent widget"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "processingsWidgets"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Delete one or more Subs consent widgets"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "clientCustomButton"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Uncheck the “Use a custom button” option"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "clientCustomStyle"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Reset the values in the “Colors and graphics” section."
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "cookieConfigMissingRequiredFields"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Cookie configuration \"projectId\" is missing required field(s): description"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "geolocationConfigWithCountryMissing"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "A required country parameter is missing from the geolocation configuration"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "geolocationConfigWithLanguageMissing"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "A required language parameter is missing from the geolocation configuration"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "geolocationFallbackConfigIdMissing"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "A required fallback configId parameter is missing from the geolocation configuration"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "geolocationFallbackConfigNotFound"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "A required fallback configId parameter is not found from the geolocation configuration"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "hideAxeptioButton"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Disable the “hide axeptio button” option"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "maxProjectsLimitReached"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "You have reached the maximum number of projects"
                      ],
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "enum": [
                        "version"
                      ],
                      "type": "string"
                    },
                    "description": {
                      "enum": [
                        "Update the version of the widget"
                      ],
                      "type": "string"
                    }
                  }
                }
              ]
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Enter your access token (obtain from /v1/auth/signin)"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}