{"openapi":"3.1.0","info":{"title":"GuiaFlow API","version":"1.0.0","description":"Crie e publique tours interativos (demos) a partir de capturas de tela. Plano Pro. Coordenadas em fração da imagem (0..1). Guia: https://guiaflow.pro/ajuda/api. MCP: https://app.guiaflow.pro/mcp."},"servers":[{"url":"https://app.guiaflow.pro"}],"externalDocs":{"url":"https://guiaflow.pro/ajuda/api"},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Chave pessoal gf_live_… (Conta → Chaves de API) ou token OAuth."}},"responses":{"Error":{"description":"Erro","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":false},"error":{"type":"string"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}}}}}},"paths":{"/v1/me":{"get":{"summary":"Conta e credencial atuais","x-scope":"tours:read","security":[{"bearer":["tours:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/v1/tours":{"get":{"summary":"Listar tours","x-scope":"tours:read","security":[{"bearer":["tours:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200}}]},"post":{"summary":"Criar tour","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"201":{"description":"Criado","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Repetir o POST com a mesma chave (24 h) devolve a mesma resposta."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Nome do tour."},"theme":{"type":"object","properties":{"preset":{"type":"string","description":"Tema pronto. Ids: documento, social, laranja-vibrante, corporate-blue, dark, neutral-light, green, violet."},"colors":{"type":"object","description":"Cores #RRGGBB (sobrepõem o tema atual): accent, overlay, popoverBg, title, text, button, hotspot.","additionalProperties":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}}},"additionalProperties":false}},"required":["name"],"additionalProperties":false}}}}}},"/v1/tours/{id}":{"get":{"summary":"Ver tour","x-scope":"tours:read","security":[{"bearer":["tours:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]},"patch":{"summary":"Renomear tour","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}}}},"/v1/tours/{id}/steps":{"post":{"summary":"Adicionar passo","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"201":{"description":"Criado","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Repetir o POST com a mesma chave (24 h) devolve a mesma resposta."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":120,"description":"Título do balão."},"text":{"type":"string","maxLength":1200,"description":"Texto do balão (curto, 1–2 frases)."},"label":{"type":"string","maxLength":120,"description":"Nome do passo na lista do editor (padrão: o título)."},"narrationScript":{"type":"string","maxLength":3000,"description":"Roteiro da narração/legenda deste passo (opcional)."},"type":{"type":"string","enum":["screen","slide"],"description":"screen = captura com destaque (padrão); slide = cartão de texto sem imagem."},"scene":{"type":"integer","minimum":1,"maximum":99,"description":"Cena (agrupa passos no editor)."},"highlight":{"type":"object","description":"Retângulo do destaque em fração da imagem (0..1): x,y = canto superior esquerdo; width,height = tamanho. Ex.: botão em (0.62, 0.08) com 0.12×0.05.","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0,"maximum":1},"height":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false},"click":{"type":"object","description":"Ponto do clique em fração da imagem (0..1). Fica sempre dentro do destaque (é ajustado se cair fora). Só com click (sem highlight) o destaque vira 14%×8% em volta.","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"],"additionalProperties":false},"popoverSide":{"type":"string","enum":["top","bottom","left","right","over"],"description":"Lado do balão em relação ao destaque."},"popoverAlign":{"type":"string","enum":["start","center","end"]},"simulateClick":{"type":"boolean","description":"Mostra a animação de clique no player (padrão true)."},"position":{"type":"integer","minimum":0,"description":"Índice onde inserir/mover (0 = primeiro). Padrão: no fim."},"image":{"type":"object","description":"A captura de tela: exatamente um de mediaId (de upload_media), url (https pública) ou base64 (PNG/JPEG/WebP/GIF, até 15 MB). Prefira upload_media + mediaId para arquivos locais.","properties":{"mediaId":{"type":"string","description":"sha256 devolvido por upload_media."},"url":{"type":"string","description":"URL https pública da imagem."},"base64":{"type":"string","description":"Imagem em base64 (ou data:image/...;base64,...)."},"name":{"type":"string","description":"Nome do arquivo (opcional)."}},"additionalProperties":false}},"additionalProperties":false}}}}}},"/v1/tours/{id}/steps/{stepId}":{"patch":{"summary":"Editar passo","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":120,"description":"Título do balão."},"text":{"type":"string","maxLength":1200,"description":"Texto do balão (curto, 1–2 frases)."},"label":{"type":"string","maxLength":120,"description":"Nome do passo na lista do editor (padrão: o título)."},"narrationScript":{"type":"string","maxLength":3000,"description":"Roteiro da narração/legenda deste passo (opcional)."},"type":{"type":"string","enum":["screen","slide"],"description":"screen = captura com destaque (padrão); slide = cartão de texto sem imagem."},"scene":{"type":"integer","minimum":1,"maximum":99,"description":"Cena (agrupa passos no editor)."},"highlight":{"type":"object","description":"Retângulo do destaque em fração da imagem (0..1): x,y = canto superior esquerdo; width,height = tamanho. Ex.: botão em (0.62, 0.08) com 0.12×0.05.","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0,"maximum":1},"height":{"type":"number","minimum":0,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false},"click":{"type":"object","description":"Ponto do clique em fração da imagem (0..1). Fica sempre dentro do destaque (é ajustado se cair fora). Só com click (sem highlight) o destaque vira 14%×8% em volta.","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["x","y"],"additionalProperties":false},"popoverSide":{"type":"string","enum":["top","bottom","left","right","over"],"description":"Lado do balão em relação ao destaque."},"popoverAlign":{"type":"string","enum":["start","center","end"]},"simulateClick":{"type":"boolean","description":"Mostra a animação de clique no player (padrão true)."},"position":{"type":"integer","minimum":0,"description":"Índice onde inserir/mover (0 = primeiro). Padrão: no fim."},"image":{"type":"object","description":"A captura de tela: exatamente um de mediaId (de upload_media), url (https pública) ou base64 (PNG/JPEG/WebP/GIF, até 15 MB). Prefira upload_media + mediaId para arquivos locais.","properties":{"mediaId":{"type":"string","description":"sha256 devolvido por upload_media."},"url":{"type":"string","description":"URL https pública da imagem."},"base64":{"type":"string","description":"Imagem em base64 (ou data:image/...;base64,...)."},"name":{"type":"string","description":"Nome do arquivo (opcional)."}},"additionalProperties":false}},"additionalProperties":false}}}}},"delete":{"summary":"Apagar passo","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/tours/{id}/steps/order":{"put":{"summary":"Reordenar passos","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stepIds":{"type":"array","items":{"type":"string"}}},"required":["stepIds"],"additionalProperties":false}}}}}},"/v1/tours/{id}/theme":{"put":{"summary":"Tema","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"preset":{"type":"string","description":"Tema pronto. Ids: documento, social, laranja-vibrante, corporate-blue, dark, neutral-light, green, violet."},"colors":{"type":"object","description":"Cores #RRGGBB (sobrepõem o tema atual): accent, overlay, popoverBg, title, text, button, hotspot.","additionalProperties":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}}},"additionalProperties":false}}}}}},"/v1/tours/{id}/lead-capture":{"put":{"summary":"Captura de lead (passo inicial)","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"title":{"type":"string","maxLength":120},"text":{"type":"string","maxLength":600},"fields":{"type":"object","properties":{"name":{"type":"string","enum":["required","optional","hidden"]},"email":{"type":"string","enum":["required","optional","hidden"]},"phone":{"type":"string","enum":["required","optional","hidden"]}},"additionalProperties":false},"consentText":{"type":"string","description":"Texto de consentimento (LGPD). Padrão: o texto do GuiaFlow."},"allowSkip":{"type":"boolean","description":"Deixa pular o formulário (padrão true)."},"submitLabel":{"type":"string"},"skipLabel":{"type":"string"}},"additionalProperties":false}}}}}},"/v1/tours/{id}/end-cta":{"put":{"summary":"CTA final (WhatsApp/link)","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"title":{"type":"string","maxLength":120},"text":{"type":"string","maxLength":600},"whatsapp":{"type":"object","properties":{"phone":{"type":"string","description":"E.164 com DDI: +5511999998888"},"message":{"type":"string"},"label":{"type":"string"}},"required":["phone"],"additionalProperties":false},"link":{"type":"object","properties":{"url":{"type":"string"},"label":{"type":"string"}},"required":["url"],"additionalProperties":false},"showReplay":{"type":"boolean"}},"additionalProperties":false}}}}}},"/v1/tours/{id}/publish":{"post":{"summary":"Publicar no link permanente (ou dryRun)","x-scope":"publish","security":[{"bearer":["publish"]}],"responses":{"200":{"description":"Atualizado / validado","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"201":{"description":"Publicado","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Repetir o POST com a mesma chave (24 h) devolve a mesma resposta."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean"},"title":{"type":"string","maxLength":200,"description":"Título do link (padrão: nome do tour)."}},"additionalProperties":false}}}}},"delete":{"summary":"Despublicar","x-scope":"publish","security":[{"bearer":["publish"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/tours/{id}/steps/{stepId}/generate-text":{"post":{"summary":"IA escreve título e texto do passo (usa 1 texto da cota)","x-scope":["ai","tours:write"],"security":[{"bearer":["ai","tours:write"]}],"responses":{"200":{"description":"generated, saved, usage","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Repetir o POST com a mesma chave (24 h) devolve a mesma resposta."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"type":"string","maxLength":1000,"description":"Pedido extra (tom, público, o que destacar)."},"language":{"type":"string","enum":["pt-BR","es","en"],"description":"Idioma do texto (padrão pt-BR)."},"narrationScript":{"type":"boolean","description":"Também escrever o roteiro da narração."},"useImage":{"type":"boolean","description":"Mandar a captura para a IA (padrão true)."},"save":{"type":"boolean","description":"Gravar no passo (padrão true)."}},"additionalProperties":false}}}}}},"/v1/tours/{id}/steps/{stepId}/narration":{"post":{"summary":"Narração do passo (MP3 mono 64 kbps; usa a cota de áudio)","x-scope":["ai","tours:write"],"security":[{"bearer":["ai","tours:write"]}],"responses":{"201":{"description":"narration, usage","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Repetir o POST com a mesma chave (24 h) devolve a mesma resposta."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":3000,"description":"Texto a narrar (vira o roteiro do passo)."},"voice":{"type":"string","description":"id de voz Cartesia (opcional; padrão: a voz do tour ou Isabella)."}},"additionalProperties":false}}}}}},"/v1/tours/{id}/analytics":{"get":{"summary":"Estatísticas do link do tour","x-scope":"analytics:read","security":[{"bearer":["analytics:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}]}},"/v1/analytics":{"get":{"summary":"Resumo por link publicado (ou ?tourId=)","x-scope":"analytics:read","security":[{"bearer":["analytics:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"tourId","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}]}},"/v1/media":{"post":{"summary":"Enviar imagem (base64 ou url https)","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"201":{"description":"Gravada: media.mediaId","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128},"description":"Repetir o POST com a mesma chave (24 h) devolve a mesma resposta."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"base64":{"type":"string"},"url":{"type":"string"},"name":{"type":"string"}}}}}}}},"/v1/media/upload-url":{"post":{"summary":"URL de upload (PUT com os bytes, 15 min)","x-scope":"tours:write","security":[{"bearer":["tours:write"]}],"responses":{"201":{"description":"upload.url","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"additionalProperties":true}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}}}}