{"openapi":"3.0.3","info":{"title":"sharely.it API","description":"Publique e gerencie artefatos (páginas HTML) no sharely.it. A publicação é direta: não existe etapa de aprovação ou confirmação — um único POST cria o artefato e devolve a URL pública. O envio em duas etapas (/artifacts/uploads) é um fallback para conteúdo acima de 900 KB. Conteúdo com dados pessoais não pode ficar aberto; quando a checagem rápida não conclui, a publicação segue e o acesso pode ser rebaixado para convite logo depois. Os recursos ficam em /artifacts; /htmls continua funcionando como alias legado. Autenticação por Personal Access Token (sat_...) ou OAuth 2.0 com PKCE, usando o cabeçalho Authorization: Bearer. Limite de 60 requisições por minuto por token.","version":"1.0.0"},"servers":[{"url":"https://sharelyit.com/api/v1","description":"Produção"},{"url":"https://sharelyit.com/api/public/v1","description":"Produção (caminho alternativo)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"opaque"},"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://sharelyit.com/oauth/authorize","tokenUrl":"https://sharelyit.com/api/public/oauth/token","refreshUrl":"https://sharelyit.com/api/public/oauth/token","scopes":{"htmls:write":"Publicar e atualizar artefatos","htmls:read":"Listar e ler artefatos","analytics:read":"Ver analytics"}}}}},"schemas":{"Html":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"suggested_slug":{"type":"string","nullable":true,"description":"Endereço sugerido a partir do conteúdo do artefato."},"name":{"type":"string"},"url":{"type":"string","format":"uri"},"url_fallback":{"type":"string","format":"uri"},"access_type":{"type":"string","enum":["open","password","domain","invite"]},"security_status":{"type":"string","enum":["pending","approved","suspicious","blocked"]},"skip_trust_screen":{"type":"boolean","description":"Conteúdo aberto, aprovado e sem dados pessoais é servido sem a tela de confiança."},"pii_detected":{"type":"boolean","description":"Conteúdo contém dados pessoais (LGPD)."},"sensitivity_level":{"type":"string","enum":["public","internal","confidential","restricted"]},"pii_findings":{"type":"array","items":{"type":"string"}},"lifecycle_status":{"type":"string"},"pipeline_stage":{"type":"string"},"cache_ttl":{"type":"integer"},"allowed_domains":{"type":"array","items":{"type":"string"}},"ai_summary":{"type":"string","nullable":true},"og_title":{"type":"string","nullable":true},"og_description":{"type":"string","nullable":true},"og_image_url":{"type":"string","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"published_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/htmls":{"get":{"operationId":"listHtmls","summary":"Lista os HTMLs da conta","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string","format":"date-time"},"description":"created_at do último item da página anterior."}],"responses":{"200":{"description":"Lista paginada","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Html"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}},"post":{"operationId":"createHtml","summary":"Publica um novo HTML","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","content"],"properties":{"name":{"type":"string"},"content":{"type":"string","description":"HTML completo (até 5 MB)."},"slug":{"type":"string"},"access_type":{"type":"string","enum":["open","password","domain","invite"],"default":"open"},"password":{"type":"string"},"allowed_domains":{"type":"array","items":{"type":"string"}},"cache_ttl":{"type":"integer","default":3600},"change_summary":{"type":"string","description":"Resumo da mudança exibido no histórico de versões."},"og_title":{"type":"string","description":"Título do preview ao compartilhar o link (padrão: name)."},"og_description":{"type":"string","maxLength":300,"description":"Descrição do preview (até 300 caracteres; padrão: resumo por IA)."},"og_image_url":{"type":"string","format":"uri","description":"URL https da imagem do preview (padrão: miniatura automática)."}}}}}},"responses":{"201":{"description":"HTML criado","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"url":{"type":"string"},"url_fallback":{"type":"string"},"security_status":{"type":"string"},"pii_detected":{"type":"boolean"},"sensitivity_level":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Endereço já em uso","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Conteúdo maior que 5 MB","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Dados inválidos ou bloqueado por LGPD (pii_open_blocked)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/htmls/uploads":{"post":{"operationId":"createUpload","summary":"Fallback: inicia o envio em duas etapas de um HTML acima de 900 KB","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename"],"properties":{"filename":{"type":"string"},"slug":{"type":"string"}}}}}},"responses":{"201":{"description":"Rascunho criado","content":{"application/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string"},"draft_id":{"type":"string","format":"uuid"},"token":{"type":"string"},"expires_in":{"type":"integer"}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/htmls/uploads/{token}/content":{"post":{"operationId":"uploadContent","summary":"Envia o conteúdo (aceita partes, até 10 MB)","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string"},"append":{"type":"boolean","default":false,"description":"true para acrescentar ao já enviado."}}}}}},"responses":{"200":{"description":"Conteúdo gravado","content":{"application/json":{"schema":{"type":"object","properties":{"uploaded":{"type":"boolean"},"bytes":{"type":"integer"}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Conteúdo maior que 10 MB","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/htmls/uploads/{token}/publish":{"post":{"operationId":"publishFromUpload","summary":"Publica o HTML enviado","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"access_type":{"type":"string","enum":["open","password","domain","invite"],"default":"open"},"password":{"type":"string"},"allowed_domains":{"type":"array","items":{"type":"string"}},"cache_ttl":{"type":"integer","default":3600},"change_summary":{"type":"string"},"og_title":{"type":"string","description":"Título do preview ao compartilhar o link (padrão: name)."},"og_description":{"type":"string","maxLength":300,"description":"Descrição do preview (até 300 caracteres; padrão: resumo por IA)."},"og_image_url":{"type":"string","format":"uri","description":"URL https da imagem do preview (padrão: miniatura automática)."}}}}}},"responses":{"201":{"description":"HTML publicado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Html"}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Endereço já em uso","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"410":{"description":"Upload expirado","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/htmls/{slug}":{"get":{"operationId":"getHtml","summary":"Detalhes de um HTML","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"Endereço público do artefato."}],"responses":{"200":{"description":"Detalhes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Html"}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Não encontrado","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}},"put":{"operationId":"updateHtml","summary":"Atualiza conteúdo ou configurações","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"Endereço público do artefato."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"content":{"type":"string"},"slug":{"type":"string"},"access_type":{"type":"string","enum":["open","password","domain","invite"]},"password":{"type":"string"},"allowed_domains":{"type":"array","items":{"type":"string"}},"cache_ttl":{"type":"integer"},"change_summary":{"type":"string","description":"Resumo da mudança exibido no histórico de versões."},"og_title":{"type":"string","description":"Título do preview ao compartilhar o link (padrão: name)."},"og_description":{"type":"string","maxLength":300,"description":"Descrição do preview (até 300 caracteres; padrão: resumo por IA)."},"og_image_url":{"type":"string","format":"uri","description":"URL https da imagem do preview (padrão: miniatura automática)."}}}}}},"responses":{"200":{"description":"Atualizado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Html"}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Não encontrado","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Acesso aberto bloqueado por dados pessoais (pii_open_blocked)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/htmls/{slug}/stats":{"get":{"operationId":"getHtmlStats","summary":"Analytics de visualizações","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"Endereço público do artefato."}],"responses":{"200":{"description":"Métricas","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"total_views":{"type":"integer"},"unique_visitors":{"type":"integer"},"views_today":{"type":"integer"},"views_last_7d":{"type":"integer"},"views_last_30d":{"type":"integer"},"last_viewed_at":{"type":"string","nullable":true},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"integer"}}}},"referrers":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"count":{"type":"integer"}}}}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Não encontrado","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/me":{"get":{"operationId":"getMe","summary":"Dados do usuário autenticado","responses":{"200":{"description":"Usuário","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","nullable":true},"name":{"type":"string"},"htmls_count":{"type":"integer"},"auth":{"type":"string","enum":["pat","oauth"]},"scopes":{"type":"array","items":{"type":"string"}}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"Este documento","security":[],"responses":{"200":{"description":"OpenAPI 3.0","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/artifacts":{"get":{"operationId":"listHtmls","summary":"Lista os HTMLs da conta","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string","format":"date-time"},"description":"created_at do último item da página anterior."}],"responses":{"200":{"description":"Lista paginada","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Html"}},"next_cursor":{"type":"string","nullable":true}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}},"post":{"operationId":"createHtml","summary":"Publica um novo HTML","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","content"],"properties":{"name":{"type":"string"},"content":{"type":"string","description":"HTML completo (até 5 MB)."},"slug":{"type":"string"},"access_type":{"type":"string","enum":["open","password","domain","invite"],"default":"open"},"password":{"type":"string"},"allowed_domains":{"type":"array","items":{"type":"string"}},"cache_ttl":{"type":"integer","default":3600},"change_summary":{"type":"string","description":"Resumo da mudança exibido no histórico de versões."},"og_title":{"type":"string","description":"Título do preview ao compartilhar o link (padrão: name)."},"og_description":{"type":"string","maxLength":300,"description":"Descrição do preview (até 300 caracteres; padrão: resumo por IA)."},"og_image_url":{"type":"string","format":"uri","description":"URL https da imagem do preview (padrão: miniatura automática)."}}}}}},"responses":{"201":{"description":"HTML criado","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"url":{"type":"string"},"url_fallback":{"type":"string"},"security_status":{"type":"string"},"pii_detected":{"type":"boolean"},"sensitivity_level":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Endereço já em uso","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Conteúdo maior que 5 MB","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Dados inválidos ou bloqueado por LGPD (pii_open_blocked)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/artifacts/uploads":{"post":{"operationId":"createUpload","summary":"Fallback: inicia o envio em duas etapas de um HTML acima de 900 KB","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename"],"properties":{"filename":{"type":"string"},"slug":{"type":"string"}}}}}},"responses":{"201":{"description":"Rascunho criado","content":{"application/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string"},"draft_id":{"type":"string","format":"uuid"},"token":{"type":"string"},"expires_in":{"type":"integer"}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/artifacts/uploads/{token}/content":{"post":{"operationId":"uploadContent","summary":"Envia o conteúdo (aceita partes, até 10 MB)","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string"},"append":{"type":"boolean","default":false,"description":"true para acrescentar ao já enviado."}}}}}},"responses":{"200":{"description":"Conteúdo gravado","content":{"application/json":{"schema":{"type":"object","properties":{"uploaded":{"type":"boolean"},"bytes":{"type":"integer"}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"413":{"description":"Conteúdo maior que 10 MB","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/artifacts/uploads/{token}/publish":{"post":{"operationId":"publishFromUpload","summary":"Publica o HTML enviado","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"access_type":{"type":"string","enum":["open","password","domain","invite"],"default":"open"},"password":{"type":"string"},"allowed_domains":{"type":"array","items":{"type":"string"}},"cache_ttl":{"type":"integer","default":3600},"change_summary":{"type":"string"},"og_title":{"type":"string","description":"Título do preview ao compartilhar o link (padrão: name)."},"og_description":{"type":"string","maxLength":300,"description":"Descrição do preview (até 300 caracteres; padrão: resumo por IA)."},"og_image_url":{"type":"string","format":"uri","description":"URL https da imagem do preview (padrão: miniatura automática)."}}}}}},"responses":{"201":{"description":"HTML publicado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Html"}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"409":{"description":"Endereço já em uso","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"410":{"description":"Upload expirado","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/artifacts/{slug}":{"get":{"operationId":"getHtml","summary":"Detalhes de um HTML","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"Endereço público do artefato."}],"responses":{"200":{"description":"Detalhes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Html"}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Não encontrado","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}},"put":{"operationId":"updateHtml","summary":"Atualiza conteúdo ou configurações","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"Endereço público do artefato."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"content":{"type":"string"},"slug":{"type":"string"},"access_type":{"type":"string","enum":["open","password","domain","invite"]},"password":{"type":"string"},"allowed_domains":{"type":"array","items":{"type":"string"}},"cache_ttl":{"type":"integer"},"change_summary":{"type":"string","description":"Resumo da mudança exibido no histórico de versões."},"og_title":{"type":"string","description":"Título do preview ao compartilhar o link (padrão: name)."},"og_description":{"type":"string","maxLength":300,"description":"Descrição do preview (até 300 caracteres; padrão: resumo por IA)."},"og_image_url":{"type":"string","format":"uri","description":"URL https da imagem do preview (padrão: miniatura automática)."}}}}}},"responses":{"200":{"description":"Atualizado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Html"}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Não encontrado","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"422":{"description":"Acesso aberto bloqueado por dados pessoais (pii_open_blocked)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"/artifacts/{slug}/stats":{"get":{"operationId":"getHtmlStats","summary":"Analytics de visualizações","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"Endereço público do artefato."}],"responses":{"200":{"description":"Métricas","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"total_views":{"type":"integer"},"unique_visitors":{"type":"integer"},"views_today":{"type":"integer"},"views_last_7d":{"type":"integer"},"views_last_30d":{"type":"integer"},"last_viewed_at":{"type":"string","nullable":true},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"count":{"type":"integer"}}}},"referrers":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"count":{"type":"integer"}}}}}}}}},"401":{"description":"Token ausente ou inválido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Não encontrado","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"429":{"description":"Limite de requisições atingido","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}