{
  "x-generator": "NSwag v14.6.2.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0))",
  "openapi": "3.0.0",
  "info": {
    "title": "Infuse Admin Center API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.dev.infuse-cloud.io"
    }
  ],
  "paths": {
    "/api/public/organisations/{organisationId}": {
      "get": {
        "tags": ["Public", "Api"],
        "summary": "Get public organisation",
        "description": "Retrieves a public organisation profile by organisation identifier.",
        "operationId": "InfusePlatformTenantsApiEndpointsPublicOrganisationsGetPublicOrganisationByIdEndpoint",
        "parameters": [
          {
            "name": "organisationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicOrganisationProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/public/organisations": {
      "get": {
        "tags": ["Public", "Api"],
        "summary": "List public organisations",
        "description": "Returns a paginated collection of public organisation profiles.",
        "operationId": "InfusePlatformTenantsApiEndpointsPublicOrganisationsGetPublicOrganisationsEndpoint",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "orderBy",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPublicOrganisationsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/tenants/orgs/users": {
      "post": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Add Organisation User",
        "description": "Invites or adds a new user to the specified organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationUsersAddOrganisationUserEndpoint",
        "requestBody": {
          "x-name": "AddOrganisationUserRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddOrganisationUserRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Get Organisation Users",
        "description": "Lists all users in the specified organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationUsersGetOrganisationUsersEndpoint",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "orderBy",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrganisationUsersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/tenants/orgs/users/{userId}": {
      "delete": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Delete Organisation User",
        "description": "Soft deletes or removes a user from the specified organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationUsersDeleteOrganisationUserEndpoint",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "put": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Update Organisation User",
        "description": "Updates the user's information, such as their role, in the specified organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationUsersUpdateOrganisationUserRoleEndpoint",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "requestBody": {
          "x-name": "UpdateOrganisationUserRoleRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganisationUserRoleRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/tenants/orgs/invitations/accept": {
      "post": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Accept Organisation User Invite",
        "description": "Accepts an invitation to join the specified organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationUserInvitesAcceptOrganisationUserInviteEndpoint",
        "requestBody": {
          "x-name": "AcceptOrganisationUserInviteRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptOrganisationUserInviteRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/tenants/orgs/invitations/{inviteId}/cancel": {
      "post": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Cancel Organisation User Invite",
        "description": "Cancels the invitation for the specified user.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationUserInvitesCancelOrganisationUserInviteEndpoint",
        "parameters": [
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/tenants/orgs/invitations/{inviteCode}": {
      "get": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Get Organisation User Invite Details",
        "description": "Retrieves the details of a specific organisation user invite.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationUserInvitesGetOrganisationUserInviteDetailsEndpoint",
        "parameters": [
          {
            "name": "inviteCode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrganisationUserInviteDetailsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/tenants/orgs/invitations": {
      "get": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Get Organisation User Invites",
        "description": "Retrieves the list of organisation user invites.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationUserInvitesGetOrganisationUserInvitesEndpoint",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "nullable": true,
              "allOf": [
                {
                  "$ref": "#/components/schemas/InviteStatus"
                }
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "orderBy",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrganisationUserInvitesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/tenants/orgs": {
      "post": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Create Organisation",
        "description": "Creates a new organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationsCreateOrganisationEndpoint",
        "requestBody": {
          "x-name": "CreateOrganisationRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganisationRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Orgs", "Tenants"],
        "summary": "List Organisations",
        "description": "Retrieves the organisations accessible to the current user.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationsGetOrganisationsEndpoint",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "orderBy",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          },
          {
            "name": "direction",
            "in": "query",
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrganisationsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/tenants/org": {
      "get": {
        "tags": ["Org", "Tenants"],
        "summary": "Get Organisation",
        "description": "Retrieves the profile information for a specific organisation by its ID.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationsGetOrganisationByIdEndpoint",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrganisationByIdResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "put": {
        "tags": ["Org", "Tenants"],
        "summary": "Update Organisation",
        "description": "Updates the details of an organisation. Admin access required.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationsUpdateOrganisationDetailsEndpoint",
        "requestBody": {
          "x-name": "UpdateOrganisationDetailsRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganisationDetailsRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/tenants/orgs/workspace-available": {
      "post": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Check workspace availability",
        "description": "Checks if a workspace name is available for registration.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationsWorkspaceAvailableEndpoint",
        "requestBody": {
          "x-name": "WorkspaceAvailableRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkspaceAvailableRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceAvailableResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/tenants/org/assets/{assetId}": {
      "delete": {
        "tags": ["Org", "Tenants"],
        "summary": "Delete Organisation Asset",
        "description": "Deletes an organisation asset and removes the backing storage object.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationsAssetsOrganisationAssetDeleteEndpoint",
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/tenants/org/assets/{assetId}/finalise": {
      "post": {
        "tags": ["Org", "Tenants"],
        "summary": "Finalise Organisation Asset Upload",
        "description": "Marks an organisation asset upload session as complete.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationsAssetsOrganisationAssetFinaliseEndpoint",
        "parameters": [
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          }
        ],
        "requestBody": {
          "x-name": "OrganisationAssetUploadFinaliseRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganisationAssetUploadFinaliseRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/tenants/org/assets/upload-session": {
      "post": {
        "tags": ["Org", "Tenants"],
        "summary": "Create Organisation Asset Upload Session",
        "description": "Initialises an upload session for an organisation asset and returns storage details.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationsAssetsOrganisationAssetUploadSessionEndpoint",
        "requestBody": {
          "x-name": "OrganisationAssetUploadSessionRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrganisationAssetUploadSessionRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganisationAssetUploadSessionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/tenants/orgs/auth-provider": {
      "delete": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Delete Auth Provider",
        "description": "Deletes the custom auth provider and reverts to the default for the organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationAuthProviderDeleteOrganisationAuthProviderEndpoint",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Get Auth Provider",
        "description": "Retrieves the authentication provider configuration for the organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationAuthProviderGetOrganisationAuthProviderEndpoint",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOrganisationAuthProviderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "put": {
        "tags": ["Orgs", "Tenants"],
        "summary": "Update Auth Provider",
        "description": "Configures a custom SSO authentication provider for the organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsOrganisationAuthProviderUpdateOrganisationAuthProviderEndpoint",
        "requestBody": {
          "x-name": "UpdateOrganisationAuthProviderRequest",
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOrganisationAuthProviderRequest"
              }
            }
          },
          "required": true,
          "x-position": 1
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    },
    "/tenants/api-keys": {
      "post": {
        "tags": ["API Keys", "Tenants"],
        "summary": "Create API Key",
        "description": "Creates a new API key for the organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsApiKeysCreateApiKeyEndpoint",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeysEndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      },
      "get": {
        "tags": ["API Keys", "Tenants"],
        "summary": "Get API Keys",
        "description": "Retrieves the API keys for the organisation.",
        "operationId": "InfusePlatformTenantsApiEndpointsApiKeysGetApiKeysEndpoint",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetApiKeysEndpointResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails2"
                }
              }
            }
          }
        },
        "security": [
          {
            "Bearer": []
          },
          {
            "DirectApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "PublicOrganisationProfileResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "workspace": {
            "type": "string"
          },
          "profilePictureUrl": {
            "type": "string",
            "nullable": true
          },
          "bannerImageUrl": {
            "type": "string",
            "nullable": true
          },
          "websiteUrl": {
            "type": "string",
            "nullable": true
          },
          "termsOfUseUrl": {
            "type": "string",
            "nullable": true
          },
          "privacyPolicyUrl": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "default": "https://www.rfc-editor.org/rfc/rfc7231#section-6.5.1"
          },
          "title": {
            "type": "string",
            "default": "One or more validation errors occurred."
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "default": 400
          },
          "instance": {
            "type": "string",
            "default": "/api/route"
          },
          "traceId": {
            "type": "string",
            "default": "0HMPNHL0JHL76:00000001"
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemDetails_Error"
            }
          }
        }
      },
      "ProblemDetails_Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "default": "Error or field name"
          },
          "reason": {
            "type": "string",
            "default": "Error reason"
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "GetPublicOrganisationsResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PagedResponseOfPublicOrganisationProfileResponse"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "PagedResponseOfPublicOrganisationProfileResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicOrganisationProfileResponse"
            }
          }
        }
      },
      "GetPublicOrganisationsRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PagedRequest"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "PagedRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "ProblemDetails2": {
        "type": "object",
        "additionalProperties": {
          "nullable": true
        },
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AddOrganisationUserRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["email", "name", "role"],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "minLength": 1,
            "pattern": "^[^@]+@[^@]+$",
            "nullable": false
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "nullable": false
          },
          "role": {
            "type": "string",
            "minLength": 1,
            "nullable": false
          }
        }
      },
      "GetOrganisationUsersResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PagedResponseOfOrganisationUserDto"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "PagedResponseOfOrganisationUserDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganisationUserDto"
            }
          }
        }
      },
      "OrganisationUserDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "userId": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "profilePictureAssetId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "profilePictureUrl": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "GetOrganisationUsersRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PagedRequest"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "UpdateOrganisationUserRoleRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "role": {
            "type": "string"
          }
        }
      },
      "AcceptOrganisationUserInviteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["inviteCode"],
        "properties": {
          "inviteCode": {
            "type": "string",
            "minLength": 1,
            "nullable": false
          }
        }
      },
      "CancelOrganisationUserInviteRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "GetOrganisationUserInviteDetailsResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organisationName": {
            "type": "string"
          },
          "organisationWorkspace": {
            "type": "string"
          },
          "organisationProfilePictureAssetId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "organisationProfilePictureUrl": {
            "type": "string",
            "nullable": true
          },
          "invitedByName": {
            "type": "string"
          },
          "invitedByProfilePictureAssetId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "invitedByProfilePictureUrl": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "isExpired": {
            "type": "boolean"
          }
        }
      },
      "GetOrganisationUserInviteDetailsRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "GetOrganisationUserInvitesResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PagedResponseOfOrganisationUserInviteDto"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "PagedResponseOfOrganisationUserInviteDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrganisationUserInviteDto"
            }
          }
        }
      },
      "OrganisationUserInviteDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "inviteId": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "invitedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "acceptedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isAccepted": {
            "type": "boolean"
          },
          "invitedByUserId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "status": {
            "type": "string"
          }
        }
      },
      "GetOrganisationUserInvitesRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PagedRequest"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "InviteStatus": {
        "type": "string",
        "description": "",
        "x-enumNames": ["Pending", "Accepted", "Expired", "Revoked"],
        "enum": ["pending", "accepted", "expired", "revoked"]
      },
      "CreateOrganisationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["organisationName"],
        "properties": {
          "organisationName": {
            "type": "string",
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^(?!xn--)(?!-)(?!.*-$)(?!\\d+$)(?!\\d+(?:-\\d+){3}$)[a-zA-Z0-9- ]+$",
            "nullable": false
          }
        }
      },
      "GetOrganisationByIdResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "organisationId": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "legalName": {
            "type": "string",
            "nullable": true
          },
          "companyNumber": {
            "type": "string",
            "nullable": true
          },
          "contactEmail": {
            "type": "string",
            "nullable": true
          },
          "feedbackEmail": {
            "type": "string",
            "nullable": true
          },
          "profilePictureAssetId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "profilePictureUrl": {
            "type": "string",
            "nullable": true
          },
          "bannerAssetId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "bannerAssetUrl": {
            "type": "string",
            "nullable": true
          },
          "themeConfigJson": {
            "type": "string",
            "nullable": true
          },
          "allowDirectApiKeyAuth": {
            "type": "boolean"
          },
          "customDomain": {
            "type": "string",
            "nullable": true
          },
          "infuseIotOrgId": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "workspace": {
            "type": "string"
          },
          "websiteUrl": {
            "type": "string",
            "nullable": true
          },
          "termsOfUseUrl": {
            "type": "string",
            "nullable": true
          },
          "privacyPolicyUrl": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "GetOrganisationsResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PagedResponseOfGetOrganisationByIdResponse"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "PagedResponseOfGetOrganisationByIdResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "page": {
            "type": "integer",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "format": "int32"
          },
          "hasPreviousPage": {
            "type": "boolean"
          },
          "hasNextPage": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GetOrganisationByIdResponse"
            }
          }
        }
      },
      "GetOrganisationsRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PagedRequest"
          },
          {
            "type": "object",
            "additionalProperties": false
          }
        ]
      },
      "UpdateOrganisationDetailsRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "legalName": {
            "type": "string",
            "nullable": true
          },
          "companyNumber": {
            "type": "string",
            "nullable": true
          },
          "contactEmail": {
            "type": "string",
            "nullable": true
          },
          "feedbackEmail": {
            "type": "string",
            "nullable": true
          },
          "themeConfigJson": {
            "type": "string",
            "nullable": true
          },
          "allowDirectApiKeyAuth": {
            "type": "boolean",
            "nullable": true
          },
          "customDomain": {
            "type": "string",
            "nullable": true
          },
          "websiteUrl": {
            "type": "string",
            "nullable": true
          },
          "termsOfUseUrl": {
            "type": "string",
            "nullable": true
          },
          "privacyPolicyUrl": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "WorkspaceAvailableResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "isAvailable": {
            "type": "boolean"
          }
        }
      },
      "WorkspaceAvailableRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "workspace": {
            "type": "string"
          }
        }
      },
      "DeleteOrganisationAssetRequest": {
        "type": "object",
        "additionalProperties": false
      },
      "OrganisationAssetUploadFinaliseRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "width": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "exclusiveMinimum": true
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "exclusiveMinimum": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "OrganisationAssetUploadSessionResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "assetId": {
            "type": "string",
            "format": "guid"
          },
          "uploadUri": {
            "type": "string"
          },
          "resourceUri": {
            "type": "string"
          },
          "storageKey": {
            "type": "string"
          },
          "storageContainer": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "fileName": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "OrganisationAssetUploadSessionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["assetType", "mimeType"],
        "properties": {
          "assetType": {
            "type": "string",
            "maxLength": 100,
            "minLength": 0,
            "nullable": false
          },
          "mimeType": {
            "type": "string",
            "maxLength": 200,
            "minLength": 0,
            "nullable": false
          },
          "fileName": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "GetOrganisationAuthProviderResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "authProviderId": {
            "type": "string",
            "format": "guid"
          },
          "providerType": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "metadataUrl": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "UpdateOrganisationAuthProviderRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "providerType": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "metadataUrl": {
            "type": "string"
          }
        }
      },
      "CreateApiKeysEndpointResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "apiKey": {
            "type": "string"
          }
        }
      },
      "GetApiKeysEndpointResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKeyDto"
            }
          }
        }
      },
      "ApiKeyDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "apiKey": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Authorization: Bearer <access_token>",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "DirectApiKey": {
        "type": "apiKey",
        "description": "Authorization: ApiKey ik_<keyId>.<keySecret>",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "API",
      "tags": ["Public"]
    },
    {
      "name": "Tenants",
      "tags": ["API Keys", "Org", "Orgs"]
    }
  ]
}
