{
  "openapi": "3.1.0",
  "info": {
    "title": "Teamcoda API",
    "version": "1.0.0",
    "description": "Open API voor Teamcoda diensten, digitale medewerkers (agents), skills, Coda offerte-review en offerte-aanvragen. Geoptimaliseerd voor LLM-agents en GPT-integraties.",
    "contact": {
      "name": "Teamcoda",
      "email": "info@teamcoda.com",
      "url": "https://www.teamcoda.com"
    }
  },
  "servers": [
    {
      "url": "https://www.teamcoda.com"
    }
  ],
  "paths": {
    "/api/v1": {
      "get": {
        "summary": "API discovery index",
        "operationId": "getApiIndex",
        "responses": {
          "200": {
            "description": "Machine-readable endpoint index"
          }
        }
      }
    },
    "/api/v1/capabilities": {
      "get": {
        "summary": "Skills, services and products (LLM context)",
        "operationId": "getCapabilities",
        "responses": {
          "200": {
            "description": "Compact capabilities overview"
          }
        }
      }
    },
    "/api/v1/services": {
      "get": {
        "summary": "All services",
        "operationId": "listServices",
        "responses": {
          "200": {
            "description": "Service list"
          }
        }
      }
    },
    "/api/v1/services/{id}": {
      "get": {
        "summary": "Single service by id",
        "operationId": "getService",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Service detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/v1/techniques": {
      "get": {
        "summary": "All techniques",
        "operationId": "listTechniques",
        "responses": {
          "200": {
            "description": "Technique list"
          }
        }
      }
    },
    "/api/v1/coda": {
      "get": {
        "summary": "Coda platform info and plans",
        "operationId": "getCoda",
        "responses": {
          "200": {
            "description": "Coda info"
          }
        }
      }
    },
    "/api/v1/tesla": {
      "get": {
        "summary": "TSLA (Teamcoda SLA) info and plans",
        "operationId": "getTesla",
        "responses": {
          "200": {
            "description": "TSLA info"
          }
        }
      }
    },
    "/api/v1/coda-secure": {
      "get": {
        "summary": "Coda Secure codebase security product",
        "operationId": "getCodaSecure",
        "responses": {
          "200": {
            "description": "Coda Secure pricing and features"
          }
        }
      }
    },
    "/api/v1/quotes/review": {
      "post": {
        "summary": "Review existing quote with Coda",
        "operationId": "reviewQuote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "quoteText"
                ],
                "properties": {
                  "companyName": {
                    "type": "string"
                  },
                  "contactEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "quoteText": {
                    "type": "string",
                    "description": "Volledige offerte als platte tekst"
                  },
                  "context": {
                    "type": "string"
                  },
                  "fileName": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Coda review + counter proposal"
          },
          "400": {
            "description": "Validation error"
          }
        }
      }
    },
    "/api/v1/quotes/request": {
      "post": {
        "summary": "Request a new quote proposal",
        "operationId": "requestQuote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "projectDescription"
                ],
                "properties": {
                  "companyName": {
                    "type": "string"
                  },
                  "contactEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "projectDescription": {
                    "type": "string"
                  },
                  "budget": {
                    "type": "string"
                  },
                  "timeline": {
                    "type": "string"
                  },
                  "servicesInterested": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "requestedBy": {
                    "type": "string",
                    "description": "bijv. gpt, agent, human"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Draft proposal"
          },
          "400": {
            "description": "Validation error"
          }
        }
      }
    },
    "/api/v1/tickets/review": {
      "post": {
        "summary": "Review ticket quality — ranking 0-10",
        "operationId": "reviewTicket",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "ticketText"
                ],
                "properties": {
                  "clientId": {
                    "type": "string",
                    "description": "Client identifier voor gratis limiet (5x)"
                  },
                  "contactEmail": {
                    "type": "string",
                    "format": "email",
                    "description": "Verplicht na 5 gratis reviews"
                  },
                  "title": {
                    "type": "string"
                  },
                  "ticketText": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "bug",
                      "feature",
                      "question",
                      "task"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ticket review with ranking 0-10"
          },
          "400": {
            "description": "Validation error"
          },
          "429": {
            "description": "Gratis limiet bereikt — e-mail vereist"
          }
        }
      }
    },
    "/api/v1/tickets/usage": {
      "get": {
        "summary": "Remaining free ticket reviews for clientId",
        "operationId": "getTicketUsage",
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Usage info"
          }
        }
      }
    },
    "/api/v1/waitlist": {
      "post": {
        "summary": "Join Tools Lab waitlist",
        "operationId": "joinWaitlist",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "company": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string"
                  },
                  "toolsInterested": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "source": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Waitlist signup confirmed"
          },
          "400": {
            "description": "Validation error"
          }
        }
      }
    },
    "/api/v1/waitlist/tools": {
      "get": {
        "summary": "List Tools Lab tools",
        "operationId": "listWaitlistTools",
        "responses": {
          "200": {
            "description": "Available and upcoming tools"
          }
        }
      }
    },
    "/api/v1/recommend": {
      "get": {
        "summary": "Recommend services and products from natural language",
        "operationId": "recommend",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Problem or project description"
          },
          {
            "name": "problem",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Alias for q"
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked recommendations"
          },
          "400": {
            "description": "Validation error"
          }
        }
      }
    },
    "/api/v1/faq/search": {
      "get": {
        "summary": "Search FAQ with source citations",
        "operationId": "searchFaq",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "FAQ results with citeAs"
          },
          "400": {
            "description": "Validation error"
          }
        }
      }
    },
    "/api/v1/leads/intent": {
      "post": {
        "summary": "Submit structured lead from AI conversation",
        "operationId": "submitLeadIntent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "description"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "company": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "intent": {
                    "type": "string",
                    "description": "quote, security, ticket, partnership, demo"
                  },
                  "budget": {
                    "type": "string"
                  },
                  "timeline": {
                    "type": "string"
                  },
                  "requestedBy": {
                    "type": "string",
                    "description": "gpt, claude, human"
                  },
                  "conversationId": {
                    "type": "string"
                  },
                  "source": {
                    "type": "string"
                  },
                  "utm": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Lead received"
          },
          "400": {
            "description": "Validation error"
          }
        }
      }
    },
    "/api/v1/gpt/advisor": {
      "get": {
        "summary": "Custom GPT setup instructions and system prompt",
        "operationId": "getGptAdvisorSetup",
        "responses": {
          "200": {
            "description": "GPT Advisor configuration"
          }
        }
      }
    },
    "/api/v1/agents": {
      "get": {
        "summary": "Coda Agents catalog — rollen, skills, FAQ, routes",
        "operationId": "getAgentsCatalog",
        "responses": {
          "200": {
            "description": "Agents catalog with marketing routes"
          }
        }
      }
    },
    "/api/v1/agents/chat": {
      "post": {
        "summary": "Agent Advisor chat — match agents and skills",
        "operationId": "agentAdvisorChat",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "message"
                ],
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Vraag in natuurlijke taal"
                  },
                  "conversationId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Matched agents, skills, FAQ and suggested actions"
          },
          "400": {
            "description": "Validation error"
          }
        }
      }
    },
    "/api/v1/agents/live-in-2-weken": {
      "get": {
        "summary": "2-week agent pilot trajectory",
        "operationId": "getAgentsLiveInTwoWeeks",
        "responses": {
          "200": {
            "description": "Live in 2 weeks page content and FAQ"
          }
        }
      }
    },
    "/api/v1/agents/{id}": {
      "get": {
        "summary": "Single agent by id with skills",
        "operationId": "getAgentById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/v1/about": {
      "get": {
        "summary": "About Teamcoda — story, stats, team teaser",
        "operationId": "getAbout",
        "responses": {
          "200": {
            "description": "About page content"
          }
        }
      }
    },
    "/api/v1/contact": {
      "get": {
        "summary": "Contact information",
        "operationId": "getContact",
        "responses": {
          "200": {
            "description": "Contact details"
          }
        }
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "summary": "This OpenAPI specification",
        "operationId": "getOpenApi",
        "responses": {
          "200": {
            "description": "OpenAPI JSON"
          }
        }
      }
    }
  }
}