{
  "openapi": "3.1.0",
  "info": {
    "title": "Digital Flux AI API",
    "version": "1.0.0",
    "summary": "Read-only JSON access to the public Digital Flux AI site.",
    "description": "Public, unauthenticated, read-only JSON documents describing Digital Flux AI, its pages and its services. It does not create or change data. Client integrations built in projects have their own contracts and are not part of this API. Every error response is JSON with a code, a message and a resolution hint.",
    "contact": {
      "name": "Digital Flux AI",
      "email": "hello@digitalfluxai.com.br",
      "url": "https://digitalfluxai.com.br/contato"
    },
    "license": {
      "name": "Content © Digital Flux AI",
      "url": "https://digitalfluxai.com.br/termos"
    }
  },
  "servers": [
    {
      "url": "https://digitalfluxai.com.br/api/v1",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Digital Flux AI API documentation",
    "url": "https://digitalfluxai.com.br/docs"
  },
  "tags": [
    {
      "name": "Site",
      "description": "Public information about the company and its pages."
    }
  ],
  "paths": {
    "/site.json": {
      "get": {
        "operationId": "getSiteProfile",
        "summary": "Get the company profile",
        "description": "Returns the organization name, description, contact point, address and official profiles. Use it to verify who operates the site and how to reach them.",
        "tags": [
          "Site"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteProfile"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found. The body is always JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/pages.json": {
      "get": {
        "operationId": "listPages",
        "summary": "List canonical pages",
        "description": "Lists every canonical public page with its HTML and Markdown URLs, title and description. Use it to discover content before fetching a page.",
        "tags": [
          "Site"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageList"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found. The body is always JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/services.json": {
      "get": {
        "operationId": "listServices",
        "summary": "List services",
        "description": "Lists the consulting services offered (CTO as a Service, AI Factory, management intelligence, AI training and agentic marketing optimization) with the page that describes each.",
        "tags": [
          "Site"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceList"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found. The body is always JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "status",
              "message",
              "resolution"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable error code.",
                "examples": [
                  "not_found"
                ]
              },
              "status": {
                "type": "integer",
                "description": "HTTP status code.",
                "examples": [
                  404
                ]
              },
              "message": {
                "type": "string",
                "description": "What went wrong."
              },
              "resolution": {
                "type": "string",
                "description": "How to fix the request."
              },
              "documentation": {
                "type": "string",
                "format": "uri",
                "description": "Where to find the valid paths."
              }
            }
          }
        }
      },
      "Page": {
        "type": "object",
        "required": [
          "path",
          "url",
          "markdown_url",
          "title",
          "description"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "Canonical path on digitalfluxai.com.br.",
            "examples": [
              "/ai-factory"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical HTML URL."
          },
          "markdown_url": {
            "type": "string",
            "format": "uri",
            "description": "Markdown representation of the same page."
          },
          "title": {
            "type": "string",
            "description": "Page title."
          },
          "description": {
            "type": "string",
            "description": "Short page summary."
          }
        }
      },
      "PageList": {
        "type": "object",
        "required": [
          "pages"
        ],
        "properties": {
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Page"
            },
            "description": "Canonical pages."
          }
        }
      },
      "ServiceList": {
        "type": "object",
        "required": [
          "services"
        ],
        "properties": {
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Page"
            },
            "description": "Services and the page that describes each."
          }
        }
      },
      "SiteProfile": {
        "type": "object",
        "required": [
          "name",
          "url",
          "description",
          "contact",
          "address",
          "profiles"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Company name."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Primary website."
          },
          "description": {
            "type": "string",
            "description": "What the company does."
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Content languages (BCP 47)."
          },
          "contact": {
            "type": "object",
            "required": [
              "type",
              "email",
              "telephone"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "Contact purpose."
              },
              "email": {
                "type": "string",
                "format": "email",
                "description": "Contact email."
              },
              "telephone": {
                "type": "string",
                "description": "Contact telephone in E.164-style format."
              }
            }
          },
          "address": {
            "type": "object",
            "required": [
              "locality",
              "region",
              "country"
            ],
            "properties": {
              "locality": {
                "type": "string",
                "description": "City."
              },
              "region": {
                "type": "string",
                "description": "State."
              },
              "country": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2 country code."
              }
            }
          },
          "profiles": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "description": "Official external profiles."
          }
        }
      }
    }
  }
}
