{
  "components": {
    "schemas": {
      "AccessCodeResponse": {
        "properties": {
          "assessment_channel": {
            "anyOf": [
              {
                "enum": [
                  "text",
                  "voice"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assessment Channel"
          },
          "assessment_methodology_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assessment Methodology Id"
          },
          "bound_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only people at exactly this domain may use this code; null = not bound to a domain.",
            "title": "Bound Domain"
          },
          "bound_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The one person who may use this code; null = not bound to an email.",
            "title": "Bound Email"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "created_by_tenant_user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who created this code in the portal; null when that is not recorded, for example for a code created through the API.",
            "title": "Created By Tenant User Id"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "max_uses": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses"
          },
          "tag_ids": {
            "description": "Ids of tags this code pre-assigns.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Tag Ids",
            "type": "array"
          },
          "target_role": {
            "enum": [
              "admin",
              "manager",
              "member"
            ],
            "title": "Target Role",
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "title": "Tenant Id",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "used_count": {
            "title": "Used Count",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "code",
          "expires_at",
          "max_uses",
          "used_count",
          "target_role",
          "created_at",
          "updated_at"
        ],
        "title": "AccessCodeResponse",
        "type": "object"
      },
      "AdoptedMethodology": {
        "description": "A methodology your organisation has adopted. `name` and `version`\nare null if they cannot be looked up at that moment; the `id` is\nalways there.",
        "properties": {
          "methodology_id": {
            "format": "uuid",
            "title": "Methodology Id",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "subscribed_at": {
            "format": "date-time",
            "title": "Subscribed At",
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "methodology_id",
          "subscribed_at"
        ],
        "title": "AdoptedMethodology",
        "type": "object"
      },
      "AdoptedMethodologyList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AdoptedMethodology"
            },
            "title": "Items",
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "title": "AdoptedMethodologyList",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "Page_PublicTenantUser_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PublicTenantUser"
            },
            "title": "Items",
            "type": "array"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "page_size": {
            "title": "Page Size",
            "type": "integer"
          },
          "pages": {
            "title": "Pages",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "page",
          "page_size",
          "pages"
        ],
        "title": "Page[PublicTenantUser]",
        "type": "object"
      },
      "PublicAccessCodeCreate": {
        "description": "The access code to create: how many times it can be used, its\ntags, optionally the assessment that starts for each person who\njoins with it, and optionally who may use it (one email address or\none email domain). Codes always invite members.",
        "properties": {
          "assessment_channel": {
            "anyOf": [
              {
                "enum": [
                  "text",
                  "voice"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional: the assessment that starts for each person who newly joins with this code. Send both assessment fields or neither. The methodology must be one your organisation has adopted, and the channel one your organisation has enabled (422 otherwise).",
            "title": "Assessment Channel"
          },
          "assessment_methodology_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional: the assessment that starts for each person who newly joins with this code. Send both assessment fields or neither. The methodology must be one your organisation has adopted, and the channel one your organisation has enabled (422 otherwise).",
            "title": "Assessment Methodology Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional: the one person who may use this code. Only someone who signs in with this exact address, through Google or their company account, can join with it. The code is then single use: `max_uses` defaults to 1 and a higher value is refused (422). Send `email` or `email_domain`, not both.",
            "title": "Email"
          },
          "email_domain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional: only people who sign in with an address at exactly this domain (for example `acme.com`; `eu.acme.com` is a different domain), through Google or their company account, can join with this code. It can be used many times. Send `email` or `email_domain`, not both.",
            "title": "Email Domain"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "max_uses": {
            "anyOf": [
              {
                "minimum": 1,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Uses"
          },
          "tag_ids": {
            "description": "Tags auto-assigned to whoever joins through this code — group a campaign by team/department/cohort. Each must belong to your tenant (422 otherwise); ids come from GET /v1/tags.",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Tag Ids",
            "type": "array"
          }
        },
        "title": "PublicAccessCodeCreate",
        "type": "object"
      },
      "PublicTenantUser": {
        "description": "One of your organisation's people. `id` identifies them within\nyour organisation.",
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Canonical login email, platform-resolved; null when the identity lookup is momentarily unavailable.",
            "title": "Email"
          },
          "id": {
            "description": "This person's id within your organisation. Use it on every /v1/tenant-users route and when starting an assessment.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "job_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "joined_at": {
            "format": "date-time",
            "title": "Joined At",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Full name, platform-resolved; null like email.",
            "title": "Name"
          },
          "preferred_locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "BCP-47 tag. Decides the language an assessment runs in before the methodology default applies.",
            "title": "Preferred Locale"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tags": {
            "items": {
              "$ref": "#/components/schemas/PublicUserTag"
            },
            "title": "Tags",
            "type": "array"
          },
          "work_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Your organisation's own email for them.",
            "title": "Work Email"
          }
        },
        "required": [
          "id",
          "role",
          "status",
          "joined_at"
        ],
        "title": "PublicTenantUser",
        "type": "object"
      },
      "PublicUserPatch": {
        "additionalProperties": false,
        "description": "The fields to change on a member (JSON Merge Patch, RFC 7386).\nOmitted fields stay as they are; `null` is refused because none of\nthese can be removed. Unknown fields are refused. Tags have their\nown endpoints.",
        "properties": {
          "job_title": {
            "anyOf": [
              {
                "maxLength": 200,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Title"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 320,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "preferred_locale": {
            "anyOf": [
              {
                "maxLength": 35,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preferred Locale"
          },
          "role": {
            "anyOf": [
              {
                "enum": [
                  "admin",
                  "manager",
                  "member"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "status": {
            "anyOf": [
              {
                "enum": [
                  "active",
                  "removed"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "'invited' is owned by the invite flow and cannot be set here; re-activating a removed member is allowed.",
            "title": "Status"
          },
          "work_email": {
            "anyOf": [
              {
                "maxLength": 320,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Work Email"
          }
        },
        "title": "PublicUserPatch",
        "type": "object"
      },
      "PublicUserTag": {
        "description": "A tag as carried on a public user row — the axis and the value.",
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "type",
          "name"
        ],
        "title": "PublicUserTag",
        "type": "object"
      },
      "PublicUserTagAssign": {
        "additionalProperties": false,
        "description": "The tag to add to the member.",
        "properties": {
          "tag_id": {
            "format": "uuid",
            "title": "Tag Id",
            "type": "string"
          }
        },
        "required": [
          "tag_id"
        ],
        "title": "PublicUserTagAssign",
        "type": "object"
      },
      "TagRead": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "tenant_id": {
            "format": "uuid",
            "title": "Tenant Id",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "id",
          "tenant_id",
          "type",
          "name",
          "created_at"
        ],
        "title": "TagRead",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "VisitorSessionMintRequest": {
        "description": "The visitor to create a session for, and the methodology their\nassessment runs.",
        "properties": {
          "external_user_id": {
            "maxLength": 512,
            "minLength": 1,
            "title": "External User Id",
            "type": "string"
          },
          "locale": {
            "anyOf": [
              {
                "maxLength": 20,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The language the assessment and the widget run in for this visitor, as a BCP 47 tag such as `en-US` or `es-ES`. Omitted: the widget's default_locale. Carried in the session token.",
            "title": "Locale"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Opaque to Wiselook: stored on the visitor for your own attribution and returned by the admin visitor list.",
            "title": "Metadata",
            "type": "object"
          },
          "methodology_id": {
            "description": "The methodology this visitor's assessment runs. You choose it per visitor; there is no default.",
            "format": "uuid",
            "title": "Methodology Id",
            "type": "string"
          }
        },
        "required": [
          "external_user_id",
          "methodology_id"
        ],
        "title": "VisitorSessionMintRequest",
        "type": "object"
      },
      "VisitorSessionMintResponse": {
        "description": "The visitor's session token, to hand to the widget.",
        "properties": {
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "is_new_visitor": {
            "title": "Is New Visitor",
            "type": "boolean"
          },
          "session_jwt": {
            "title": "Session Jwt",
            "type": "string"
          },
          "tenant_end_user_id": {
            "format": "uuid",
            "title": "Tenant End User Id",
            "type": "string"
          }
        },
        "required": [
          "session_jwt",
          "expires_at",
          "tenant_end_user_id",
          "is_new_visitor"
        ],
        "title": "VisitorSessionMintResponse",
        "type": "object"
      },
      "WidgetBootstrapResponse": {
        "description": "A widget's configuration, as the widget reads it.",
        "properties": {
          "allow_individual_upgrade": {
            "title": "Allow Individual Upgrade",
            "type": "boolean"
          },
          "branding_overrides": {
            "additionalProperties": true,
            "title": "Branding Overrides",
            "type": "object"
          },
          "channel": {
            "enum": [
              "text",
              "voice"
            ],
            "title": "Channel",
            "type": "string"
          },
          "default_locale": {
            "title": "Default Locale",
            "type": "string"
          },
          "id_stability": {
            "enum": [
              "stable",
              "ephemeral",
              "unknown"
            ],
            "title": "Id Stability",
            "type": "string"
          },
          "methodology_id": {
            "format": "uuid",
            "title": "Methodology Id",
            "type": "string"
          },
          "widget_config_id": {
            "format": "uuid",
            "title": "Widget Config Id",
            "type": "string"
          }
        },
        "required": [
          "widget_config_id",
          "default_locale",
          "id_stability",
          "channel",
          "branding_overrides",
          "methodology_id",
          "allow_individual_upgrade"
        ],
        "title": "WidgetBootstrapResponse",
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "bearerFormat": "JWT",
        "description": "OAuth2 access token: a client-credentials token for your backend, or the visitor session token for the widget. See Authentication.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "title": "Wiselook Tenancy Service",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/access-codes": {
      "get": {
        "description": "Lists your organisation's access codes, with how many times each has been used.",
        "operationId": "list_access_codes_public_v1_access_codes_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AccessCodeResponse"
                  },
                  "title": "Response List Access Codes Public V1 Access Codes Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List access codes",
        "tags": [
          "Access codes"
        ]
      },
      "post": {
        "description": "Creates an invite code for your organisation. With `max_uses: 1` it is a single-use invite for one person: create one per person for a tracked rollout. A higher or omitted `max_uses` makes one shared campaign code.\n\nTo make a code usable by one person only, send their `email`: only someone who signs in with that address can join with it, and the code is single use. To limit a code to your company, send `email_domain` instead. Either way the address must be proven by the sign-in (Google or the person's company account); signing in with the Microsoft button does not prove it, so it cannot redeem a bound code.\n\nCodes always invite members; admins and managers are invited from the portal. Send an `Idempotency-Key` header to make retries safe.",
        "operationId": "create_access_code_public_v1_access_codes_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicAccessCodeCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessCodeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create access code",
        "tags": [
          "Access codes"
        ]
      }
    },
    "/v1/access-codes/{code_id}": {
      "delete": {
        "description": "Revokes an access code. People who already joined with it are not affected.\n\nA code that does not exist, or is not yours, also answers 204.",
        "operationId": "delete_access_code_public_v1_access_codes__code_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "code_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Code Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete access code",
        "tags": [
          "Access codes"
        ]
      }
    },
    "/v1/adopted-methodologies": {
      "get": {
        "description": "Lists the methodologies your organisation has adopted, with their name and version. Use their ids to start assessments.\n\nName and version are null if they cannot be looked up at that moment.",
        "operationId": "list_adopted_methodologies_public_v1_adopted_methodologies_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdoptedMethodologyList"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List adopted methodologies",
        "tags": [
          "Adopted methodologies"
        ]
      }
    },
    "/v1/tags": {
      "get": {
        "description": "Lists your organisation's tags. Use their ids as `tag_ids` when you create an access code, and to tag members. Tags are created in the portal.",
        "operationId": "list_tags_public_v1_tags_get",
        "parameters": [
          {
            "in": "query",
            "name": "tag_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag Type"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TagRead"
                  },
                  "title": "Response List Tags Public V1 Tags Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List tags",
        "tags": [
          "Tags"
        ]
      }
    },
    "/v1/tenant-users": {
      "get": {
        "description": "Lists the people in your organisation, newest first. Filters combine: a member must match all of them.",
        "operationId": "list_tenant_users_public_v1_tenant_users_get",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "required": false,
            "schema": {
              "default": 1,
              "minimum": 1,
              "title": "Page",
              "type": "integer"
            }
          },
          {
            "description": "Clamped to 200; the applied value is echoed.",
            "in": "query",
            "name": "page_size",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Clamped to 200; the applied value is echoed.",
              "minimum": 1,
              "title": "Page Size",
              "type": "integer"
            }
          },
          {
            "description": "Exact, case-insensitive match on the canonical login email — answers 'is this address a member of my organisation?'.",
            "in": "query",
            "name": "email",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 320,
                  "minLength": 3,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Exact, case-insensitive match on the canonical login email — answers 'is this address a member of my organisation?'.",
              "title": "Email"
            }
          },
          {
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "pattern": "^(admin|manager|member)$",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Role"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 32,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "tag_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_PublicTenantUser_"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List members",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/tenant-users/{tenant_user_id}": {
      "get": {
        "description": "Returns one member of your organisation.\n\nEmail and name are null if they cannot be looked up at that moment.",
        "operationId": "get_tenant_user_public_v1_tenant_users__tenant_user_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "tenant_user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tenant User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTenantUser"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get member",
        "tags": [
          "Members"
        ]
      },
      "patch": {
        "description": "Updates one member with a JSON Merge Patch (RFC 7386), sent as `application/merge-patch+json`. Include only the fields to change: `name`, `work_email`, `job_title`, `preferred_locale`, `role`, `status`. Omitted fields stay as they are; `null` is refused, because none of these can be removed.\n\nThe update applies completely or not at all. Tags have their own endpoints.",
        "operationId": "patch_tenant_user_public_v1_tenant_users__tenant_user_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "tenant_user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tenant User Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUserPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTenantUser"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update member",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/tenant-users/{tenant_user_id}/tags": {
      "get": {
        "description": "Lists one member's tags, ordered by type, then name.",
        "operationId": "list_tenant_user_tags_public_v1_tenant_users__tenant_user_id__tags_get",
        "parameters": [
          {
            "in": "path",
            "name": "tenant_user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tenant User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PublicUserTag"
                  },
                  "title": "Response List Tenant User Tags Public V1 Tenant Users  Tenant User Id  Tags Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List member tags",
        "tags": [
          "Members"
        ]
      },
      "post": {
        "description": "Adds one tag to a member and returns the updated member. Adding a tag the member already has changes nothing.",
        "operationId": "add_tenant_user_tag_public_v1_tenant_users__tenant_user_id__tags_post",
        "parameters": [
          {
            "in": "path",
            "name": "tenant_user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tenant User Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicUserTagAssign"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicTenantUser"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Add member tag",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/tenant-users/{tenant_user_id}/tags/{tag_id}": {
      "delete": {
        "description": "Removes one tag from a member. Removing a tag the member does not have changes nothing, but the tag must be one of your organisation's: an unknown tag id answers 422.",
        "operationId": "remove_tenant_user_tag_public_v1_tenant_users__tenant_user_id__tags__tag_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "tenant_user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tenant User Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "tag_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tag Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Remove member tag",
        "tags": [
          "Members"
        ]
      }
    },
    "/v1/widgets/{widget_id}": {
      "get": {
        "description": "Returns a widget's configuration: name, channel, branding, default language and methodology. The widget calls this itself with the visitor session token.",
        "operationId": "get_widget_v1_widgets__widget_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "widget_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Widget Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WidgetBootstrapResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get widget",
        "tags": [
          "Widgets"
        ]
      }
    },
    "/v1/widgets/{widget_id}/sessions": {
      "post": {
        "description": "Creates a session token for one visitor of a widget. Call it from your backend and hand the token to the widget on your page.\n\nCalling it again with the same `external_user_id` returns a session for the same visitor, so an unfinished assessment resumes.",
        "operationId": "mint_visitor_session_v1_widgets__widget_id__sessions_post",
        "parameters": [
          {
            "in": "path",
            "name": "widget_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Widget Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VisitorSessionMintRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VisitorSessionMintResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create visitor session",
        "tags": [
          "Widgets"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.wiselook.com",
      "description": "Wiselook public API"
    }
  ]
}
