{
    "openapi": "3.0.0",
    "info": {
        "title": "Zapier API Documentation",
        "description": "API documentation for Zapier integration.",
        "contact": {
            "email": "support@yourdomain.com"
        },
        "version": "1.0.0"
    },
    "paths": {
        "/api/authentication": {
            "post": {
                "tags": [
                    "AI"
                ],
                "summary": "AI Login Authentication",
                "operationId": "e90245824e938e1c0aa19c5c8e9286e3",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "email",
                                    "password"
                                ],
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "example": "aiuser@example.com"
                                    },
                                    "password": {
                                        "type": "string",
                                        "example": "password123"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful login",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "access_token": {
                                            "type": "string"
                                        },
                                        "token_type": {
                                            "type": "string"
                                        },
                                        "expires_in": {
                                            "type": "integer"
                                        },
                                        "HasAIAccess": {
                                            "type": "boolean"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid credentials"
                    },
                    "404": {
                        "description": "User not found"
                    },
                    "422": {
                        "description": "Validation error"
                    }
                }
            }
        },
        "/api/generate-Auth-Token": {
            "post": {
                "tags": [
                    "AI"
                ],
                "summary": "Refresh auth token for AI",
                "operationId": "fe3c8611710a3714f402c999780943ab",
                "responses": {
                    "200": {
                        "description": "Token refreshed"
                    },
                    "401": {
                        "description": "Unauthorized"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/ai-Course-Create": {
            "post": {
                "tags": [
                    "AI"
                ],
                "summary": "Create course using AI",
                "operationId": "187943a1706ca67f4d1b1460119ba9bc",
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "description": "Access token for authentication",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "example": "AI in Education"
                                    },
                                    "description": {
                                        "type": "string",
                                        "example": "Course about AI tools"
                                    },
                                    "category_id": {
                                        "type": "integer",
                                        "example": 1
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Course created successfully"
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/api/get-Category-List": {
            "get": {
                "tags": [
                    "AI"
                ],
                "summary": "Get category list for authenticated user",
                "operationId": "faadd20513263c8339638d135c027c53",
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "description": "Access token for authentication",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of categories"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "404": {
                        "description": "User not found"
                    }
                }
            }
        },
        "/api/jwt-token-generate": {
            "post": {
                "tags": [
                    "AI"
                ],
                "summary": "AI Login Authentication using User ID",
                "description": "Generate JWT token using only the user's ID.",
                "operationId": "36f4c0bd5fe7a65fb058e5ba48370c9d",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "user_id"
                                ],
                                "properties": {
                                    "user_id": {
                                        "type": "integer",
                                        "example": 111
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful login",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "access_token": {
                                            "type": "string",
                                            "example": "eyJ0eXAiOiJKV1QiLCJhb..."
                                        },
                                        "token_type": {
                                            "type": "string",
                                            "example": "bearer"
                                        },
                                        "expires_in": {
                                            "type": "integer",
                                            "example": 7200
                                        },
                                        "has_ai_acces": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "app_url": {
                                            "type": "string",
                                            "example": "http://localhost"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized - Invalid credentials"
                    },
                    "404": {
                        "description": "User not found"
                    },
                    "422": {
                        "description": "Validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "code": {
                                            "type": "integer",
                                            "example": 422
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Validation error"
                                        },
                                        "errors": {
                                            "properties": {
                                                "user_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "Invalid user ID"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/ai-course/create": {
            "post": {
                "tags": [
                    "AI"
                ],
                "summary": "Create a course using AI with detailed information and SCORM upload",
                "operationId": "03aea085c310ff23fae4a39fbe1e23b3",
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "description": "Access token for authentication",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "courseTitle",
                                    "courseType",
                                    "type",
                                    "thumbnail",
                                    "titleOnCertificate",
                                    "courseSubTitle",
                                    "coursedescription",
                                    "courseCategory",
                                    "file",
                                    "courseId",
                                    "isReplace"
                                ],
                                "properties": {
                                    "courseTitle": {
                                        "type": "string",
                                        "example": "AI in Education"
                                    },
                                    "courseType": {
                                        "type": "string",
                                        "example": "online"
                                    },
                                    "type": {
                                        "type": "string",
                                        "example": "2"
                                    },
                                    "thumbnail": {
                                        "description": "Thumbnail image file",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "titleOnCertificate": {
                                        "type": "string",
                                        "example": "AI Masterclass"
                                    },
                                    "courseSubTitle": {
                                        "type": "string",
                                        "example": "Learn about AI in education"
                                    },
                                    "coursedescription": {
                                        "type": "string",
                                        "example": "Detailed course description here"
                                    },
                                    "courseCategory": {
                                        "type": "integer",
                                        "example": 3
                                    },
                                    "file": {
                                        "description": "SCORM zip file",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "courseId": {
                                        "type": "string",
                                        "example": "12324"
                                    },
                                    "isReplace": {
                                        "type": "boolean",
                                        "example": true
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Course created successfully",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "course created successfully"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validation error"
                    },
                    "401": {
                        "description": "Unauthorized"
                    },
                    "500": {
                        "description": "Internal Server Error"
                    }
                }
            }
        },
        "/api/ai-courseId/check": {
            "post": {
                "tags": [
                    "AI"
                ],
                "summary": "Check AI course ID exists",
                "operationId": "4a1855f06b8f50b3bd343db72b3c4776",
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "description": "Access token for authentication",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "ai_course_id"
                                ],
                                "properties": {
                                    "ai_course_id": {
                                        "type": "string",
                                        "example": "12345"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Success"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                }
            }
        },
        "/api/departments": {
            "get": {
                "tags": [
                    "Departments"
                ],
                "summary": "List departments for the authenticated user",
                "description": "Returns departments created by the authenticated user. Supports optional search by department name.",
                "operationId": "0e686d9994a7bb0c1f050c5db8cc6e6a",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Filter departments by name (partial match)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Sales"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of departments",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 1
                                                    },
                                                    "department_name": {
                                                        "type": "string",
                                                        "example": "Sales"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized – token missing or invalid",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Token not provided"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/departments/{id}/students": {
            "get": {
                "tags": [
                    "Departments"
                ],
                "summary": "List students in a department",
                "description": "Returns all students belonging to the given department. Supports optional search by student name or email.",
                "operationId": "532c54f83b22f1e1a34dde69e2d4236d",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "Department ID",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Filter by student name or email (partial match)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "john"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of students",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "integer",
                                                        "example": 10
                                                    },
                                                    "user_id": {
                                                        "type": "integer",
                                                        "example": 42
                                                    },
                                                    "first_name": {
                                                        "type": "string",
                                                        "example": "John"
                                                    },
                                                    "last_name": {
                                                        "type": "string",
                                                        "example": "Doe"
                                                    },
                                                    "email": {
                                                        "type": "string",
                                                        "example": "john@example.com"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Department not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Department not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized – token missing or invalid",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Token not provided"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/gong/calls": {
            "get": {
                "tags": [
                    "Gong"
                ],
                "summary": "List all Gong calls",
                "description": "Returns a paginated list of Gong calls with summary information including title, duration, parties, topics, brief and call outcome. Requires the GONG API token passed as a request header.",
                "operationId": "fe4648b18beff32f4cbd499c3fb98a57",
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of calls per page (max 100, default 20)",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 20,
                            "maximum": 100,
                            "example": 20
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1,
                            "example": 1
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of Gong calls",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "string",
                                                        "example": "7782342274025937035"
                                                    },
                                                    "title": {
                                                        "type": "string",
                                                        "example": "Discovery Call - Acme Corp"
                                                    },
                                                    "started": {
                                                        "type": "string",
                                                        "format": "date-time",
                                                        "example": "2024-03-01T10:00:00Z"
                                                    },
                                                    "duration_sec": {
                                                        "type": "integer",
                                                        "example": 2743
                                                    },
                                                    "url": {
                                                        "type": "string",
                                                        "example": "https://app.gong.io/call?id=7782342274025937035"
                                                    },
                                                    "direction": {
                                                        "type": "string",
                                                        "example": "Outbound"
                                                    },
                                                    "is_private": {
                                                        "type": "boolean",
                                                        "example": false
                                                    },
                                                    "parties": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string",
                                                                    "example": "234599484848423"
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "John Smith"
                                                                },
                                                                "email": {
                                                                    "type": "string",
                                                                    "example": "john@company.com"
                                                                },
                                                                "affiliation": {
                                                                    "type": "string",
                                                                    "example": "Internal"
                                                                },
                                                                "title": {
                                                                    "type": "string",
                                                                    "example": "Account Executive"
                                                                },
                                                                "speaker_id": {
                                                                    "type": "string",
                                                                    "example": "s1"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "topics": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "Pricing"
                                                                },
                                                                "duration": {
                                                                    "type": "integer",
                                                                    "example": 340
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    },
                                                    "brief": {
                                                        "type": "string",
                                                        "example": "Discussion about pricing and next steps."
                                                    },
                                                    "call_outcome": {
                                                        "type": "string",
                                                        "example": "Positive"
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "properties": {
                                                "total": {
                                                    "type": "integer",
                                                    "example": 120
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 20
                                                },
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 6
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized – token missing or invalid",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Token missing or invalid token"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/gong/calls/{call_id}": {
            "get": {
                "tags": [
                    "Gong"
                ],
                "summary": "Get Gong call detail",
                "description": "Returns full extracted information for a single Gong call including metadata, parties, content analysis (brief, key points, highlights, outline, trackers), interaction stats, speaker breakdown, questions, public comments, media URL and CRM context.",
                "operationId": "39abb5013bdd6474b681096e424db819",
                "parameters": [
                    {
                        "name": "call_id",
                        "in": "path",
                        "description": "Gong call ID",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "7782342274025937035"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Full call detail",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "example": "7782342274025937035"
                                                },
                                                "title": {
                                                    "type": "string",
                                                    "example": "Discovery Call - Acme Corp"
                                                },
                                                "started": {
                                                    "type": "string",
                                                    "format": "date-time",
                                                    "example": "2024-03-01T10:00:00Z"
                                                },
                                                "duration_sec": {
                                                    "type": "integer",
                                                    "example": 2743
                                                },
                                                "url": {
                                                    "type": "string",
                                                    "example": "https://app.gong.io/call?id=7782342274025937035"
                                                },
                                                "direction": {
                                                    "type": "string",
                                                    "example": "Outbound"
                                                },
                                                "is_private": {
                                                    "type": "boolean",
                                                    "example": false
                                                },
                                                "meeting_url": {
                                                    "type": "string",
                                                    "example": "https://zoom.us/j/123456"
                                                },
                                                "primary_user_id": {
                                                    "type": "string",
                                                    "example": "234599484848423"
                                                },
                                                "parties": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "string",
                                                                "example": "234599484848423"
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "John Smith"
                                                            },
                                                            "email": {
                                                                "type": "string",
                                                                "example": "john@company.com"
                                                            },
                                                            "affiliation": {
                                                                "type": "string",
                                                                "example": "Internal"
                                                            },
                                                            "title": {
                                                                "type": "string",
                                                                "example": "Account Executive"
                                                            },
                                                            "speaker_id": {
                                                                "type": "string",
                                                                "example": "s1"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "brief": {
                                                    "type": "string",
                                                    "example": "Discussion about pricing and next steps."
                                                },
                                                "call_outcome": {
                                                    "type": "string",
                                                    "example": "Positive"
                                                },
                                                "key_points": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string",
                                                        "example": "Customer interested in enterprise plan"
                                                    }
                                                },
                                                "highlights": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "topics": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "name": {
                                                                "type": "string",
                                                                "example": "Pricing"
                                                            },
                                                            "duration": {
                                                                "type": "integer",
                                                                "example": 340
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "outline": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "trackers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "speakers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "questions": {
                                                    "properties": {
                                                        "company_questions": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object"
                                                            }
                                                        },
                                                        "non_company_questions": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object"
                                                            }
                                                        }
                                                    },
                                                    "type": "object"
                                                },
                                                "interaction_stats": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "public_comments": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "media_url": {
                                                    "type": "string",
                                                    "example": "https://storage.gong.io/..."
                                                },
                                                "context": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "object_type": {
                                                                "type": "string",
                                                                "example": "Opportunity"
                                                            },
                                                            "object_id": {
                                                                "type": "string",
                                                                "example": "opp_001"
                                                            },
                                                            "fields": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object"
                                                                }
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthorized – token missing or invalid",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Token missing or invalid token"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Call not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Call not found"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/gong/user-gong-calls-list": {
            "get": {
                "tags": [
                    "Gong"
                ],
                "summary": "Get paginated users and calls",
                "operationId": "2daca0ad4a323a459a1198e1129747e8",
                "parameters": [
                    {
                        "name": "email",
                        "in": "query",
                        "description": "Filter by email (partial match, case-insensitive)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "john@example.com"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of results per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "example": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/gong/user-gong-calls-by-email": {
            "get": {
                "tags": [
                    "Gong"
                ],
                "summary": "Get all Gong calls for a specific email",
                "description": "Returns a paginated list of all Gong call records belonging to the given email address.",
                "operationId": "8ff8236eb2b7a48f38e64a28c5fde1ec",
                "parameters": [
                    {
                        "name": "email",
                        "in": "query",
                        "description": "Email address to fetch calls for (exact match)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "john@example.com"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1,
                            "example": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of results per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10,
                            "example": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of calls for the email",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "properties": {
                                                "total": {
                                                    "type": "integer",
                                                    "example": 50
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 5
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Email is required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Email is required"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/gong/user-gong-managers": {
            "get": {
                "tags": [
                    "Gong"
                ],
                "summary": "Get unique manager emails",
                "description": "Returns a paginated list of unique manager email addresses derived from Gong call records.",
                "operationId": "fd332aacc51fde784b75a4ea63fe94d1",
                "parameters": [
                    {
                        "name": "email",
                        "in": "query",
                        "description": "Filter by manager email (partial match, case-insensitive)",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "manager@example.com"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1,
                            "example": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of results per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10,
                            "example": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of unique manager emails",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "manager@example.com"
                                            }
                                        },
                                        "meta": {
                                            "properties": {
                                                "total": {
                                                    "type": "integer",
                                                    "example": 25
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 3
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/gong/employees-by-manager": {
            "get": {
                "tags": [
                    "Gong"
                ],
                "summary": "Get employees under a manager",
                "description": "Returns a paginated list of unique employee emails whose calls are associated with the given manager email.",
                "operationId": "31171c6b219e1e90bc39f3c2c3c35acc",
                "parameters": [
                    {
                        "name": "manager_email",
                        "in": "query",
                        "description": "Manager email address to filter by (exact match)",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "manager@example.com"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "Page number",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 1,
                            "example": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Number of results per page",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "default": 10,
                            "example": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated list of unique employee emails under the given manager",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string",
                                                "example": "employee@example.com"
                                            }
                                        },
                                        "meta": {
                                            "properties": {
                                                "total": {
                                                    "type": "integer",
                                                    "example": 8
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "example": 10
                                                },
                                                "current_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "example": 1
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "manager_email is required",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "manager_email is required"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/gong/configuration": {
            "post": {
                "tags": [
                    "Gong"
                ],
                "summary": "Store Gong Configuration",
                "description": "Insert gong configuration using JWT token",
                "operationId": "3a6227820d5610036c4a2387176a57d1",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "security_key"
                                ],
                                "properties": {
                                    "security_key": {
                                        "type": "string",
                                        "example": "api_key"
                                    },
                                    "security_value": {
                                        "type": "string",
                                        "example": "123456"
                                    },
                                    "frequncy": {
                                        "type": "string",
                                        "example": "weekly"
                                    },
                                    "frequency_days": {
                                        "type": "integer",
                                        "example": 7
                                    },
                                    "talk_ratio": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 45.5
                                    },
                                    "longest_monologue": {
                                        "type": "integer",
                                        "example": 120
                                    },
                                    "customer_story": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 30
                                    },
                                    "interacivity": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 75.25
                                    },
                                    "patience": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 60
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Configuration stored successfully"
                    },
                    "401": {
                        "description": "Unauthorized"
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/zapier/authentication": {
            "post": {
                "tags": [
                    "Zapier"
                ],
                "summary": "Authenticate Zapier user",
                "description": "Validates a Zapier token and returns user information",
                "operationId": "21b4a5c3b2bfd1319cc5f82831e495e3",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "token"
                                ],
                                "properties": {
                                    "token": {
                                        "type": "string",
                                        "example": "abc123xyz"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Authentication successful",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "user": {
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 12
                                                },
                                                "name": {
                                                    "type": "string",
                                                    "example": "Camilla Hansen"
                                                },
                                                "email": {
                                                    "type": "string",
                                                    "example": "camilla@example.com"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error or token invalid"
                    }
                }
            }
        },
        "/api/zapier/trigger/create-task": {
            "get": {
                "tags": [
                    "Zapier"
                ],
                "summary": "Create sample Zapier tasks",
                "description": "Simulates creation of Zapier tasks",
                "operationId": "68e18edbc1ab93c769d2ac362c9df01c",
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "description": "Access token for authentication",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success"
                    }
                }
            }
        },
        "/api/zapier/trigger/create-action": {
            "post": {
                "tags": [
                    "Zapier"
                ],
                "summary": "Simulate Zapier action",
                "description": "Returns a sample action result from a predefined user",
                "operationId": "4e0900f6c3ec10886c680c191298dcbc",
                "responses": {
                    "200": {
                        "description": "Sample action",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "id": {
                                            "type": "integer",
                                            "example": 100001
                                        },
                                        "title": {
                                            "type": "string",
                                            "example": "Camilla Hansen"
                                        },
                                        "created_at": {
                                            "type": "string",
                                            "format": "date-time"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/zapier/trigger/new-enrollments": {
            "get": {
                "tags": [
                    "Zapier"
                ],
                "summary": "Get list of users associated with a Zapier token",
                "description": "Returns a list of users connected to the organization based on the provided Zapier token.",
                "operationId": "42929bffeacbed349eed24ac40f054c3",
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "description": "Zapier authentication token",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of users",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "type": "integer",
                                                "example": 123
                                            },
                                            "name": {
                                                "type": "string",
                                                "example": "John Doe"
                                            },
                                            "email": {
                                                "type": "string",
                                                "example": "john@example.com"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Token invalid or server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "example": "Invalid or expired token."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/zapier/trigger/get-remainder-notifications": {
            "get": {
                "tags": [
                    "Zapier"
                ],
                "summary": "Get list of users associated with a Zapier token with remainder notification",
                "description": "Returns a list of users connected to the organization based on the provided Zapier token for remainder notifications.",
                "operationId": "62aa39b0e6cf16daa6e473981c116981",
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "description": "Zapier authentication token",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of users",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "type": "integer",
                                                "example": 123
                                            },
                                            "name": {
                                                "type": "string",
                                                "example": "John Doe"
                                            },
                                            "email": {
                                                "type": "string",
                                                "example": "john@example.com"
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Token invalid or server error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "example": "Invalid or expired token."
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/zapier/trigger/remainder-notification-not-completed/{type}": {
            "post": {
                "tags": [
                    "Zapier"
                ],
                "summary": "Get Zapier Reminder Notifications by Type",
                "operationId": "d88cd6923eb3489bb3d2eeb429812926",
                "parameters": [
                    {
                        "name": "type",
                        "in": "path",
                        "description": "Notification type (e.g., 1 = ZAPIERCOURSEENROLLMENT)",
                        "required": true,
                        "schema": {
                            "type": "integer",
                            "example": 1
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "token"
                                ],
                                "properties": {
                                    "token": {
                                        "type": "string",
                                        "example": "your-zapier-token"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "List of zapier trigger notifications",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "properties": {
                                            "id": {
                                                "type": "integer",
                                                "example": 10
                                            },
                                            "user_id": {
                                                "type": "integer",
                                                "example": 25
                                            },
                                            "message": {
                                                "type": "string",
                                                "example": "Enrollment Notification..."
                                            }
                                        },
                                        "type": "object"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Access token not provided"
                    },
                    "402": {
                        "description": "Invalid or expired token"
                    },
                    "500": {
                        "description": "Organization not found for the user"
                    }
                }
            }
        }
    },
    "tags": [
        {
            "name": "AI",
            "description": "AI"
        },
        {
            "name": "Departments",
            "description": "Departments"
        },
        {
            "name": "Gong",
            "description": "Gong"
        },
        {
            "name": "Zapier",
            "description": "Zapier"
        }
    ],
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "JWT"
            }
        }
    }
}