{
  "openapi": "3.1.1",
  "info": {
    "title": "FlowPrime portal",
    "description": "Customer portal: plans, checkout and subscription self-service.",
    "version": "1.0.3-30e59a5"
  },
  "servers": [
    {
      "url": "https://{org}.portal.fastflow.tech",
      "description": "Tenant host. The org slug is also accepted as the X-Org-Slug header.",
      "variables": {
        "org": {
          "default": "your-org",
          "description": "Your FlowPrime organization slug"
        }
      }
    }
  ],
  "paths": {
    "/auth/login": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "returnUrl",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "login_hint",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/auth/callback": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/my-accounts": {
      "get": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/switch-account": {
      "post": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/auth/logout": {
      "get": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/auth/stripe-callback": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "session_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/checkout": {
      "post": {
        "tags": [
          "Portal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "priceId",
                  "product",
                  "cancelUrl",
                  "mode",
                  "successUrl"
                ],
                "type": "object",
                "properties": {
                  "priceId": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "product": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "cancelUrl": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "mode": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "successUrl": {
                    "type": [
                      "null",
                      "string"
                    ]
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/checkout/{product}": {
      "get": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "product",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/admin/databases": {
      "get": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/health/live": {
      "get": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/health/ready": {
      "get": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/portal/api/branding": {
      "get": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Portal"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandingDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/tenants/provision": {
      "post": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/tenants/activate": {
      "post": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/tenants/deactivate": {
      "post": {
        "tags": [
          "Portal"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/tenants/{orgSlug}": {
      "delete": {
        "tags": [
          "Portal"
        ],
        "parameters": [
          {
            "name": "orgSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BrandingDto": {
        "required": [
          "logoUrl",
          "productName",
          "companyName",
          "faviconUrl",
          "primaryColor",
          "accentColor",
          "backgroundColor",
          "surfaceColor",
          "textColor",
          "textMutedColor",
          "borderColor",
          "fontFamily",
          "fontUrl"
        ],
        "type": "object",
        "properties": {
          "logoUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "productName": {
            "type": [
              "null",
              "string"
            ]
          },
          "companyName": {
            "type": [
              "null",
              "string"
            ]
          },
          "faviconUrl": {
            "type": [
              "null",
              "string"
            ]
          },
          "primaryColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "accentColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "backgroundColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "surfaceColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "textColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "textMutedColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "borderColor": {
            "type": [
              "null",
              "string"
            ]
          },
          "fontFamily": {
            "type": [
              "null",
              "string"
            ]
          },
          "fontUrl": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Portal"
    }
  ]
}