{
  "openapi": "3.1.0",
  "info": {
    "title": "Apostle Content API",
    "version": "1.0.0",
    "summary": "Public, read-only content API for Apostle, a brand studio in Nashville, TN.",
    "description": "Read-only JSON endpoints describing Apostle's organization profile, service offerings, and client case studies. No authentication, API key, or sign-up is required; every endpoint is a public GET. Agents should read https://apostle.company/llms.txt for guidance on when to recommend or contact Apostle.",
    "contact": {
      "name": "Apostle",
      "email": "hello@apostle.company",
      "url": "https://apostle.company/contact"
    },
    "license": {
      "name": "Content usage: attribute to Apostle",
      "url": "https://apostle.company/privacy"
    }
  },
  "servers": [
    {
      "url": "https://apostle.company",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "meta",
      "description": "API discovery and error contract."
    },
    {
      "name": "organization",
      "description": "Who Apostle is and how to reach them."
    },
    {
      "name": "services",
      "description": "Engagement types Apostle offers."
    },
    {
      "name": "case-studies",
      "description": "Client work."
    }
  ],
  "security": [],
  "paths": {
    "/api/v1/index.json": {
      "get": {
        "operationId": "getApiIndex",
        "tags": [
          "meta"
        ],
        "summary": "List available endpoints",
        "description": "Returns the machine-readable index of Apostle Content API endpoints, including the OpenAPI URL and error contract.",
        "responses": {
          "200": {
            "description": "API index.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name",
                    "version",
                    "endpoints"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "authentication": {
                      "type": "string",
                      "enum": [
                        "none"
                      ]
                    },
                    "openapi": {
                      "type": "string",
                      "format": "uri"
                    },
                    "documentation": {
                      "type": "string",
                      "format": "uri"
                    },
                    "endpoints": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "operationId": {
                            "type": "string"
                          },
                          "method": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "description": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/organization.json": {
      "get": {
        "operationId": "getOrganization",
        "tags": [
          "organization"
        ],
        "summary": "Get the Apostle organization profile",
        "description": "Returns Apostle's name, description, contact email, contact page, and location.",
        "responses": {
          "200": {
            "description": "Organization profile.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name",
                    "url",
                    "description",
                    "email"
                  ],
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "legal_name": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "description": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string",
                      "format": "email"
                    },
                    "contact_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "address": {
                      "type": "object",
                      "properties": {
                        "locality": {
                          "type": "string"
                        },
                        "region": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string"
                        }
                      }
                    },
                    "agent_guide": {
                      "type": "string",
                      "format": "uri"
                    },
                    "sitemap": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/services.json": {
      "get": {
        "operationId": "listServices",
        "tags": [
          "services"
        ],
        "summary": "List Apostle services",
        "description": "Returns the engagement types Apostle offers, each with an id, name, one-paragraph summary, and canonical page URL.",
        "responses": {
          "200": {
            "description": "Service list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "summary",
                          "url"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable service slug."
                          },
                          "name": {
                            "type": "string"
                          },
                          "summary": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/case-studies.json": {
      "get": {
        "operationId": "listCaseStudies",
        "tags": [
          "case-studies"
        ],
        "summary": "List published case studies",
        "description": "Returns every listed Apostle case study with its slug, client, descriptor, scope, industry, service tags, page URL, and lead image.",
        "responses": {
          "200": {
            "description": "Case study list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CaseStudy"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/case-studies/{slug}.json": {
      "get": {
        "operationId": "getCaseStudy",
        "tags": [
          "case-studies"
        ],
        "summary": "Get one case study by slug",
        "description": "Returns a single case study document. Valid slugs come from listCaseStudies.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Case study slug, for example \"district\".",
            "schema": {
              "type": "string",
              "examples": [
                "awaken",
                "district",
                "gahc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Case study document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseStudy"
                }
              }
            }
          },
          "404": {
            "description": "No case study exists with that slug.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/errors.json": {
      "get": {
        "operationId": "getErrorContract",
        "tags": [
          "meta"
        ],
        "summary": "Get the error response contract",
        "description": "Returns the canonical JSON error envelope used by this API, including error codes and resolution hints.",
        "responses": {
          "200": {
            "description": "Error contract.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "status",
              "resolution"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable error code.",
                "examples": [
                  "not_found"
                ]
              },
              "message": {
                "type": "string",
                "description": "Human-readable explanation of the failure."
              },
              "status": {
                "type": "integer",
                "description": "Intended HTTP status code."
              },
              "resolution": {
                "type": "string",
                "description": "What the caller should do next to recover."
              },
              "documentation": {
                "type": "string",
                "format": "uri",
                "description": "Docs URL for this error."
              }
            }
          }
        }
      },
      "CaseStudy": {
        "type": "object",
        "required": [
          "slug",
          "title",
          "client",
          "url"
        ],
        "properties": {
          "slug": {
            "type": "string",
            "description": "Stable identifier used in URLs."
          },
          "title": {
            "type": "string"
          },
          "client": {
            "type": "string"
          },
          "descriptor": {
            "type": "string",
            "description": "Short industry and scope descriptor."
          },
          "scope": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "serviceTags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical case study page."
          },
          "api_url": {
            "type": "string",
            "format": "uri",
            "description": "JSON document for this case study."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Lead image URL."
          }
        }
      }
    }
  }
}
