{
    "openapi": "3.1.0",
    "info": {
        "title": "Telsa Media Public API",
        "version": "1.0.0",
        "summary": "Read-only access to Telsa Media's services, client work and company details.",
        "description": "A small, public, read-only JSON API describing the agency behind telsamedia.co.uk.\n\nNo authentication is required and no personal data is served — every response is the\nsame public information published on the website itself. See /auth.md for the\nagent usage policy and /docs/api for human-readable documentation.",
        "contact": {
            "name": "Telsa Media",
            "email": "hello@telsamedia.com",
            "url": "https://telsamedia.co.uk/contact"
        },
        "license": {
            "name": "Public site content — attribution appreciated",
            "url": "https://telsamedia.co.uk/auth.md"
        }
    },
    "servers": [
        {
            "url": "https://telsamedia.co.uk/api/v1",
            "description": "Production"
        }
    ],
    "externalDocs": {
        "description": "API documentation",
        "url": "https://telsamedia.co.uk/docs/api"
    },
    "tags": [
        {
            "name": "Meta",
            "description": "Service health and discovery."
        },
        {
            "name": "Company",
            "description": "Who Telsa Media is and how to reach a human."
        },
        {
            "name": "Services",
            "description": "The services the agency offers."
        },
        {
            "name": "Portfolio",
            "description": "Client websites and case studies."
        }
    ],
    "paths": {
        "/health": {
            "get": {
                "tags": [
                    "Meta"
                ],
                "operationId": "getHealth",
                "summary": "Liveness and version of the API.",
                "responses": {
                    "200": {
                        "description": "The API is serving requests.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "status",
                                        "version"
                                    ],
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "enum": [
                                                "ok"
                                            ]
                                        },
                                        "version": {
                                            "type": "string",
                                            "example": "1.0.0"
                                        },
                                        "time": {
                                            "type": "string",
                                            "format": "date-time"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/company": {
            "get": {
                "tags": [
                    "Company"
                ],
                "operationId": "getCompany",
                "summary": "Agency profile: contact details, address, social profiles and review scores.",
                "responses": {
                    "200": {
                        "description": "The agency profile.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Company"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/services": {
            "get": {
                "tags": [
                    "Services"
                ],
                "operationId": "listServices",
                "summary": "Every service the agency offers.",
                "responses": {
                    "200": {
                        "description": "The full service list.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "items"
                                    ],
                                    "properties": {
                                        "total": {
                                            "type": "integer"
                                        },
                                        "items": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Service"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/services/{slug}": {
            "get": {
                "tags": [
                    "Services"
                ],
                "operationId": "getService",
                "summary": "One service in full, including offerings, statistics and FAQs.",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "description": "Service identifier.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "marketing",
                                "design",
                                "development"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The service.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Service"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No resource with that identifier.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/portfolio": {
            "get": {
                "tags": [
                    "Portfolio"
                ],
                "operationId": "listPortfolio",
                "summary": "Client projects, optionally filtered by a free-text query.",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Match against name, sector, summary and domain.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 20
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "default": 0
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of matching projects.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "required": [
                                        "total",
                                        "items"
                                    ],
                                    "properties": {
                                        "total": {
                                            "type": "integer"
                                        },
                                        "limit": {
                                            "type": "integer"
                                        },
                                        "offset": {
                                            "type": "integer"
                                        },
                                        "items": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Project"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/portfolio/{slug}": {
            "get": {
                "tags": [
                    "Portfolio"
                ],
                "operationId": "getProject",
                "summary": "One client project.",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The project.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Project"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No resource with that identifier.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/openapi.json": {
            "get": {
                "tags": [
                    "Meta"
                ],
                "operationId": "getOpenapi",
                "summary": "This document.",
                "responses": {
                    "200": {
                        "description": "The OpenAPI description.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Error": {
                "type": "object",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "object",
                        "required": [
                            "code",
                            "message"
                        ],
                        "properties": {
                            "code": {
                                "type": "string",
                                "example": "not_found"
                            },
                            "message": {
                                "type": "string",
                                "example": "No service with that slug."
                            }
                        }
                    }
                }
            },
            "Company": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "tagline": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "founded": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "telephone": {
                        "type": "string"
                    },
                    "telephoneE164": {
                        "type": "string"
                    },
                    "address": {
                        "type": "object"
                    },
                    "areaServed": {
                        "type": "string"
                    },
                    "socialProfiles": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "ratings": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "contactPage": {
                        "type": "string",
                        "format": "uri"
                    }
                }
            },
            "Service": {
                "type": "object",
                "required": [
                    "slug",
                    "name",
                    "url"
                ],
                "properties": {
                    "slug": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "headline": {
                        "type": "string"
                    },
                    "summary": {
                        "type": "string"
                    },
                    "intro": {
                        "type": "string"
                    },
                    "outcomes": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "offerings": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "description": {
                                    "type": "string"
                                },
                                "capabilities": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "stats": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "faq": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    }
                }
            },
            "Project": {
                "type": "object",
                "required": [
                    "slug",
                    "name",
                    "caseStudyUrl"
                ],
                "properties": {
                    "slug": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "sector": {
                        "type": "string"
                    },
                    "year": {
                        "type": "string"
                    },
                    "services": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "summary": {
                        "type": "string"
                    },
                    "clientUrl": {
                        "type": "string"
                    },
                    "caseStudyUrl": {
                        "type": "string",
                        "format": "uri"
                    },
                    "featured": {
                        "type": "boolean",
                        "description": "True for the hand-written case studies."
                    }
                }
            }
        }
    }
}
