{"openapi":"3.0.3","info":{"title":"Logaco — API pública","version":"1.0.0","description":"API pública do Logaco — logótipos de empresas de Moçambique.\n\n**Autenticação:** opcional. Sem token o pedido é anónimo (limite por IP). Com token:\n`Authorization: Bearer lgc_…` (criado em Perfil → Acessos e integrações).\n\n**Limites:** 60 pedidos/minuto por token, 20/minuto por IP anónimo (HTTP 429 com `Retry-After`).\n\n**Downloads:** contam para a mesma quota do site (sem conta 3 por 24 h; com conta\ngratuita 5 por 24 h) e repetir o mesmo logótipo em 12 h não conta de novo. A resposta traz um link\ntemporário do armazenamento — o ficheiro nunca passa pela API.\n\n**Paletas e propostas:** precisam de token com a permissão certa (`read:palettes`,\n`write:palettes`, `write:proposals`). As propostas de logótipos ficam pendentes até serem\nrevistas pela equipa do Logaco.\n\n**Origem:** clientes sem token podem identificar-se com `X-Logaco-Source: API | MCP | FIGMA | CHROME`.\n\n**Erros:** `{ \"error\": \"CODIGO\", \"message\": \"…\" }` — ex.: `INVALID_TOKEN`, `TOKEN_REVOKED`,\n`INSUFFICIENT_SCOPE`, `COMPANY_NOT_FOUND`, `LOGO_NOT_FOUND`, `FORMAT_NOT_AVAILABLE`,\n`DOWNLOAD_LIMIT_REACHED`, `PALETTE_NOT_FOUND`, `PALETTE_LIMIT`, `PROPOSAL_LIMIT_REACHED`,\n`FILE_TOO_LARGE`, `UNSUPPORTED_FILE`, `INVALID_REQUEST`, `RATE_LIMITED`."},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Token de acesso lgc_…"}},"schemas":{}},"paths":{"/v1/public/me":{"get":{"summary":"Verificar o token (ou confirmar que o pedido é anónimo)","tags":["Conta"],"security":[{"bearerAuth":[]},{}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"authenticated":{"type":"boolean"},"user":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"nullable":true,"type":"string"},"plan":{"type":"string"}},"required":["id","firstName","plan"],"additionalProperties":false},"token":{"type":"object","properties":{"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"expiresAt":{"nullable":true,"type":"string"}},"required":["name","prefix","scopes","source","expiresAt"],"additionalProperties":false}},"required":["authenticated"],"additionalProperties":false},"example":{"authenticated":true,"user":{"id":"0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e","firstName":"Ana","plan":"FREE"},"token":{"name":"Script de relatórios","prefix":"lgc_AbCdEfGh","scopes":["read:logos","read:palettes"],"source":"API","expiresAt":"2027-01-12T09:00:00.000Z"}}}}}}}},"/v1/public/domains":{"get":{"summary":"Domínios das empresas (para comparar no browser)","tags":["Empresas"],"description":"Lista completa domínio → empresa, para um cliente comparar localmente com o site que o utilizador visita (os endereços visitados não são enviados). Muda pouco: guardar em cache 24 h.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["domain","slug","name"],"additionalProperties":false}},"generatedAt":{"type":"string"}},"required":["data","generatedAt"],"additionalProperties":false},"example":{"data":[{"domain":"empresa-exemplo.co.mz","slug":"empresa-exemplo","name":"Empresa Exemplo"}],"generatedAt":"2026-10-14T06:00:00.000Z"}}}}}}},"/v1/public/me/token":{"delete":{"summary":"Revogar o token usado neste pedido (terminar sessão num plugin)","tags":["Conta"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Sem conteúdo."}}}},"/v1/public/companies":{"get":{"summary":"Pesquisar empresas com logótipos","tags":["Empresas"],"description":"Pesquisa no nome e nos nomes alternativos, sem distinguir acentos. Paginado (máx. 50 por página). Com related=true junta, em `related`, empresas relacionadas por significado (ex.: «telemóvel» → operadoras).","parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false,"description":"Texto a procurar no nome ou nos nomes alternativos (ignora acentos).","example":"exemplo"},{"schema":{"type":"string","maxLength":100},"in":"query","name":"sector","required":false,"description":"Sector: slug ou nome (ex.: telecomunicacoes)."},{"schema":{"type":"string","maxLength":120},"in":"query","name":"province","required":false,"description":"Província (ex.: Maputo, Sofala)."},{"schema":{"default":1,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"pageSize","required":false,"example":"20"},{"schema":{"type":"string","enum":["0","1","true","false"]},"in":"query","name":"related","required":false,"description":"true = juntar empresas relacionadas por significado (pesquisa semântica), na lista related. Só na 1.ª página."}],"security":[{"bearerAuth":[]},{}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"},"name":{"type":"string"},"entityType":{"type":"string"},"isVerified":{"type":"boolean"},"sector":{"nullable":true,"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"province":{"nullable":true,"type":"string"},"logoCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currentLogo":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"},"title":{"type":"string"},"previewUrl":{"nullable":true,"description":"Imagem de pré-visualização (não é o ficheiro de download).","type":"string"}},"required":["id","slug","title","previewUrl"],"additionalProperties":false},"url":{"nullable":true,"description":"Página da empresa no Logaco.","type":"string"}},"required":["id","slug","name","entityType","isVerified","sector","province","logoCount","currentLogo","url"],"additionalProperties":false}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"related":{"description":"Empresas relacionadas com o termo, mesmo sem o ter no nome (só com related=true).","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"},"name":{"type":"string"},"entityType":{"type":"string"},"isVerified":{"type":"boolean"},"sector":{"nullable":true,"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"province":{"nullable":true,"type":"string"},"logoCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currentLogo":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"},"title":{"type":"string"},"previewUrl":{"nullable":true,"description":"Imagem de pré-visualização (não é o ficheiro de download).","type":"string"}},"required":["id","slug","title","previewUrl"],"additionalProperties":false},"url":{"nullable":true,"description":"Página da empresa no Logaco.","type":"string"}},"required":["id","slug","name","entityType","isVerified","sector","province","logoCount","currentLogo","url"],"additionalProperties":false}}},"required":["data","page","pageSize","total","totalPages"],"additionalProperties":false},"example":{"data":[{"id":"3f2b6c1e-8a4d-4f5e-9b7a-2c1d0e9f8a7b","slug":"empresa-exemplo","name":"Empresa Exemplo","entityType":"COMPANY","isVerified":true,"sector":{"slug":"telecomunicacoes","name":"Telecomunicações"},"province":"Maputo","logoCount":2,"currentLogo":{"id":"7c9e2a41-5b3d-4e8f-a1c6-0d2b4f6e8a90","slug":"empresa-exemplo","title":"Empresa Exemplo","previewUrl":"https://storage.logaco.com/previews/empresa-exemplo.png"},"url":"https://logaco.com/company/empresa-exemplo"}],"page":1,"pageSize":20,"total":1,"totalPages":1}}}}}}},"/v1/public/companies/{slug}":{"get":{"summary":"Empresa e os seus logótipos (o actual primeiro)","tags":["Empresas"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"in":"path","name":"slug","required":true,"description":"Slug da empresa (ex.: vodacom).","example":"empresa-exemplo"}],"security":[{"bearerAuth":[]},{}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"},"name":{"type":"string"},"entityType":{"type":"string"},"isVerified":{"type":"boolean"},"sector":{"nullable":true,"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"province":{"nullable":true,"type":"string"},"url":{"nullable":true,"description":"Página da empresa no Logaco.","type":"string"},"about":{"nullable":true,"type":"string"},"website":{"nullable":true,"type":"string"},"location":{"nullable":true,"type":"string"},"foundedYear":{"nullable":true,"type":"string"},"currentLogoId":{"nullable":true,"type":"string"},"logos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"},"title":{"type":"string"},"previewUrl":{"nullable":true,"description":"Imagem de pré-visualização (não é o ficheiro de download).","type":"string"},"isCurrent":{"type":"boolean"},"isProduct":{"type":"boolean"},"era":{"type":"object","properties":{"from":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"to":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"nullable":true,"type":"string"}},"required":["from","to","label"],"additionalProperties":false},"formats":{"type":"array","items":{"type":"string"}},"url":{"nullable":true,"description":"Página do logótipo no Logaco.","type":"string"}},"required":["id","slug","title","previewUrl","isCurrent","isProduct","era","formats","url"],"additionalProperties":false}}},"required":["id","slug","name","entityType","isVerified","sector","province","url","about","website","location","foundedYear","currentLogoId","logos"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"id":"3f2b6c1e-8a4d-4f5e-9b7a-2c1d0e9f8a7b","slug":"empresa-exemplo","name":"Empresa Exemplo","entityType":"COMPANY","isVerified":true,"sector":{"slug":"telecomunicacoes","name":"Telecomunicações"},"province":"Maputo","url":"https://logaco.com/company/empresa-exemplo","about":"Empresa fictícia usada nos exemplos da documentação.","website":"https://empresa-exemplo.co.mz","location":"Av. Julius Nyerere, Maputo","foundedYear":"1997","currentLogoId":"7c9e2a41-5b3d-4e8f-a1c6-0d2b4f6e8a90","logos":[{"id":"7c9e2a41-5b3d-4e8f-a1c6-0d2b4f6e8a90","slug":"empresa-exemplo","title":"Empresa Exemplo","previewUrl":"https://storage.logaco.com/previews/empresa-exemplo.png","isCurrent":true,"isProduct":false,"era":{"from":null,"to":null,"label":null},"formats":["SVG","PNG","PDF"],"url":"https://logaco.com/logo/empresa-exemplo"},{"id":"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d","slug":"empresa-exemplo-2003","title":"Empresa Exemplo (2003–2016)","previewUrl":"https://storage.logaco.com/previews/empresa-exemplo-2003.png","isCurrent":false,"isProduct":false,"era":{"from":2003,"to":2016,"label":null},"formats":["PNG"],"url":"https://logaco.com/logo/empresa-exemplo-2003"}]}}}}}}}},"/v1/public/companies/{slug}/colors":{"get":{"summary":"Paleta de cores da marca","tags":["Empresas"],"description":"Cores do logótipo actual, se já estiverem calculadas. Caso contrário devolve `colors: []` e `cached: false`.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"in":"path","name":"slug","required":true,"description":"Slug da empresa (ex.: vodacom).","example":"empresa-exemplo"}],"security":[{"bearerAuth":[]},{}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"company":{"type":"object","properties":{"slug":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"logo":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"}},"required":["id","slug"],"additionalProperties":false},"colors":{"type":"array","items":{"type":"string"}},"cached":{"type":"boolean","description":"false = a paleta ainda não foi calculada para este logótipo."},"message":{"nullable":true,"type":"string"}},"required":["company","logo","colors","cached","message"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"company":{"slug":"empresa-exemplo","name":"Empresa Exemplo"},"logo":{"id":"7c9e2a41-5b3d-4e8f-a1c6-0d2b4f6e8a90","slug":"empresa-exemplo"},"colors":["#6725D0","#F2A900"],"cached":true,"message":null}}}}}}}},"/v1/public/logos":{"get":{"summary":"Pesquisar logótipos","tags":["Logótipos"],"description":"Pesquisa no título do logótipo e no nome da empresa, sem distinguir acentos. Os actuais primeiro.","parameters":[{"schema":{"type":"string","maxLength":100},"in":"query","name":"q","required":false,"description":"Texto a procurar no título do logótipo ou no nome da empresa (ignora acentos).","example":"exemplo"},{"schema":{"default":1,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"pageSize","required":false}],"security":[{"bearerAuth":[]},{}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"},"title":{"type":"string"},"previewUrl":{"nullable":true,"description":"Imagem de pré-visualização (não é o ficheiro de download).","type":"string"},"isCurrent":{"type":"boolean"},"isProduct":{"type":"boolean"},"era":{"type":"object","properties":{"from":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"to":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"nullable":true,"type":"string"}},"required":["from","to","label"],"additionalProperties":false},"formats":{"type":"array","items":{"type":"string"}},"url":{"nullable":true,"description":"Página do logótipo no Logaco.","type":"string"},"company":{"nullable":true,"type":"object","properties":{"slug":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false}},"required":["id","slug","title","previewUrl","isCurrent","isProduct","era","formats","url","company"],"additionalProperties":false}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","page","pageSize","total","totalPages"],"additionalProperties":false},"example":{"data":[{"id":"7c9e2a41-5b3d-4e8f-a1c6-0d2b4f6e8a90","slug":"empresa-exemplo","title":"Empresa Exemplo","previewUrl":"https://storage.logaco.com/previews/empresa-exemplo.png","isCurrent":true,"isProduct":false,"era":{"from":null,"to":null,"label":null},"formats":["SVG","PNG","PDF"],"url":"https://logaco.com/logo/empresa-exemplo","company":{"slug":"empresa-exemplo","name":"Empresa Exemplo"}}],"page":1,"pageSize":20,"total":1,"totalPages":1}}}}}}},"/v1/public/logos/{id}":{"get":{"summary":"Variantes e formatos de um logótipo (só metadados, sem links)","tags":["Logótipos"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"in":"path","name":"id","required":true,"description":"id (uuid) ou slug do logótipo.","example":"empresa-exemplo"}],"security":[{"bearerAuth":[]},{}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"},"title":{"type":"string"},"previewUrl":{"nullable":true,"description":"Imagem de pré-visualização (não é o ficheiro de download).","type":"string"},"isCurrent":{"type":"boolean"},"isProduct":{"type":"boolean"},"era":{"type":"object","properties":{"from":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"to":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"nullable":true,"type":"string"}},"required":["from","to","label"],"additionalProperties":false},"formats":{"type":"array","items":{"type":"string"}},"url":{"nullable":true,"description":"Página do logótipo no Logaco.","type":"string"},"description":{"nullable":true,"type":"string"},"company":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"},"name":{"type":"string"},"url":{"nullable":true,"type":"string"}},"required":["id","slug","name","url"],"additionalProperties":false},"colorPalette":{"type":"array","items":{"type":"string"}},"downloadCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["TYPE","VERSION"]},"name":{"type":"string"},"parentId":{"nullable":true,"type":"string"},"previewUrl":{"nullable":true,"type":"string"},"formats":{"type":"array","items":{"type":"string"}}},"required":["id","kind","name","parentId","previewUrl","formats"],"additionalProperties":false}},"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"format":{"type":"string"},"variantId":{"nullable":true,"type":"string"},"size":{"type":"number"},"contentType":{"type":"string"}},"required":["id","format","variantId","size","contentType"],"additionalProperties":false},"description":"Ficheiros disponíveis — só metadados, sem links."}},"required":["id","slug","title","previewUrl","isCurrent","isProduct","era","formats","url","description","company","colorPalette","downloadCount","variants","assets"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"id":"7c9e2a41-5b3d-4e8f-a1c6-0d2b4f6e8a90","slug":"empresa-exemplo","title":"Empresa Exemplo","previewUrl":"https://storage.logaco.com/previews/empresa-exemplo.png","isCurrent":true,"isProduct":false,"era":{"from":null,"to":null,"label":null},"formats":["SVG","PNG","PDF"],"url":"https://logaco.com/logo/empresa-exemplo","description":null,"company":{"id":"3f2b6c1e-8a4d-4f5e-9b7a-2c1d0e9f8a7b","slug":"empresa-exemplo","name":"Empresa Exemplo","url":"https://logaco.com/company/empresa-exemplo"},"colorPalette":["#6725D0","#F2A900"],"downloadCount":128,"variants":[{"id":"9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a","kind":"TYPE","name":"Horizontal","parentId":null,"previewUrl":"https://storage.logaco.com/previews/empresa-exemplo-horizontal.png","formats":["SVG","PNG"]}],"assets":[{"id":"2e4c6a8b-0d1f-4e3a-9c5b-7d9f1b3d5f7a","format":"SVG","variantId":null,"size":4812,"contentType":"image/svg+xml"},{"id":"4a6c8e0b-2d4f-4b6a-8c0e-2f4a6c8e0b2d","format":"PNG","variantId":"9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a","size":20480,"contentType":"image/png"}]}}}}}}}},"/v1/public/logos/{id}/download":{"post":{"summary":"Pedir o link de download de um ficheiro","tags":["Logótipos"],"description":"Aplica a quota e a deduplicação de 12 h do site e devolve um link temporário (1 h) do armazenamento. Indicar `format` (e opcionalmente `variant`) ou o `assetId` exacto.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"description":"Formato: SVG, PNG, PDF, AI, EPS ou ZIP (maiúsculas ou minúsculas).","type":"string"},"variant":{"description":"id ou nome da variante (ver GET /logos/:id). Sem variante usa a principal.","type":"string","minLength":1,"maxLength":120},"assetId":{"description":"Ficheiro exacto (ver `assets` em GET /logos/:id).","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"example":{"format":"SVG"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255},"in":"path","name":"id","required":true,"description":"id (uuid) ou slug do logótipo.","example":"empresa-exemplo"}],"security":[{"bearerAuth":[]},{}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","description":"Link temporário e assinado do R2 — o ficheiro nunca passa pelo backend."},"expiresIn":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expiresAt":{"type":"string"},"filename":{"type":"string"},"asset":{"type":"object","properties":{"id":{"type":"string"},"format":{"type":"string"},"variantId":{"nullable":true,"type":"string"},"size":{"type":"number"},"contentType":{"type":"string"}},"required":["id","format","variantId","size","contentType"],"additionalProperties":false}},"required":["url","expiresIn","expiresAt","filename","asset"],"additionalProperties":false},"quota":{"type":"object","properties":{"unlimited":{"type":"boolean"},"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remaining":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetAt":{"nullable":true,"type":"string"}},"required":["unlimited","used","limit","remaining","resetAt"],"additionalProperties":false}},"required":["data","quota"],"additionalProperties":false},"example":{"data":{"url":"https://….r2.cloudflarestorage.com/…/empresa-exemplo.svg?X-Amz-Expires=3600&X-Amz-Signature=…","expiresIn":3600,"expiresAt":"2026-10-14T10:00:00.000Z","filename":"empresa-exemplo.svg","asset":{"id":"2e4c6a8b-0d1f-4e3a-9c5b-7d9f1b3d5f7a","format":"SVG","variantId":null,"size":4812,"contentType":"image/svg+xml"}},"quota":{"unlimited":false,"used":1,"limit":5,"remaining":4,"resetAt":"2026-10-15T09:00:00.000Z"}}}}}}}},"/v1/public/palettes":{"get":{"summary":"As minhas paletas e gradientes","tags":["Paletas"],"parameters":[{"schema":{"default":1,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"pageSize","required":false},{"schema":{"type":"string","enum":["PALETTE","GRADIENT"]},"in":"query","name":"type","required":false,"example":"PALETTE"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["PALETTE","GRADIENT"]},"colors":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"kind":{"type":"string","enum":["linear","radial"]},"angle":{"type":"number"},"stops":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string"},"position":{"type":"number"}},"required":["hex","position"],"additionalProperties":false}}},"required":["kind","angle","stops"],"additionalProperties":false}],"description":"PALETTE: lista #RRGGBB; GRADIENT: { kind, angle, stops }."},"source":{"type":"string","enum":["GENERATED","IMAGE","LOGO","MANUAL"]},"isPublic":{"type":"boolean"},"isMine":{"type":"boolean"},"company":{"nullable":true,"type":"object","properties":{"slug":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","colors","source","isPublic","isMine","company","createdAt","updatedAt"],"additionalProperties":false}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quota":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["used","max"],"additionalProperties":false}},"required":["data","page","pageSize","total","totalPages","quota"],"additionalProperties":false},"example":{"data":[{"id":"5b7d9f1a-3c5e-4a7b-9d1f-3a5c7e9b1d3f","name":"Campanha","type":"PALETTE","colors":["#6725D0","#F2A900","#1B1B1F"],"source":"MANUAL","isPublic":false,"isMine":true,"company":null,"createdAt":"2026-10-14T09:00:00.000Z","updatedAt":"2026-10-14T09:00:00.000Z"}],"page":1,"pageSize":20,"total":1,"totalPages":1,"quota":{"used":2,"max":100}}}}}}},"post":{"summary":"Guardar uma paleta ou gradiente na conta","tags":["Paletas"],"description":"Máximo de 100 paletas por conta (409 PALETTE_LIMIT).","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["PALETTE"]},"colors":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},"name":{"type":"string","minLength":1,"maxLength":60},"source":{"default":"MANUAL","type":"string","enum":["GENERATED","IMAGE","LOGO","MANUAL"]},"companyId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"isPublic":{"default":false,"type":"boolean"}},"required":["type","colors","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["GRADIENT"]},"colors":{"type":"object","properties":{"kind":{"type":"string","enum":["linear","radial"]},"angle":{"type":"number","minimum":0,"maximum":360},"stops":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"position":{"type":"number","minimum":0,"maximum":100}},"required":["hex","position"]}}},"required":["kind","angle","stops"]},"name":{"type":"string","minLength":1,"maxLength":60},"source":{"default":"MANUAL","type":"string","enum":["GENERATED","IMAGE","LOGO","MANUAL"]},"companyId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"isPublic":{"default":false,"type":"boolean"}},"required":["type","colors","name"]}]},"example":{"type":"PALETTE","name":"Campanha","colors":["#6725D0","#F2A900","#1B1B1F"]}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["PALETTE","GRADIENT"]},"colors":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"kind":{"type":"string","enum":["linear","radial"]},"angle":{"type":"number"},"stops":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string"},"position":{"type":"number"}},"required":["hex","position"],"additionalProperties":false}}},"required":["kind","angle","stops"],"additionalProperties":false}],"description":"PALETTE: lista #RRGGBB; GRADIENT: { kind, angle, stops }."},"source":{"type":"string","enum":["GENERATED","IMAGE","LOGO","MANUAL"]},"isPublic":{"type":"boolean"},"isMine":{"type":"boolean"},"company":{"nullable":true,"type":"object","properties":{"slug":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","colors","source","isPublic","isMine","company","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"id":"5b7d9f1a-3c5e-4a7b-9d1f-3a5c7e9b1d3f","name":"Campanha","type":"PALETTE","colors":["#6725D0","#F2A900","#1B1B1F"],"source":"MANUAL","isPublic":false,"isMine":true,"company":null,"createdAt":"2026-10-14T09:00:00.000Z","updatedAt":"2026-10-14T09:00:00.000Z"}}}}}}}},"/v1/public/palettes/{id}":{"get":{"summary":"Uma paleta (minha, ou pública de outra pessoa)","tags":["Paletas"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"example":"6c8e0a2b-4d6f-4b8a-ac2e-4b6d8f0a2c4e"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["PALETTE","GRADIENT"]},"colors":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"kind":{"type":"string","enum":["linear","radial"]},"angle":{"type":"number"},"stops":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string"},"position":{"type":"number"}},"required":["hex","position"],"additionalProperties":false}}},"required":["kind","angle","stops"],"additionalProperties":false}],"description":"PALETTE: lista #RRGGBB; GRADIENT: { kind, angle, stops }."},"source":{"type":"string","enum":["GENERATED","IMAGE","LOGO","MANUAL"]},"isPublic":{"type":"boolean"},"isMine":{"type":"boolean"},"company":{"nullable":true,"type":"object","properties":{"slug":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","colors","source","isPublic","isMine","company","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"id":"6c8e0a2b-4d6f-4b8a-ac2e-4b6d8f0a2c4e","name":"Pôr do sol","type":"GRADIENT","colors":{"kind":"linear","angle":90,"stops":[{"hex":"#6725D0","position":0},{"hex":"#F2A900","position":100}]},"source":"IMAGE","isPublic":true,"isMine":true,"company":null,"createdAt":"2026-10-13T15:30:00.000Z","updatedAt":"2026-10-13T15:30:00.000Z"}}}}}}},"patch":{"summary":"Alterar uma paleta minha","tags":["Paletas"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"colors":{"anyOf":[{"minItems":2,"maxItems":10,"type":"array","items":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"}},{"type":"object","properties":{"kind":{"type":"string","enum":["linear","radial"]},"angle":{"type":"number","minimum":0,"maximum":360},"stops":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"object","properties":{"hex":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"position":{"type":"number","minimum":0,"maximum":100}},"required":["hex","position"]}}},"required":["kind","angle","stops"]}]},"isPublic":{"type":"boolean"},"companyId":{"nullable":true,"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"example":{"name":"Campanha 2026","isPublic":true}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"example":"5b7d9f1a-3c5e-4a7b-9d1f-3a5c7e9b1d3f"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["PALETTE","GRADIENT"]},"colors":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"object","properties":{"kind":{"type":"string","enum":["linear","radial"]},"angle":{"type":"number"},"stops":{"type":"array","items":{"type":"object","properties":{"hex":{"type":"string"},"position":{"type":"number"}},"required":["hex","position"],"additionalProperties":false}}},"required":["kind","angle","stops"],"additionalProperties":false}],"description":"PALETTE: lista #RRGGBB; GRADIENT: { kind, angle, stops }."},"source":{"type":"string","enum":["GENERATED","IMAGE","LOGO","MANUAL"]},"isPublic":{"type":"boolean"},"isMine":{"type":"boolean"},"company":{"nullable":true,"type":"object","properties":{"slug":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","type","colors","source","isPublic","isMine","company","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"id":"5b7d9f1a-3c5e-4a7b-9d1f-3a5c7e9b1d3f","name":"Campanha 2026","type":"PALETTE","colors":["#6725D0","#F2A900","#1B1B1F"],"source":"MANUAL","isPublic":true,"isMine":true,"company":null,"createdAt":"2026-10-14T09:00:00.000Z","updatedAt":"2026-10-14T11:00:00.000Z"}}}}}}},"delete":{"summary":"Apagar uma paleta minha","tags":["Paletas"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true,"example":"5b7d9f1a-3c5e-4a7b-9d1f-3a5c7e9b1d3f"}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Sem conteúdo."}}}},"/v1/public/proposals":{"post":{"summary":"Propor um logótipo (novo, ou versão nova de um existente)","tags":["Propostas"],"description":"multipart/form-data com o ficheiro em `file` (SVG, PNG, JPEG ou WEBP, até 5 MB). Fica pendente até ser revisto pela equipa do Logaco. Máximo de 10 propostas por conta em 24 h.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"SVG, PNG, JPEG ou WEBP — até 5 MB."},"companyName":{"type":"string","maxLength":255,"description":"Obrigatório se não indicar companySlug."},"companySlug":{"type":"string","maxLength":255,"description":"Empresa que já está no Logaco."},"logoId":{"type":"string","maxLength":255,"description":"Logótipo existente que esta proposta actualiza (id ou slug)."},"website":{"type":"string","maxLength":255},"sourceUrl":{"type":"string","format":"uri","maxLength":2048,"description":"Página onde o logótipo foi encontrado."},"notes":{"type":"string","maxLength":1000}}}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED"]},"companyName":{"type":"string"},"company":{"nullable":true,"type":"object","properties":{"slug":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"logo":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"}},"required":["id","slug"],"additionalProperties":false},"website":{"nullable":true,"type":"string"},"sourceUrl":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"file":{"type":"object","properties":{"filename":{"type":"string"},"format":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"contentType":{"type":"string"}},"required":["filename","format","size","contentType"],"additionalProperties":false},"source":{"type":"string"},"createdAt":{"type":"string"},"reviewedAt":{"nullable":true,"type":"string"},"reviewNote":{"nullable":true,"type":"string"}},"required":["id","status","companyName","company","logo","website","sourceUrl","notes","file","source","createdAt","reviewedAt","reviewNote"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"id":"8e0a2c4d-6f8b-4dac-8e4a-6c8e0b2d4f6a","status":"PENDING","companyName":"Empresa Exemplo","company":null,"logo":null,"website":"empresa-exemplo.co.mz","sourceUrl":"https://empresa-exemplo.co.mz/","notes":"Logótipo novo desde 2026.","file":{"filename":"logo.svg","format":"SVG","size":4812,"contentType":"image/svg+xml"},"source":"API","createdAt":"2026-10-14T09:00:00.000Z","reviewedAt":null,"reviewNote":null}}}}}}},"get":{"summary":"As minhas propostas e o estado de cada uma","tags":["Propostas"],"parameters":[{"schema":{"default":1,"type":"integer","minimum":1,"maximum":500},"in":"query","name":"page","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":50},"in":"query","name":"pageSize","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED"]},"companyName":{"type":"string"},"company":{"nullable":true,"type":"object","properties":{"slug":{"nullable":true,"type":"string"},"name":{"type":"string"}},"required":["slug","name"],"additionalProperties":false},"logo":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"slug":{"nullable":true,"type":"string"}},"required":["id","slug"],"additionalProperties":false},"website":{"nullable":true,"type":"string"},"sourceUrl":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"file":{"type":"object","properties":{"filename":{"type":"string"},"format":{"type":"string"},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"contentType":{"type":"string"}},"required":["filename","format","size","contentType"],"additionalProperties":false},"source":{"type":"string"},"createdAt":{"type":"string"},"reviewedAt":{"nullable":true,"type":"string"},"reviewNote":{"nullable":true,"type":"string"}},"required":["id","status","companyName","company","logo","website","sourceUrl","notes","file","source","createdAt","reviewedAt","reviewNote"],"additionalProperties":false}},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","page","pageSize","total","totalPages"],"additionalProperties":false},"example":{"data":[{"id":"8e0a2c4d-6f8b-4dac-8e4a-6c8e0b2d4f6a","status":"PENDING","companyName":"Empresa Exemplo","company":null,"logo":null,"website":"empresa-exemplo.co.mz","sourceUrl":"https://empresa-exemplo.co.mz/","notes":"Logótipo novo desde 2026.","file":{"filename":"logo.svg","format":"SVG","size":4812,"contentType":"image/svg+xml"},"source":"API","createdAt":"2026-10-14T09:00:00.000Z","reviewedAt":null,"reviewNote":null}],"page":1,"pageSize":20,"total":1,"totalPages":1}}}}}}},"/v1/public/device/code":{"post":{"summary":"Pedir um código de ligação (plugins)","tags":["Conta"],"description":"Mostre `userCode` ao utilizador e abra `verificationUriComplete`; depois pergunte em /device/token a cada `interval` segundos.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["FIGMA","CHROME"],"description":"Quem pede: FIGMA ou CHROME"},"clientName":{"description":"Nome mostrado ao utilizador (ex.: Figma)","type":"string","maxLength":60}},"required":["source"]},"example":{"source":"FIGMA"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"deviceCode":{"type":"string","description":"Secreto — fica só no plugin; usa-se em /device/token."},"userCode":{"type":"string","description":"Código que o utilizador escreve no site (ex.: BCDF-GHJK)."},"verificationUri":{"type":"string"},"verificationUriComplete":{"type":"string"},"expiresIn":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["deviceCode","userCode","verificationUri","verificationUriComplete","expiresIn","interval"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"deviceCode":"lgd_…","userCode":"BCDF-GHJK","verificationUri":"https://logaco.com/ligar","verificationUriComplete":"https://logaco.com/ligar?codigo=BCDF-GHJK","expiresIn":600,"interval":5}}}}}}}},"/v1/public/device/token":{"post":{"summary":"Receber o token depois de o utilizador confirmar o código","tags":["Conta"],"description":"Enquanto o utilizador não confirmar: 400 `authorization_pending` (ou `slow_down` — aumente o intervalo). Recusado: `access_denied`; fora de prazo: `expired_token`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","minLength":1,"maxLength":100}},"required":["deviceCode"]},"example":{"deviceCode":"lgd_…"}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"token":{"type":"string"},"user":{"type":"object","properties":{"firstName":{"nullable":true,"type":"string"},"plan":{"type":"string"}},"required":["firstName","plan"],"additionalProperties":false},"scopes":{"type":"array","items":{"type":"string"}},"expiresAt":{"nullable":true,"type":"string"}},"required":["token","user","scopes","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"token":"lgc_…","user":{"firstName":"Ana","plan":"FREE"},"scopes":["read:logos","read:palettes","write:palettes"],"expiresAt":"2027-10-14T09:00:00.000Z"}}}}}}}}},"tags":[{"name":"Empresas","description":"Pesquisa e perfil de empresas"},{"name":"Logótipos","description":"Metadados e download"},{"name":"Paletas","description":"Paletas e gradientes da conta"},{"name":"Propostas","description":"Propor logótipos novos ou actualizados"},{"name":"Conta","description":"Verificar um token"}]}