{"name":"samehand","description":"Reescreve textos curtos e compara as palavras removidas e adicionadas. Use seu perfil pessoal ou a demonstração pública. Confira reescrita_disponivel em /api/health antes de enviar.","build":"7de91f50","base_url":"https://staging.samehand.app","docs":{"llms":"https://staging.samehand.app/llms.txt","llms_full":"https://staging.samehand.app/llms-full.txt","openapi":"https://staging.samehand.app/openapi.json","mcp":"https://staging.samehand.app/mcp","pricing":"https://staging.samehand.app/api/pricing","billing":"https://staging.samehand.app/api/billing","human_ui":"https://staging.samehand.app/","data_indexes":[{"id":"cep","produto":"https://pontofato.com","caminho":"/enderecos","title":"CEPs e endereços","description":"Encontre endereços por lugar, com coordenadas e referência de 2022. Não certifica CEP vigente. Cada página HTML abre o app do produto com os dados públicos já renderizados.","hierarchy":"UF → município → bairro/localidade → rua → endereços","url":"https://pontofato.com/enderecos/","formats":{"html":"https://pontofato.com/enderecos/","json":"https://api.pontofato.com/enderecos/index.json","md":"https://api.pontofato.com/enderecos/index.md","okf":"https://api.pontofato.com/enderecos/index.okf.md"},"llms":"https://api.pontofato.com/enderecos/llms.txt","openapi":"https://api.pontofato.com/enderecos/openapi.json","mcp":"https://api.pontofato.com/enderecos/mcp","okf":"https://api.pontofato.com/enderecos/okf/index.md","access":"public-read-only","pagination":{"max_items":20,"next":"links.proximo"},"updates":"manual"},{"id":"editais","produto":"https://editalmd.com","caminho":"/licitacoes","title":"Editais e compras públicas","description":"Encontre compras públicas por lugar e período. Consulte documentos e opções de leitura no EditalMD. Cada página HTML abre o app do produto com os dados públicos já renderizados.","hierarchy":"Modalidade → UF → ano → mês → dia → município → compras","url":"https://editalmd.com/licitacoes/","formats":{"html":"https://editalmd.com/licitacoes/","json":"https://api.editalmd.com/licitacoes/index.json","md":"https://api.editalmd.com/licitacoes/index.md","okf":"https://api.editalmd.com/licitacoes/index.okf.md"},"llms":"https://api.editalmd.com/licitacoes/llms.txt","openapi":"https://api.editalmd.com/licitacoes/openapi.json","mcp":"https://api.editalmd.com/licitacoes/mcp","okf":"https://api.editalmd.com/licitacoes/okf/index.md","access":"public-read-only","pagination":{"max_items":20,"next":"links.proximo"},"updates":"manual"}]},"conventions":{"format":"JSON em `/api/*`.","cors":"`Access-Control-Allow-Origin: *` nas rotas de agente.","x402":"Reescrita sem conta ou além da franquia da conta: HTTP 402 + X-PAYMENT, ou crédito pré-pago.","parity":"Mexeu na UI/API → apidocs + MCP no mesmo PR."},"auth":{"none":"Público.","token":"Token de operador `METRICS_TOKEN` em `Authorization: Bearer` (métricas).","credito":"Token de crédito em `Authorization: Bearer cred_…` (ou `X-Credito`). Para saldo recuperado de x402, use a credencial de carteira `mmw_…` em Bearer ou `X-Wallet-Token`, emitida por `/api/auth/wallet/agent/start` e `/api/auth/wallet/agent/token`.","session":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},"endpoints":[{"method":"GET","path":"/api/auth/bootstrap","auth":"none","grupo":"Account","summary":"Prepare the browser for global sign-in.","desc":"Sets a host-only HttpOnly browser cookie. CSRF is bound to the current session. No CORS.","retorno":{"csrf":{"tipo":"string","desc":"X-CSRF-Token"},"context":{"tipo":"string","desc":"Opaque view context, also in X-MM-Context; not a credential / contexto opaco da vista, não é credencial."}},"erros":{"400":"invalid_request","403":"invalid_origin / invalid_csrf","503":"auth_unavailable: a sessão anterior é preservada / the previous session is preserved"},"returns":"{ csrf, context }","url":"https://staging.samehand.app/api/auth/bootstrap","auth_detail":"Público."},{"method":"GET","path":"/api/account/profile","auth":"session","grupo":"Account","exemplo":"await fetch(\"$ORIGIN/api/account/profile\", {credentials: \"same-origin\"}).then(r => r.json());","exemploLinguagem":"js","summary":"Read your global profile.","desc":"Reads current preferences from the account. Edit them on your account page; products never own a separate profile.","retorno":{"_texto":"{profile:{name,locale,timeZone,theme,revision}}"},"erros":{"401":"invalid_session","503":"auth_unavailable"},"returns":"{profile:{name,locale,timeZone,theme,revision}}","url":"https://staging.samehand.app/api/account/profile","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"GET","path":"/api/account/avatar","auth":"session","grupo":"Account","exemplo":"await fetch(\"$ORIGIN/api/account/avatar\", {credentials: \"same-origin\"}).then(r => {if (!r.ok) throw new Error(\"HTTP \" + r.status); return r.blob();});","exemploLinguagem":"js","summary":"Read your global profile photo.","desc":"Private WebP, up to 64 KiB, no cache. Change it on your account. No user ID or object URL accepted.","retorno":{"_texto":"image/webp; Cache-Control: no-store"},"erros":{"401":"invalid_session","404":"not_found: no photo / sem foto","503":"auth_unavailable"},"returns":"image/webp; Cache-Control: no-store","url":"https://staging.samehand.app/api/account/avatar","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"GET","path":"/api/me","auth":"session","grupo":"Account","exemplo":"await fetch(\"$ORIGIN/api/me\", {credentials: \"same-origin\"}).then(r => r.json());","exemploLinguagem":"js","summary":"Read the current global account in this product.","desc":"The product SDK also returns profile and administration. administration is {href} for the platform owner signed in with a passkey, authenticator or recovery code, otherwise null. The server derives this field from the authenticated account. authTime is the sign-in time of a browser session; it is null for an API key or OAuth token.","retorno":{"_texto":"{user:{identityId,sessionId,productId,audience,authTime,methods,mfaState}}"},"erros":{"401":"invalid_session","503":"auth_unavailable"},"returns":"{user:{identityId,sessionId,productId,audience,authTime,methods,mfaState}}","url":"https://staging.samehand.app/api/me","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/auth/logout","auth":"session","grupo":"Account","exemplo":"// Execute no console da página do produto / Run in the product page console.\n(async () => {\n  const origin = \"$ORIGIN\";\n  const {csrf} = await fetch(origin + \"/api/auth/bootstrap\").then(r => r.json());\n  const r = await fetch(origin + \"/api/auth/logout\", {\n    method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({})\n  });\n  if (!r.ok) throw new Error(\"Auth HTTP \" + r.status);\n  return r.json();\n})();","exemploLinguagem":"js","summary":"Revoke this product session.","desc":"Bootstrap/CSRF must belong to this browser and session. Other product sessions remain active.","retorno":{"ok":{"tipo":"bool","desc":"true"}},"erros":{"400":"invalid_request","403":"invalid_origin / invalid_csrf","503":"auth_unavailable: a sessão anterior é preservada / the previous session is preserved"},"returns":"{ ok }","url":"https://staging.samehand.app/api/auth/logout","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/auth/pwa/install","auth":"session","grupo":"Installed app","summary":"Prepare a personal app installation.","desc":"Requires recent sign-in, exact Origin and browser CSRF. Returns a private signed PIN and a no-store manifest address. At most 10 active installations per account and product.","corpo":{"path":{"tipo":"string","obrigatorio":true,"desc":"Same-origin task path, up to 1600 characters."},"state":{"tipo":"object","obrigatorio":true,"desc":"Up to 30 allowlisted preference keys and string values."},"manifest":{"tipo":"object","obrigatorio":true,"desc":"Public app name and same-origin icons."}},"retorno":{"_texto":"{pin,path,manifest}"},"exemplo":"(async () => {\n  const {csrf} = await fetch(\"$ORIGIN/api/auth/bootstrap\").then(r => r.json());\n  const manifest = await fetch(document.querySelector('link[rel=\"manifest\"]').href).then(r => r.json());\n  const r = await fetch(\"$ORIGIN/api/auth/pwa/install\", {method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({path: location.pathname + location.search, state: {}, manifest})});\n  return r.json();\n})();","exemploLinguagem":"js","erros":{"400":"invalid_installation_path / invalid_installation_state / invalid_installation_manifest","401":"invalid_session / reauth_required","409":"installation_not_created","503":"auth_unavailable"},"returns":"{pin,path,manifest}","url":"https://staging.samehand.app/api/auth/pwa/install","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/auth/pwa/restore","auth":"none","grupo":"Installed app","summary":"Restore an installed app.","desc":"Requires the signed PIN, exact Origin and browser CSRF. Verifies host, product, account status, security version and installation revocation. Keeps the original authentication time. Sensitive actions still require recent sign-in.","corpo":{"pin":{"tipo":"string","obrigatorio":true,"desc":"Private signed installation credential."}},"retorno":{"_texto":"{ok:true,state,path,manifest}; HttpOnly session cookies"},"exemplo":"(async () => {\n  const {csrf} = await fetch(\"$ORIGIN/api/auth/bootstrap\").then(r => r.json());\n  const r = await fetch(\"$ORIGIN/api/auth/pwa/restore\", {method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({pin: \"…\"})});\n  return r.json();\n})();","exemploLinguagem":"js","erros":{"401":"invalid_installation","403":"invalid_origin / invalid_csrf","503":"auth_unavailable"},"returns":"{ok:true,state,path,manifest}; HttpOnly session cookies","url":"https://staging.samehand.app/api/auth/pwa/restore","auth_detail":"Público."},{"method":"GET","path":"/api/auth/pwa/manifest","auth":"none","grupo":"Installed app","summary":"Read the private installation manifest.","desc":"Requires the installation cookie and its manifest key. Private, no-store. The start URL keeps the PIN in the fragment.","query":{"key":{"tipo":"string","obrigatorio":true,"desc":"Key in the manifest address that the install or restore call returned."}},"retorno":{"_texto":"application/manifest+json"},"exemplo":"await fetch(\"$ORIGIN/api/auth/pwa/manifest?key=…\", {credentials: \"same-origin\"}).then(r => r.json())","exemploLinguagem":"js","erros":{"401":"invalid_installation"},"returns":"application/manifest+json","url":"https://staging.samehand.app/api/auth/pwa/manifest","auth_detail":"Público."},{"method":"GET","path":"/api/account/keys","auth":"session","grupo":"Account","summary":"List your API keys in this product.","desc":"Never returns the key itself: name, last 4 characters, organization, creation, last use (hourly) and whether it still works.","retorno":{"keys":{"tipo":"object[]","desc":"`id`, `name`, `organizationId`, `last4`, `createdAt`, `lastUsedAt`, `revokedAt`, `active` (false when revoked or stopped by a password change / ending all sessions)."}},"erros":{"401":"invalid_session","503":"auth_unavailable"},"exemplo":"await fetch(\"$ORIGIN/api/account/keys\", {credentials: \"same-origin\"}).then(r => r.json());","exemploLinguagem":"js","returns":"{ keys }","url":"https://staging.samehand.app/api/account/keys","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/account/keys/create","auth":"session","grupo":"Account","summary":"Create an API key for agents and scripts.","desc":"Needs a sign-in within the last 2 hours; an organization key also needs a second factor in the session and the owner/admin role with this product enabled. At most 10 live keys per account and product. The key (`secret`) is returned ONCE.","corpo":{"name":{"tipo":"string","obrigatorio":true,"desc":"Up to 60 characters."},"organizationId":{"tipo":"string","nulo":true,"obrigatorio":true,"desc":"`null` for an account key."}},"body":{"name":"agent","organizationId":null},"retorno":{"key":{"tipo":"object","desc":"`id`, `name`, `organizationId`, `last4`, `createdAt`."},"secret":{"tipo":"string","desc":"`mmk_…`, shown once."}},"erros":{"400":"invalid_key_name / invalid_organization","401":"invalid_session / reauth_required","403":"invalid_origin / invalid_csrf / organization_forbidden / organization_mfa_required","409":"key_limit_reached","503":"auth_unavailable"},"exemplo":"(async () => {\n  const {csrf} = await fetch(\"$ORIGIN/api/auth/bootstrap\").then(r => r.json());\n  const r = await fetch(\"$ORIGIN/api/account/keys/create\", {method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({name: \"agent\", organizationId: null})});\n  return r.json();\n})();","exemploLinguagem":"js","returns":"{ key, secret }","url":"https://staging.samehand.app/api/account/keys/create","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/account/keys/revoke","auth":"session","grupo":"Account","summary":"Revoke one of your API keys.","desc":"Stops the key at once. Repeating is harmless.","corpo":{"id":{"tipo":"string","obrigatorio":true,"desc":"The key `id`."}},"body":{"id":"…"},"retorno":{"ok":{"tipo":"bool","desc":"true"}},"erros":{"400":"invalid_key_id","401":"invalid_session","403":"invalid_origin / invalid_csrf","404":"key_not_found","503":"auth_unavailable"},"exemplo":"(async () => {\n  const {csrf} = await fetch(\"$ORIGIN/api/auth/bootstrap\").then(r => r.json());\n  const r = await fetch(\"$ORIGIN/api/account/keys/revoke\", {method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({id: \"…\"})});\n  return r.json();\n})();","exemploLinguagem":"js","returns":"{ ok }","url":"https://staging.samehand.app/api/account/keys/revoke","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"GET","path":"/api/account/apps","auth":"session","grupo":"Account","summary":"List the apps connected to your account in this product.","desc":"The MCP clients you signed in with (OAuth), such as claude.ai or ChatGPT. Never returns a token.","retorno":{"apps":{"tipo":"object[]","desc":"Up to 50: `id`, `nome` (the app; its host when it identifies itself by a metadata document), `criadoEm`, `usadoEm` (hourly, or null)."}},"erros":{"401":"invalid_session","503":"auth_unavailable"},"exemplo":"await fetch(\"$ORIGIN/api/account/apps\", {credentials: \"same-origin\"}).then(r => r.json());","exemploLinguagem":"js","returns":"{ apps }","url":"https://staging.samehand.app/api/account/apps","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/account/apps/revoke","auth":"session","grupo":"Account","summary":"Disconnect an app from your account.","desc":"Stops the app's access at once; it asks you to sign in again. Repeating is harmless.","corpo":{"id":{"tipo":"string","obrigatorio":true,"desc":"The app `id`."}},"body":{"id":"…"},"retorno":{"ok":{"tipo":"bool","desc":"true"}},"erros":{"400":"invalid_app_id","401":"invalid_session","403":"invalid_origin / invalid_csrf","404":"app_not_found","503":"auth_unavailable"},"exemplo":"(async () => {\n  const {csrf} = await fetch(\"$ORIGIN/api/auth/bootstrap\").then(r => r.json());\n  const r = await fetch(\"$ORIGIN/api/account/apps/revoke\", {method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({id: \"…\"})});\n  return r.json();\n})();","exemploLinguagem":"js","returns":"{ ok }","url":"https://staging.samehand.app/api/account/apps/revoke","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"GET","path":"/api/account/callouts","auth":"session","grupo":"Account","summary":"List the notices that you closed in this product.","desc":"The keys of the notices that stay closed for your account, on every device, such as the explanation of an area.","retorno":{"callouts":{"tipo":"string[]","desc":"Up to 200 keys, in alphabetical order."}},"erros":{"401":"invalid_session","403":"product_required","503":"auth_unavailable"},"exemplo":"await fetch(\"$ORIGIN/api/account/callouts\", {credentials: \"same-origin\"}).then(r => r.json());","exemploLinguagem":"js","returns":"{ callouts }","url":"https://staging.samehand.app/api/account/callouts","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/account/callouts/dismiss","auth":"session","grupo":"Account","summary":"Close a notice for good.","desc":"The notice does not open again for your account in this product. Repeating is harmless.","corpo":{"key":{"tipo":"string","obrigatorio":true,"desc":"The notice key: letters, digits and `_.:-`, up to 80."}},"body":{"key":"financeiro_expense"},"retorno":{"ok":{"tipo":"bool","desc":"true"}},"erros":{"400":"invalid_callout","401":"invalid_session","403":"invalid_origin / invalid_csrf","409":"too_many_callouts","503":"auth_unavailable"},"exemplo":"(async () => {\n  const {csrf} = await fetch(\"$ORIGIN/api/auth/bootstrap\").then(r => r.json());\n  const r = await fetch(\"$ORIGIN/api/account/callouts/dismiss\", {method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({key: \"financeiro_expense\"})});\n  return r.json();\n})();","exemploLinguagem":"js","returns":"{ ok }","url":"https://staging.samehand.app/api/account/callouts/dismiss","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/account/callouts/reopen","auth":"session","grupo":"Account","summary":"Open a closed notice again.","desc":"Undoes the close: the notice shows again for your account in this product. A product also keeps an on/off choice here, as the hidden values of Finance. Repeating is harmless.","corpo":{"key":{"tipo":"string","obrigatorio":true,"desc":"The notice key: letters, digits and `_.:-`, up to 80."}},"body":{"key":"financeiro_expense"},"retorno":{"ok":{"tipo":"bool","desc":"true"}},"erros":{"400":"invalid_callout","401":"invalid_session","403":"invalid_origin / invalid_csrf","503":"auth_unavailable"},"exemplo":"(async () => {\n  const {csrf} = await fetch(\"$ORIGIN/api/auth/bootstrap\").then(r => r.json());\n  const r = await fetch(\"$ORIGIN/api/account/callouts/reopen\", {method: \"POST\", credentials: \"same-origin\",\n    headers: {\"Content-Type\": \"application/json\", \"X-CSRF-Token\": csrf},\n    body: JSON.stringify({key: \"financeiro_expense\"})});\n  return r.json();\n})();","exemploLinguagem":"js","returns":"{ ok }","url":"https://staging.samehand.app/api/account/callouts/reopen","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/auth/wallet/agent/start","auth":"none","grupo":"Account","summary":"Start the wallet credential of an agent without an account.","desc":"No account: the wallet proves it is hers by signing the message (EIP-4361). Signing does not pay or transfer anything. The message names this product and lasts 5 minutes. Before you sign, compare the message with the URL that you called. The domain on the first line must be the host of that URL. URI must be its origin. If one is different, do not sign. Sign it with personal_sign and send it to /api/auth/wallet/agent/token.","corpo":{"address":{"tipo":"string","desc":"0x…, a carteira (EOA ou contrato na Base)","obrigatorio":true}},"body":{"address":"0x2c7536E3605D9C16a7a3D7b1898e529396a65c23"},"exemplo":"curl -s -XPOST $ORIGIN/api/auth/wallet/agent/start -H 'content-type: application/json' -d '{\"address\":\"0x2c7536E3605D9C16a7a3D7b1898e529396a65c23\"}'","retorno":{"message":{"tipo":"string","desc":"EIP-4361"},"issuedAt":{"tipo":"number","desc":"segundos / seconds"},"expiresIn":{"tipo":"number","desc":"300"}},"erros":{"400":"invalid_wallet_address","503":"auth_unavailable"},"returns":"{ message, issuedAt, expiresIn }","url":"https://staging.samehand.app/api/auth/wallet/agent/start","auth_detail":"Público."},{"method":"POST","path":"/api/auth/wallet/agent/token","auth":"none","grupo":"Account","summary":"Get the wallet credential (mmw_…) of this product.","desc":"The wallet's signature of the start message, checked here (own key) or on Base (contract, EIP-1271/6492). The credential lasts 30 days: send `Authorization: Bearer mmw_…` to the routes that accept the wallet as owner (owner `x402:<address>`). Once the wallet is linked to an account, what it did here moves to the account when the person signs in.","corpo":{"address":{"tipo":"string","desc":"0x…, a mesma carteira do start / the same wallet as in start","obrigatorio":true},"issuedAt":{"tipo":"number","desc":"o issuedAt do start / start's issuedAt","obrigatorio":true},"signature":{"tipo":"string","desc":"personal_sign (0x…)","obrigatorio":true}},"body":{"address":"0x2c7536E3605D9C16a7a3D7b1898e529396a65c23","issuedAt":1791400000,"signature":"0x…"},"exemplo":"curl -s -XPOST $ORIGIN/api/auth/wallet/agent/token -H 'content-type: application/json' -d '{\"address\":\"0x2c7536E3605D9C16a7a3D7b1898e529396a65c23\",\"issuedAt\":1791400000,\"signature\":\"0x…\"}'","retorno":{"token":{"tipo":"string","desc":"mmw_…"},"owner":{"tipo":"string","desc":"x402:0x…"},"expiresAt":{"tipo":"number","desc":"segundos / seconds"}},"erros":{"400":"invalid_body","401":"invalid_wallet","429":"wallet_limited","503":"wallet_unavailable / auth_unavailable"},"returns":"{ token, owner, expiresAt }","url":"https://staging.samehand.app/api/auth/wallet/agent/token","auth_detail":"Público."},{"method":"GET","path":"/agent.json","auth":"none","summary":"Agent card: identity, operator, documentation, the MCP endpoint and the tools it serves. Same document as `/.well-known/agent-card.json`.","grupo":"Discovery","retorno":{"_texto":"`application/json`: `name`, `provider`, `protocol` (`mcp`), `interfaces[]` and `skills[]`."},"exemplo":"curl -s $ORIGIN/agent.json","returns":"`application/json`: `name`, `provider`, `protocol` (`mcp`), `interfaces[]` and `skills[]`.","url":"https://staging.samehand.app/agent.json","auth_detail":"Público."},{"method":"GET","path":"/okf/:arquivo","auth":"none","summary":"OKF bundle (Open Knowledge Format v0.1): markdown with frontmatter so an agent reads the whole product without parsing HTML.","grupo":"Discovery","params":{"arquivo":{"desc":"`index.md`, `sobre.md`, `api.md` or `faq.md`.","exemplo":"index.md"}},"retorno":{"_texto":"`text/markdown`. Start at `/okf/index.md`, which lists the bundle."},"erros":{"404":"File outside the bundle."},"exemplo":"curl -s $ORIGIN/okf/index.md","returns":"`text/markdown`. Start at `/okf/index.md`, which lists the bundle.","url":"https://staging.samehand.app/okf/:arquivo","auth_detail":"Público."},{"method":"GET","path":"/.well-known/:arquivo","auth":"none","summary":"Machine discovery before the home page: `api-catalog` (RFC 9727, a linkset with the API and the MCP), `security.txt` (RFC 9116), `x402` (payment manifest: network, wallet and the routes that charge) and `mcp-registry-auth` (the official MCP registry key).","grupo":"Discovery","params":{"arquivo":{"desc":"`api-catalog`, `security.txt`, `x402`, `mcp-registry-auth` or `apis.json`.","exemplo":"api-catalog"}},"retorno":{"_texto":"`application/linkset+json` for the api-catalog; `application/json` for x402 and apis.json; `text/plain` for the other two."},"erros":{"404":"Name outside the five published."},"exemplo":"curl -s $ORIGIN/.well-known/api-catalog","returns":"`application/linkset+json` for the api-catalog; `application/json` for x402 and apis.json; `text/plain` for the other two.","url":"https://staging.samehand.app/.well-known/:arquivo","auth_detail":"Público."},{"method":"GET","path":"/apis.json","auth":"none","summary":"APIs.json (apisjson.org, 0.19): the index APIs.io harvests — the API, the MCP, OpenAPI, guide and OKF bundle in one file. Also at `/.well-known/apis.json`.","grupo":"Discovery","retorno":{"_texto":"`application/json` in the APIs.json 0.19 format: `apis[]` with `baseURL`, `humanURL` and `properties[]`."},"exemplo":"curl -s $ORIGIN/apis.json","returns":"`application/json` in the APIs.json 0.19 format: `apis[]` with `baseURL`, `humanURL` and `properties[]`.","url":"https://staging.samehand.app/apis.json","auth_detail":"Público."},{"method":"GET","path":"/api/","auth":"none","summary":"Índice auto-descrito: cada rota, o que cobra e como plugar o MCP.","grupo":"Descoberta","retorno":{"name":{"tipo":"string","desc":"Nome do produto."},"description":{"tipo":"string","desc":"O que o produto faz."},"build":{"tipo":"string","desc":"Commit publicado."},"base_url":{"tipo":"string","desc":"Origem em que esta API está servindo."},"docs":{"tipo":"object","desc":"Links para llms.txt, OpenAPI, MCP e a UI."},"endpoints":{"tipo":"object[]","desc":"Catálogo de endpoints."},"mcp_tools":{"tipo":"string[]","desc":"Tools do MCP."}},"returns":"{ name, description, build, base_url, docs, endpoints, mcp_tools }","url":"https://staging.samehand.app/api/","auth_detail":"Público."},{"method":"GET","path":"/api/health","auth":"none","grupo":"Descoberta","summary":"Saúde do processo, número de exemplos e disponibilidade da configuração de reescrita.","retorno":"Saude","exemplo":"curl -s $ORIGIN/api/health","returns":"{ ok, build, exemplos, modelo, reescrita_disponivel, protocolo }","url":"https://staging.samehand.app/api/health","auth_detail":"Público."},{"method":"POST","path":"/mcp","auth":"none","summary":"MCP Streamable HTTP — as tools deste catálogo, despachadas neste mesmo Worker.","grupo":"Descoberta","retorno":{"_texto":"JSON-RPC 2.0 (`initialize`, `tools/list`, `tools/call`)."},"exemplo":"curl -s -XPOST $ORIGIN/mcp -H 'content-type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}'","returns":"JSON-RPC 2.0 (`initialize`, `tools/list`, `tools/call`).","url":"https://staging.samehand.app/mcp","auth_detail":"Público."},{"method":"GET","path":"/api/estilo","auth":"none","summary":"Estatísticas do perfil de escrita atual, com o tamanho das amostras de um único autor.","grupo":"Voz","retorno":"StyleCard","exemplo":"curl -s $ORIGIN/api/estilo","returns":"{ geradoEm, desde, medidas{resposta,post} }","url":"https://staging.samehand.app/api/estilo","auth_detail":"Público."},{"method":"POST","path":"/api/rewrite","auth":"credito","summary":"Reescreve um texto curto com o perfil atual. Compara as palavras removidas e adicionadas.","grupo":"Voz","preco":"$PRECO_REESCRITA_USD per rewrite beyond the signed-in account allowance, or without an account","corpo":{"texto":{"tipo":"string","desc":"Rascunho ou ideia a reescrever. Até 4000 caracteres.","req":true,"exemplo":"Please review this draft."},"contexto":{"tipo":"string","desc":"Informações de referência. Até 4000 caracteres. O modelo não busca links."},"registro":{"tipo":"string","desc":"`resposta` (padrão) ou `post`."},"voz":{"tipo":"string","desc":"pessoal: your account profile; neutra: no examples; demonstracao: public demo (legacy default)."},"perfilVersao":{"tipo":"string","desc":"Current revision from GET /api/profile. Required when voz is pessoal."},"preservar":{"tipo":"string[]","desc":"Literal names, amounts, dates or other strings from texto that every returned variant must retain exactly. Invalid entries are refused before billing. Variants that change them are not returned; if all fail, no charge."},"instrucoes":{"tipo":"string","desc":"Regras do autor sobre a própria voz, uma por linha."},"idioma":{"tipo":"string","desc":"Língua das versões, em código ISO 639-1 (`en`, `pt`, `ja`…). Sem ele, a do texto."},"estilos":{"tipo":"object[]","desc":"Até 5 `{id, nome, prompt}`. Cada estilo é uma variante — e uma chamada ao modelo."}},"retorno":"Reescrita","erros":{"400":"`texto_vazio`, `json_invalido` or `preservar_invalido` (not an array of nonempty strings present in texto).","401":"Invalid account credential. Sign in again or use a valid personal API key.","402":"No account or daily allowance used up: pay with x402 or prepaid credit.","403":"The account request failed its origin or CSRF check.","413":"`texto_longo` — o teto é 4000 caracteres.","502":"`falha_upstream` — o provedor do modelo não respondeu.","503":"`sem_credencial` — reescrita sem modelo configurado. Não cobra nem chama o provedor."},"exemplo":"curl -s -XPOST $ORIGIN/api/rewrite -H 'content-type: application/json' -d '{\"texto\":\"This is not just a flaw, it is a breach of trust.\",\"registro\":\"post\"}'","agent_value":{"principal":true,"idioma":"pt","en":{"when":"How can I rewrite a draft using my saved writing examples?","result":"Text variants with word changes, the selected profile revision and literal preservation of names, amounts or other strings you specify.","replaces":"Reuse the saved profile and see the word changes. You do not need to rebuild that context and comparison for every draft.","free":"Check /api/health, read your authorized profile and send voz:pessoal with perfilVersao. Add preservar with literal strings from the draft. Try within the free allowance and review meaning and style.","paid":"Beyond the allowance, credit or per-call payment buys more rewrites. Use it when the saved profile and comparison are useful to your task.","limits":"The model receives the draft and selected context. Variants missing a protected string are refused; if none remain, the request is not charged. Literal preservation does not verify other facts or intent. Extra styles require extra generations.","alternative":"Your existing model already has the right examples and comparison, or you only need a simple one-time rewrite.","start":{"href":"/","label":"Rewrite a draft"}},"pt":{"when":"Como reescrever um rascunho com meus exemplos de escrita?","result":"Variantes com palavras alteradas, versão do perfil escolhido e preservação literal dos nomes, valores ou trechos que você indicar.","replaces":"Reutilize o perfil salvo e veja as palavras alteradas. Você não precisa montar o contexto e a comparação a cada rascunho.","free":"Confira /api/health, leia seu perfil autorizado e envie voz:pessoal com perfilVersao. Em preservar, indique trechos literais do rascunho. Experimente na franquia gratuita e revise sentido e estilo.","paid":"Além da franquia, crédito ou pagamento por chamada compra mais reescritas. Use quando o perfil salvo e a comparação ajudarem na tarefa.","limits":"O modelo recebe rascunho e contexto selecionado. Variantes sem um trecho protegido são recusadas; se nenhuma restar, o pedido não cobra. Preservar trechos não verifica os demais fatos nem a intenção. Estilos extras exigem gerações extras.","alternative":"Seu modelo atual já tem os exemplos e a comparação necessários ou basta uma reescrita simples avulsa.","start":{"href":"/","label":"Reescrever rascunho"}}},"returns":"{ registro, voz, preservados, entrada, aviso, variantes[{estilo,texto,passou,achados,palavras,tirado,palavrasAMenos,diff}], falhas[{estilo,motivo,ausentes?}], uso, cota }","url":"https://staging.samehand.app/api/rewrite","auth_detail":"Token de crédito em `Authorization: Bearer cred_…` (ou `X-Credito`). Para saldo recuperado de x402, use a credencial de carteira `mmw_…` em Bearer ou `X-Wallet-Token`, emitida por `/api/auth/wallet/agent/start` e `/api/auth/wallet/agent/token`."},{"method":"GET","path":"/api/credito/x402/saude","auth":"none","exemplo":"curl -s $ORIGIN/api/credito/x402/saude","grupo":"Crédito","summary":"Saúde do verificador x402: pendências, falta de hash e falha ou parada da conciliação.","retorno":{"verificado_em":{"tipo":"string","desc":"Hora da leitura, em UTC."},"ativo":{"tipo":"boolean","desc":"Verificador configurado no processo."},"tarefas":{"tipo":"object[]","desc":"Falhas com id e motivo, sem dados do pagador. Contagem limitada indica +."}},"erros":{"503":"Verificador indisponível neste processo."},"returns":"{ verificado_em, ativo, tarefas }","url":"https://staging.samehand.app/api/credito/x402/saude","auth_detail":"Público."},{"method":"GET","path":"/api/credito/barrados/saude","auth":"none","exemplo":"curl -s $ORIGIN/api/credito/barrados/saude","grupo":"Crédito","summary":"Quem pagou e foi barrado neste site nas últimas 24 horas: a casa pediu pagamento a quem tinha saldo ou plano, ou cobrou e não entregou.","retorno":{"verificado_em":{"tipo":"string","desc":"Hora da leitura, em UTC."},"ativo":{"tipo":"boolean","desc":"A leitura funcionou."},"total":{"tipo":"int","desc":"Quantas ocorrências diferentes houve."},"tarefas":{"tipo":"object[]","desc":"Até 8 ocorrências, com classe, rota, vezes e última hora, sem dados de quem pagou."}},"returns":"{ verificado_em, ativo, total, tarefas }","url":"https://staging.samehand.app/api/credito/barrados/saude","auth_detail":"Público."},{"method":"GET","path":"/api/credito/conta","auth":"credito","exemplo":"curl -s $ORIGIN/api/credito/conta -H 'Cookie: <sessão>'","grupo":"Crédito","summary":"O saldo da conta da sessão: a soma das compras dela neste ambiente, em todo produto, sem precisar do código. Com movimentos=1, o extrato da conta.","query":{"movimentos":{"tipo":"string","desc":"`1`: consulta só o extrato paginado da conta, sem saldo."},"de":{"tipo":"string","desc":"Início inclusivo em UTC ISO 8601 com milissegundos. Padrão: 1970-01-01T00:00:00.000Z."},"ate":{"tipo":"string","desc":"Fim exclusivo em UTC ISO 8601 com milissegundos. Padrão: agora. Conserve o valor entre páginas."},"antes":{"tipo":"string","desc":"Cursor `proximo` da página anterior. Só com movimentos=1."},"limite":{"tipo":"int","desc":"1 a 50 movimentos por página; padrão 20. Só com movimentos=1."}},"retorno":{"saldo_micros":{"tipo":"int","desc":"O saldo em milionésimos de dólar."},"saldo_usd":{"tipo":"string","desc":"O saldo em dólar, formatado."},"referencia_usd":{"tipo":"string","desc":"O saldo logo depois da última recarga, somado nas carteiras com saldo: a base do que resta."},"cotacao_brl_por_usd":{"tipo":"number","desc":"A cotação do real que a tela usa para mostrar o saldo."},"movimentos":{"tipo":"object[]","desc":"Só com movimentos=1: id, em, valor_usd, saldo_usd, motivo, produto e recurso, do mais novo."},"proximo":{"tipo":"string","desc":"Só com movimentos=1: cursor da próxima página ou null."}},"erros":{"400":"Período, limite ou cursor inválido.","401":"Sem sessão."},"returns":"{ saldo_micros, saldo_usd, referencia_usd, cotacao_brl_por_usd, movimentos, proximo }","url":"https://staging.samehand.app/api/credito/conta","auth_detail":"Token de crédito em `Authorization: Bearer cred_…` (ou `X-Credito`). Para saldo recuperado de x402, use a credencial de carteira `mmw_…` em Bearer ou `X-Wallet-Token`, emitida por `/api/auth/wallet/agent/start` e `/api/auth/wallet/agent/token`."},{"method":"POST","path":"/api/credito/conta","auth":"credito","exemplo":"curl -s -XPOST $ORIGIN/api/credito/conta -H 'Authorization: Bearer cred_…' -H 'Cookie: <sessão>'","grupo":"Crédito","summary":"Liga à conta da sessão o crédito comprado sem conta, inclusive em USDC, com o plano de consultas pago por ele. Depois disso, o saldo vale nos produtos do crédito da casa com `X-Credito: conta`, somado ao das outras compras da conta.","retorno":{"ok":{"tipo":"boolean","desc":"A ligação foi conferida."},"ligadas":{"tipo":"int","desc":"Compras ligadas agora. Zero quando a compra já tem conta."},"da_conta":{"tipo":"boolean","desc":"O saldo deste código já vem no saldo da conta."}},"erros":{"401":"Sem sessão ou sem o código de crédito."},"returns":"{ ok, ligadas, da_conta }","url":"https://staging.samehand.app/api/credito/conta","auth_detail":"Token de crédito em `Authorization: Bearer cred_…` (ou `X-Credito`). Para saldo recuperado de x402, use a credencial de carteira `mmw_…` em Bearer ou `X-Wallet-Token`, emitida por `/api/auth/wallet/agent/start` e `/api/auth/wallet/agent/token`."},{"method":"GET","path":"/api/credito/indicacao","auth":"session","exemplo":"curl -s $ORIGIN/api/credito/indicacao -b sessao.cookies","grupo":"Crédito","summary":"O link de indicação da conta da sessão, as regras do prêmio e o andamento: quem indica e cada conta que entrou pelo link ganham, cada um, em crédito parte do primeiro pagamento dessa conta. A primeira leitura cria o código.","retorno":{"codigo":{"tipo":"string","desc":"O código da conta: oito letras e números."},"link":{"tipo":"string","desc":"O endereço deste produto com `?ref=<código>`."},"regras":{"tipo":"object","desc":"parte (fração do primeiro pagamento), teto ({ micros, usd } para cada um, por convidada) e prazo_dias (do pagamento ao crédito)."},"convidadas":{"tipo":"int","desc":"Contas que entraram pelo link."},"esperando":{"tipo":"int","desc":"Convidadas que ainda não pagaram."},"a_creditar":{"tipo":"object","desc":"{ n, micros, usd }: os prêmios que esperam o prazo do reembolso."},"creditado":{"tipo":"object","desc":"{ n, micros, usd }: os prêmios já creditados na carteira da conta."}},"erros":{"401":"Sem sessão; chave de API e token não valem aqui.","503":"Conta ou banco indisponível; tente de novo."},"returns":"{ codigo, link, regras, convidadas, esperando, a_creditar, creditado }","url":"https://staging.samehand.app/api/credito/indicacao","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/credito/indicacao","auth":"session","exemplo":"curl -s -X POST $ORIGIN/api/credito/indicacao -b sessao.cookies -H \"Origin: $ORIGIN\" -H \"X-CSRF-Token: $CSRF\" -H \"content-type: application/json\" -d '{\"codigo\":\"7KQ2M9XA\"}'","grupo":"Crédito","summary":"A conta da sessão, que entrou pelo link de indicação, registra o convite. Vale uma vez por conta, para conta que ainda não pagou nada; a própria conta e a do mesmo e-mail são recusadas.","body":{"codigo":{"tipo":"string","desc":"O código do link (`ref`)."}},"retorno":{"aceito":{"tipo":"boolean","desc":"O convite ficou registrado."},"motivo":{"tipo":"string","desc":"Na recusa: codigo_invalido, propria_conta, ja_indicada, ja_pagou ou mesmo_email."}},"erros":{"400":"Corpo diferente de { codigo }.","401":"Sem sessão; chave de API e token não valem aqui.","403":"Origem ou proteção CSRF inválida.","413":"Corpo acima de 4 KiB.","415":"Corpo que não é application/json.","503":"Conta ou banco indisponível; tente de novo."},"returns":"{ aceito, motivo }","url":"https://staging.samehand.app/api/credito/indicacao","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/credito","auth":"none","summary":"Recarrega crédito pré-pago: paga uma vez com x402 e recebe o token que desconta em qualquer API da casa.","grupo":"Crédito","preco_usd_faixa":[0.1,25],"query":{"usd":{"tipo":"number","desc":"Pacote: 0.1, 1, 5, 10 ou 25 dólares.","obrigatorio":true,"enum":[0.1,1,5,10,25]}},"retorno":{"token":{"tipo":"string","desc":"Token portador do saldo (`cred_…`). Mostrado UMA vez — não há como recuperá-lo."},"saldo_usd":{"tipo":"string","desc":"Saldo creditado."},"guarde":{"tipo":"string","desc":"Aviso de que o token é o portador do crédito."},"usar":{"tipo":"string","desc":"Como apresentar o token nas rotas pagas."},"usar_com_outra_credencial":{"tipo":"string","desc":"O header `X-Credito`, para quando o `Authorization` já leva outra credencial."},"saldo_em":{"tipo":"string","desc":"Onde consultar saldo e extrato."},"onde_gastar":{"tipo":"object","desc":"`precos`: as ações pagas e os preços deste produto (`/api/pricing`); `produtos`: o APIs.json com os outros produtos da casa."}},"erros":{"400":"Pacote fora da lista (0.1, 1, 5, 10 ou 25).","402":"Sem pagamento — o corpo traz `accepts[]` do x402."},"exemplo":"curl -s -XPOST '$ORIGIN/api/credito?usd=10'","returns":"{ token, saldo_usd, guarde, usar, usar_com_outra_credencial, saldo_em, onde_gastar }","url":"https://staging.samehand.app/api/credito","auth_detail":"Público."},{"method":"GET","path":"/api/credito","auth":"credito","summary":"Saldo e extrato com cred_…; com mmw_…, saldo da carteira e até 20 pagamentos em recuperação.","desc":"Sem token, responde 401 e aponta o manifesto x402 no cabeçalho Link. Com a cobrança configurada, o corpo inclui accepts[] com os mesmos termos da menor recarga por POST. O GET não cobra nem abre crédito.","grupo":"Crédito","query":{"movimentos":{"tipo":"string","desc":"`1`: consulta só o histórico paginado, sem saldo."},"de":{"tipo":"string","desc":"Início inclusivo em UTC ISO 8601 com milissegundos. Padrão: 1970-01-01T00:00:00.000Z."},"ate":{"tipo":"string","desc":"Fim exclusivo em UTC ISO 8601 com milissegundos. Padrão: agora. Conserve o valor entre páginas."},"antes":{"tipo":"string","desc":"Cursor `proximo` da página anterior. Só com movimentos=1."},"limite":{"tipo":"int","desc":"1 a 50 movimentos por página; padrão 20. Só com movimentos=1."}},"retorno":{"saldo_micros":{"tipo":"int","desc":"Saldo em micro-dólares (1e-6 USD)."},"saldo_usd":{"tipo":"string","desc":"Saldo formatado."},"criado_em":{"tipo":"string","desc":"Quando o crédito foi aberto."},"movimentos":{"tipo":"object[]","desc":"Entradas e saídas recentes, com produto e recurso."},"wallet":{"tipo":"string","desc":"Só com mmw_…: endereço autenticado da carteira."},"payments":{"tipo":"object[]","desc":"Só com mmw_…: até 20 pagamentos, com id, produto, rede, tx_hash, micros, estado e criado_ms. creditado indica saldo recuperado."},"proximo":{"tipo":"string|null","desc":"Só com movimentos=1: cursor da próxima página ou null; movimentos inclui id, em, valor_usd, saldo_usd, motivo, produto e recurso."},"onde_gastar":{"tipo":"object","desc":"`precos`: as ações pagas e os preços deste produto; `produtos`: o APIs.json com os outros produtos da casa."}},"erros":{"400":"Período, limite ou cursor inválido.","401":"Sem token ou token desconhecido."},"exemplo":"curl -s $ORIGIN/api/credito -H 'Authorization: Bearer cred_…'","returns":"{ saldo_micros, saldo_usd, criado_em, movimentos, wallet, payments, proximo, onde_gastar }","url":"https://staging.samehand.app/api/credito","auth_detail":"Token de crédito em `Authorization: Bearer cred_…` (ou `X-Credito`). Para saldo recuperado de x402, use a credencial de carteira `mmw_…` em Bearer ou `X-Wallet-Token`, emitida por `/api/auth/wallet/agent/start` e `/api/auth/wallet/agent/token`."},{"method":"GET","path":"/api/credito/pix","auth":"none","summary":"Crédito por Pix: a chave, o câmbio do dia, os pacotes em reais e o que o comprovante aceita.","grupo":"Crédito","retorno":{"chave":{"tipo":"string","desc":"A chave Pix que recebe o pagamento."},"brl_por_usd":{"tipo":"number","desc":"Câmbio dos pacotes: a PTAX de venda do último boletim do Banco Central com a margem de 9%."},"pacotes":{"tipo":"object[]","desc":"Os pacotes (3, 5, 10 ou 25 dólares), cada um com `brl_centavos` e `copia_e_cola` (o Pix copia e cola do valor, o mesmo texto do QR: o app do banco já vem com o valor)."},"comprovante":{"tipo":"object","desc":"Tipos aceitos (foto ou PDF) e o tamanho máximo, em bytes."},"liberacao":{"tipo":"string","desc":"`manual`: o dono confere o Pix e libera."}},"exemplo":"curl -s $ORIGIN/api/credito/pix","returns":"{ chave, brl_por_usd, pacotes, comprovante, liberacao }","url":"https://staging.samehand.app/api/credito/pix","auth_detail":"Público."},{"method":"POST","path":"/api/credito/pix","auth":"none","summary":"Pede crédito pago por Pix: multipart com `usd`, `comprovante` (foto ou PDF até 2 MB) e `email`; o resto é opcional.","desc":"O código de crédito sai na resposta e passa a valer quando o dono confere o Pix e libera (manual, em geral no mesmo dia). O `email` é obrigatório: é por ele que o dono fala com a pessoa. Opcionais: `nome`, `pagina` (a página de onde pediu, até 2.000 caracteres) e o que a pessoa comprava quando recebeu o 402 — `recurso` (até 2.000), `descricao` (até 300) e `preco_usd` (decimal, ex. `0.50`); e `navegador_id` (UUID que liga os pedidos do mesmo navegador). Tudo o que chega fica registrado no pedido — o comprovante inclusive —, com a conta logada (conferida pelo cookie da sessão), a rede e o navegador de quem pediu.","grupo":"Crédito","retorno":{"id":{"tipo":"string","desc":"Id do pedido, para acompanhar."},"estado":{"tipo":"string","desc":"`pendente` até a decisão."},"credito":{"tipo":"string","desc":"O token `cred_…`, mostrado UMA vez; vale depois da liberação."},"estado_em":{"tipo":"string","desc":"Onde acompanhar o pedido."}},"erros":{"400":"Pacote fora da lista (3, 5, 10 ou 25), sem comprovante ou sem e-mail válido.","413":"Comprovante acima de 2 MB.","415":"Comprovante que não é foto (JPEG, PNG, WebP) nem PDF.","429":"A rede já mandou os pedidos do dia.","502":"O e-mail ao dono não saiu: o pedido fica registrado como `falhou`; mande de novo.","503":"Fila de conferência cheia, ou Pix indisponível neste app."},"exemplo":"curl -s -XPOST $ORIGIN/api/credito/pix -F usd=5 -F email=voce@example.com -F comprovante=@pix.pdf","returns":"{ id, estado, credito, estado_em }","url":"https://staging.samehand.app/api/credito/pix","auth_detail":"Público."},{"method":"GET","path":"/api/credito/pix/:id","auth":"none","summary":"Estado de um pedido de crédito por Pix: `pendente`, `liberado`, `recusado` ou `falhou`.","grupo":"Crédito","params":{"id":{"desc":"Id do pedido (32 hex).","exemplo":"0123456789abcdef0123456789abcdef"}},"retorno":{"estado":{"tipo":"string","desc":"`pendente`, `liberado`, `recusado` ou `falhou` (o e-mail ao dono não saiu; mande de novo)."},"usd":{"tipo":"int","desc":"O pacote pedido."},"decidido_em":{"tipo":"string","desc":"Quando o dono decidiu, ou `null`."}},"erros":{"404":"Pedido desconhecido."},"exemplo":"curl -s $ORIGIN/api/credito/pix/0123456789abcdef0123456789abcdef","returns":"{ estado, usd, decidido_em }","url":"https://staging.samehand.app/api/credito/pix/:id","auth_detail":"Público."},{"method":"POST","path":"/api/credito/asaas/:id/cancelar","auth":"none","grupo":"Crédito","summary":"Cancela uma cobrança pendente ao fechar o pagamento.","desc":"Exige o bilhete `cancelamento` devolvido na criação. Uma cobrança antiga de crédito aceita seu token em `credito`. Só atua no produto e ambiente de origem. Não estorna pagamentos nem remove o histórico. 202 indica cancelamento em andamento; a vigia retoma falhas externas.","params":{"id":{"desc":"Id da cobrança (32 hex).","exemplo":"0123456789abcdef0123456789abcdef"}},"retorno":{"id":{"tipo":"string","desc":"Id da cobrança."},"estado":{"tipo":"string","desc":"`cancelando`, `vencido` ou o estado final já confirmado."}},"erros":{"404":"Cobrança ou bilhete inválido, produto ou ambiente diferente."},"exemplo":"curl -s -XPOST $ORIGIN/api/credito/asaas/0123456789abcdef0123456789abcdef/cancelar -H 'content-type: application/json' -d '{\"cancelamento\":\"<bilhete>\"}'","returns":"{ id, estado }","url":"https://staging.samehand.app/api/credito/asaas/:id/cancelar","auth_detail":"Público."},{"method":"GET","path":"/api/credito/asaas","auth":"none","summary":"Pix automático: se está disponível neste app, os pacotes em reais e o saldo que o produto vende.","grupo":"Crédito","retorno":{"disponivel":{"tipo":"boolean","desc":"`false` quando o app não tem o Asaas configurado (use o Pix com comprovante)."},"pacotes":{"tipo":"object[]","desc":"Os pacotes de crédito (3, 5, 10 ou 25 dólares), com `brl_centavos`."},"exatos":{"tipo":"object[]","desc":"Preços declarados pelo app, com `usd` e `brl_centavos`. Só aparecem a partir de R$ 5,00 e até R$ 10.000."},"saldo":{"tipo":"object","desc":"Quando o produto vende saldo em reais: a faixa e se a conta logada pode comprar."},"precisa_documento":{"tipo":"boolean","desc":"Se o CPF ou CNPJ de quem paga ainda é pedido."}},"exemplo":"curl -s $ORIGIN/api/credito/asaas","returns":"{ disponivel, pacotes, exatos, saldo, precisa_documento }","url":"https://staging.samehand.app/api/credito/asaas","auth_detail":"Público."},{"method":"POST","path":"/api/credito/asaas","auth":"none","summary":"Gera um Pix dinâmico: JSON com `oferta` (`pacote` com `usd`, ou `saldo` com `centavos`) e o pagador.","desc":"O pagamento libera sozinho o que se comprou: o pacote vira o token `cred_…` que já vem na resposta; o saldo cai na organização da conta logada. Na primeira compra vão `documento` (CPF ou CNPJ, que segue para o gateway e não fica guardado aqui) e `nome`; `email`, `pagina` e `navegador_id` são opcionais e ficam registrados. Com `forma: \"cartao_boleto\"`, a cobrança é livre: a resposta traz `pagamento_em`, a página do gateway onde se paga com cartão, boleto ou Pix (vence em três dias). Com `forma: \"cartao\"`, a resposta traz `pagamento_em`, a página hospedada do Asaas para pagar com cartão (nenhum dado de cartão passa pelos nossos servidores). O `usd` deve ser um valor de `pacotes` ou `exatos` do GET. O servidor define os centavos e recusa valores não declarados.","grupo":"Crédito","retorno":{"id":{"tipo":"string","desc":"Id da cobrança, para acompanhar."},"credito":{"tipo":"string","desc":"No pacote: o token `cred_…`, mostrado UMA vez; vale quando o pagamento cair."},"forma":{"tipo":"string","desc":"`pix` (o padrão), `cartao` ou `cartao_boleto`."},"pix":{"tipo":"object","desc":"`copia_e_cola`, `imagem` (QR em PNG, data URI) e `expira_em`; só na forma `pix`."},"pagamento_em":{"tipo":"string","desc":"Nas formas `cartao` e `cartao_boleto`: a página hospedada de pagamento do gateway."},"estado_em":{"tipo":"string","desc":"Onde acompanhar o pagamento."},"cancelamento":{"tipo":"string","desc":"Bilhete para cancelar a cobrança pendente de Pix ou boleto."}},"erros":{"400":"Crédito fora de `pacotes` e `exatos`, valor fora da faixa, CPF/CNPJ, nome ou e-mail inválido, envio direto de cartão (`cartao_hospedado`), ou o gateway recusou o pagador (`pagador_recusado`, com a razão em `detalhe`).","429":"Limite de 3 tentativas por minuto ou 10 por dia, por conta ou rede.","502":"O gateway não gerou o Pix; tente de novo.","503":"Pix automático indisponível neste app, o gateway ocupado (`asaas_ocupado`, espere `retry_after_s`), ou cobranças demais de quem não entrou esperando pagamento."},"exemplo":"curl -s -XPOST $ORIGIN/api/credito/asaas -H 'content-type: application/json' -d '{\"oferta\":\"pacote\",\"usd\":5,\"documento\":\"000.000.000-00\",\"nome\":\"Ana\"}'","returns":"{ id, credito, forma, pix, pagamento_em, estado_em, cancelamento }","url":"https://staging.samehand.app/api/credito/asaas","auth_detail":"Público."},{"method":"GET","path":"/api/credito/asaas/:id","auth":"none","summary":"Estado de uma cobrança Pix automática: `pendente`, `pago`, `vencido`, `estornado` ou `falhou`.","grupo":"Crédito","params":{"id":{"desc":"Id da cobrança (32 hex).","exemplo":"0123456789abcdef0123456789abcdef"}},"retorno":{"estado":{"tipo":"string","desc":"`pago` libera o token do pacote ou o saldo; o Pix pago depois do vencimento vale."},"pago_em":{"tipo":"string","desc":"Quando o pagamento foi confirmado, ou `null`."}},"erros":{"404":"Cobrança desconhecida."},"exemplo":"curl -s $ORIGIN/api/credito/asaas/0123456789abcdef0123456789abcdef","returns":"{ estado, pago_em }","url":"https://staging.samehand.app/api/credito/asaas/:id","auth_detail":"Público."},{"method":"POST","path":"/api/credito/asaas/:id/cartao","auth":"none","summary":"Paga com outro cartão a cobrança de cartão cujo cartão foi recusado: a mesma cobrança, sem cobrar duas vezes.","desc":"JSON com o `cartao` (os mesmos campos do `POST /api/credito/asaas`) e, sem conta, o `navegador_id` que criou a cobrança. Só a cobrança de cartão que espera pagamento, de quem a criou, e até cinco tentativas por cobrança.","grupo":"Crédito","params":{"id":{"desc":"Id da cobrança (32 hex).","exemplo":"0123456789abcdef0123456789abcdef"}},"retorno":{"estado":{"tipo":"string","desc":"`pago`, ou `pendente` com `conferir` enquanto o emissor analisa."},"estado_em":{"tipo":"string","desc":"Onde acompanhar o pagamento."}},"erros":{"400":"Dado do cartão inválido (`cartao_dados`, com o `campo`).","404":"Cobrança desconhecida, de outra pessoa ou que não é de cartão.","409":"A cobrança já venceu ou foi encerrada; comece o pagamento de novo.","422":"Cartão recusado (`cartao_recusado`).","429":"Passou das tentativas de cartão desta cobrança ou do dia."},"exemplo":"curl -s -XPOST $ORIGIN/api/credito/asaas/0123456789abcdef0123456789abcdef/cartao -H 'content-type: application/json' -d '{\"cartao\":{…}}'","returns":"{ estado, estado_em }","url":"https://staging.samehand.app/api/credito/asaas/:id/cartao","auth_detail":"Público."},{"method":"GET","path":"/api/credito/asaas/saude","auth":"none","summary":"A saúde do Pix e das assinaturas ativas deste app: falhas com motivo, para o painel.","grupo":"Crédito","retorno":{"ativo":{"tipo":"boolean","desc":"`false` quando o Asaas e as assinaturas estão desligados."},"tarefas":{"tipo":"object[]","desc":"Cada problema: `id`, `falhando` e `motivo`. Inclui Pix e, quando ativas, recuperação, fila e orçamento das assinaturas. Não consulta o provedor."}},"exemplo":"curl -s $ORIGIN/api/credito/asaas/saude","returns":"{ ativo, tarefas }","url":"https://staging.samehand.app/api/credito/asaas/saude","auth_detail":"Público."},{"method":"GET","path":"/api/vitrine","auth":"none","grupo":"Public stats","summary":"The product's public numbers: traffic, agents, usage and reliability, no money.","desc":"Projection published hourly by the house collector, rounded to two significant digits; `null` is a missing measurement, never zero. 15-minute cache with ETag (`If-None-Match` → 304). There is no way to send numbers through this route: publishing belongs to the collector, with its own token.","retorno":{"v":{"tipo":"int","desc":"Contract version (1)."},"produto":{"tipo":"string","desc":"Product id."},"publicado":{"tipo":"bool","desc":"`false` before the collector's first publication; then only these five keys come."},"atualizado_em":{"tipo":"string","desc":"When the collector published (ISO 8601).","nulo":true},"stale":{"tipo":"bool","desc":"`true` when the projection is older than 26 h."},"nome":{"tipo":"string","desc":"Product name.","opcional":true},"desde":{"tipo":"string","desc":"First day the series covers.","nulo":true,"opcional":true},"fuso":{"tipo":"string","desc":"Traffic time zone. Audience periods state their time zone in `pessoas.medicao`.","opcional":true},"hoje":{"tipo":"object","desc":"Today: pages by class (human, AI, bot), API calls by class, machine-surface reads and product usage.","opcional":true},"dias":{"tipo":"object[]","desc":"Up to 31 days, oldest first: `dia`, `paginas`, `api`, `api_ia`, `maquina`, `visitantes`, `uso`.","opcional":true},"janelas":{"tipo":"object","desc":"7- and 30-day sums (`d7`, `d30`).","opcional":true},"visitantes":{"tipo":"object","desc":"Unique browsers with recorded interaction over 7 days.","opcional":true},"pessoas":{"tipo":"object","desc":"First-party measurement of browsers confirmed by interaction: unique browsers, sessions and pages over 7 and 30 days, segments and coverage. `null` means no measurement. Browsers are not verified people.","nulo":true,"opcional":true},"agentes":{"tipo":"object","desc":"The AI agents and bots that read the most, 7 days.","opcional":true},"superficies":{"tipo":"object","desc":"Reads of OKF, llms, well-known, OpenAPI and MCP over 7 days.","opcional":true},"mcp":{"tipo":"object","desc":"MCP calls over 7 days.","opcional":true},"uso":{"tipo":"object","desc":"Real product usage per resource: label, today, 7 and 30 days.","opcional":true},"contas":{"tipo":"object","desc":"Users and guests.","nulo":true,"opcional":true},"confiabilidade":{"tipo":"object","desc":"Share of requests without 5xx over 7 days, and the live build.","opcional":true},"catalogo":{"tipo":"object","desc":"Size of the catalog, when the product has one.","nulo":true,"opcional":true},"apoio":{"tipo":"object","desc":"Measured sponsors: 1-second exposures and native clicks per page in confirmed sessions, 7-day CTR, observed days and coverage. Empty means no history, not zero CTR.","opcional":true}},"exemplo":"curl -s $ORIGIN/api/vitrine","returns":"{ v, produto, publicado, atualizado_em, stale, nome?, desde?, fuso?, hoje?, dias?, janelas?, visitantes?, pessoas?, agentes?, superficies?, mcp?, uso?, contas?, confiabilidade?, catalogo?, apoio? }","url":"https://staging.samehand.app/api/vitrine","auth_detail":"Público."},{"method":"GET","path":"/api/vitrine/operador","auth":"none","grupo":"Public stats","summary":"The product's full document on the operator panel — operator token only.","headers":{"Authorization":{"tipo":"string","desc":"`Bearer <METRICS_TOKEN>` — the operator class.","obrigatorio":true}},"retorno":{"produto":{"tipo":"string","desc":"Product id."},"atualizado_em":{"tipo":"string","desc":"When the collector published.","nulo":true},"operador":{"tipo":"object","desc":"The collector's full document, with what the public projection leaves out.","nulo":true}},"erros":{"401":"No token, wrong token or a token of another class.","503":"Worker without `METRICS_TOKEN` or without the control plane."},"exemplo":"curl -s $ORIGIN/api/vitrine/operador -H \"Authorization: Bearer $METRICS_TOKEN\"","returns":"{ produto, atualizado_em, operador }","url":"https://staging.samehand.app/api/vitrine/operador","auth_detail":"Público."},{"method":"GET","path":"/api/vitrine/painel","auth":"none","grupo":"Public stats","summary":"The whole house panel, in the shape the gm reads — operator token only.","headers":{"Authorization":{"tipo":"string","desc":"`Bearer <METRICS_TOKEN>` — the operator class.","obrigatorio":true}},"retorno":{"apps":{"tipo":"object[]","desc":"One operator document per product, ordered by id."},"updated":{"tipo":"string","desc":"When the collector closed the round.","opcional":true},"totals":{"tipo":"object","desc":"House totals.","opcional":true}},"erros":{"401":"No token, wrong token or a token of another class.","503":"Worker without `METRICS_TOKEN` or without the control plane."},"exemplo":"curl -s $ORIGIN/api/vitrine/painel -H \"Authorization: Bearer $METRICS_TOKEN\"","returns":"{ apps, updated?, totals? }","url":"https://staging.samehand.app/api/vitrine/painel","auth_detail":"Público."},{"method":"GET","path":"/api/vitrine/cursores","auth":"none","grupo":"Public stats","summary":"Per-product cursors: `borda`, `borda5xx` (5xx only), and `cli`. Operator token only.","headers":{"Authorization":{"tipo":"string","desc":"`Bearer <METRICS_TOKEN>` — the operator class.","obrigatorio":true}},"retorno":{"_texto":"JSON: `{ [product]: { borda?: ISO, borda5xx?: ISO, cli?: ISO } }`; empty is `{}`."},"erros":{"401":"No token, wrong token or a token of another class.","503":"Worker without `METRICS_TOKEN` or without the control plane."},"exemplo":"curl -s $ORIGIN/api/vitrine/cursores -H \"Authorization: Bearer $METRICS_TOKEN\"","returns":"JSON: `{ [product]: { borda?: ISO, borda5xx?: ISO, cli?: ISO } }`; empty is `{}`.","url":"https://staging.samehand.app/api/vitrine/cursores","auth_detail":"Público."},{"method":"GET","path":"/api/partners","auth":"none","grupo":"Partnership","summary":"Fixed-price advertising: placements, duration, public numbers and checkout. Partnerships and custom campaigns use negotiation.","desc":"Four packages priced in USD per week, one-off or weekly subscription. Includes placements, sponsors and measured audience. Submission with payment, adjustments and results at /conta/publicidade, also in the profile menu. Review notices link from the verified account email. GET modalidade=pedido requires a human session: list your proposals (after=next) or read id; relatorio_depois pages daily results. GET modalidade=pendencias requires the same session and returns acao_pendente for a submitted campaign whose payment did not finish or a paid campaign with changes requested. GET modalidade=arte&id serves the private binary image, public only during a paid published campaign. Private responses never use public caching. The weekly catalogue is cached for 1 minute. Negotiation and partnerships use the contact form.","retorno":{"status":{"tipo":"string","desc":"`preco_fechado`: priced spaces can be purchased; other offers require negotiation."},"produto":{"tipo":"string","desc":"Product name."},"idioma":{"tipo":"string","desc":"Language of the texts (the product's)."},"titulo":{"tipo":"string","desc":"Title of the offer."},"descricao":{"tipo":"string","desc":"One sentence about the offer."},"publico":{"tipo":"string","desc":"Who uses the product — the audience a sponsor reaches."},"modalidades":{"tipo":"object[]","desc":"`{ id, nome }`: patrocinio, parceria, anuncio."},"placements":{"tipo":"object[]","desc":"Package channels: id, nome, onde, formato, medicao and disponivel. Legacy monthly price is null in the weekly catalogue."},"packages":{"tipo":"object[]","desc":"Four packages: id, nome, assinatura, preco_usd_semana, espacos, canais and allowed periods in exposicao[{dias,preco}]."},"house_bundle":{"tipo":"object","desc":"Unavailable in the weekly catalogue: `{disponivel:false}`."},"parcerias":{"tipo":"string[]","desc":"Partnership ideas the product is open to discuss."},"current_sponsors":{"tipo":"object[]","desc":"Sponsors in effect: `id`, `nome`, `url`, `frase`, `espacos`, `ate`."},"stats":{"tipo":"object","desc":"Excerpt of the public numbers (`hoje`, `janelas`, `agentes`, `confiabilidade`) and the `link` to `/api/vitrine`; `publicado: false` before the first publication."},"payment":{"tipo":"object","desc":"Shared payment through the purchase POST. Wallet fields remain for compatibility; do not send a manual payment before the quote."},"contact":{"tipo":"object","desc":"`email`, `form_url`, `api_url` (`POST /api/contact`, free: one message every 10 s per network), `campos` (required), `campos_proposta` (the optional proposal fields, each with its accepted values), `message_template`, `instructions`."},"politica":{"tipo":"object","desc":"Placement label, refused sectors, prepayment with review after it (`aprovacao_antes_pagamento: false`), credit back on refusal (`recusa_devolve_credito`), deadlines."},"_links":{"tipo":"object","desc":"`self`, `stats`, `page` (`null` until the page exists), `contact`, `casa` (the same path on the ten products)."}},"exemplo":"curl -s $ORIGIN/api/partners","returns":"{ status, produto, idioma, titulo, descricao, publico, modalidades, placements, packages, house_bundle, parcerias, current_sponsors, stats, payment, contact, politica, _links }","url":"https://staging.samehand.app/api/partners","auth_detail":"Público."},{"method":"POST","path":"/api/partners","auth":"session","grupo":"Partnership","summary":"Submit and pay for an ad package; the team reviews the paid campaign before it goes live.","desc":"Human account session and same-origin CSRF required. Submit complete creative and terms with modalidade=proposta: one private binary is stored for the account, without charge or inventory reservation. Then pay that exact version. One-off: omit modalidade and send only {id,aprovacao:versao}; shared 402 quote and payment, no renewal. modalidade=assinatura adds the native assinatura body with explicit weekly renewal acceptance. Current BRL offers: /api/credito/assinaturas/ofertas. The team then reviews the paid campaign in /adm and publishes it, asks for changes or declines it. When changes are requested, POST modalidade=ajuste with {id,versao,nome,frase,url,direitos:true} and an optional new arte; there is no new charge. A declined campaign gets the amount paid back as credit in the account wallet, once, and its weekly renewal is cancelled; money back stays available through the refund policy. Notices go to the verified account email with a link to /conta/publicidade?pedido=ID. Read your campaign with GET modalidade=pedido&id=ID on any device. Cancel future charges in the account. modalidade=recibo reads your paid campaign receipt. The period begins on publication. Identical retries do not charge twice. Custom campaigns and free partnerships use POST /api/contact.","query":[{"nome":"modalidade","tipo":"string","desc":"proposta submits; omit to pay the submitted version one-off; assinatura uses native weekly card billing; ajuste resubmits a paid campaign after changes were requested; recibo reads the account's campaign receipt."}],"corpo":{"id":{"tipo":"string","obrigatorio":true,"desc":"Fresh random order id: 32 lowercase hexadecimal characters. Reuse for retries."},"token":{"tipo":"string","obrigatorio":false,"desc":"Required only to submit a proposal: 64 random lowercase hexadecimal characters, reused for an identical retry. Account login remains mandatory for private access."},"espaco":{"tipo":"string[]","desc":"Legacy paid-order retry only. New purchases select a package.","obrigatorio":false},"pacote":{"tipo":"string","obrigatorio":false,"desc":"One of the four package ids in GET /api/partners packages."},"duracao":{"tipo":"int","obrigatorio":false,"desc":"Days from the package exposure list. Weekly subscriptions require 7."},"modalidade":{"tipo":"string","valores":["avulso","assinatura"],"desc":"Required in the proposal body: avulso or assinatura. The approved mode is bound to the creative hash.","obrigatorio":false},"aprovacao":{"tipo":"string","desc":"One-off payment: send only id and the 64-character versao returned by the proposal. The payment covers that exact version; no image is uploaded again.","obrigatorio":false},"versao":{"tipo":"string","desc":"modalidade=ajuste: the exact current versao of your paid campaign with changes requested.","obrigatorio":false},"assinatura":{"tipo":"object","desc":"Only with modalidade=assinatura: the native subscription body with recurso=publicidade:ORDER_ID, simulado, cartao and explicit renewal aceite. The authenticated account must own the campaign.","obrigatorio":false},"pedido":{"tipo":"string","desc":"Only with modalidade=recibo: the campaign id owned by the signed-in account.","obrigatorio":false},"nome":{"tipo":"string","obrigatorio":false,"desc":"Brand or product, up to 80 characters."},"email":{"tipo":"string","obrigatorio":false,"desc":"Contact email."},"url":{"tipo":"string","obrigatorio":false,"desc":"HTTPS destination URL."},"frase":{"tipo":"string","obrigatorio":false,"desc":"Ad copy, up to 100 characters."},"arte":{"tipo":"string","obrigatorio":false,"desc":"Base64 image bytes, without a data URL prefix. PNG, JPEG or WebP, up to 2 MB. Optional in modalidade=ajuste: omit it to keep the current image."},"direitos":{"tipo":"bool","obrigatorio":false,"desc":"true confirms the right to use the image and content."}},"retorno":{"id":{"tipo":"string","desc":"Order id."},"estado":{"tipo":"string","desc":"proposta: submitted, payment not finished; pagamento or assinatura: payment in progress; revisao: paid, in team review; ajuste: paid, changes requested; publicado: live in its paid period; recusado: declined, amount returned as account credit; estornado: payment refunded."},"recibo":{"tipo":"string","desc":"Verified payment receipt."},"versao":{"tipo":"string","desc":"Current campaign fingerprint. An adjustment creates a new one."},"devolvido_usd":{"tipo":"number","desc":"Amount returned as account credit after a decline; null otherwise."},"arte":{"tipo":"string","desc":"Private binary URL; access requires the owning account or factor-protected owner until publication."}},"erros":{"400":"Invalid order or artwork.","401":"A human account session is required.","402":"Payment required.","403":"Invalid origin or CSRF.","409":"Stored proposal required, space occupied, order changed or the action does not fit the campaign state.","503":"Checkout unavailable."},"exemplo":"Use $ORIGIN/conta/publicidade and the shared account SDK; API keys cannot approve or purchase a campaign.","returns":"{ id, estado, recibo, versao, devolvido_usd, arte }","url":"https://staging.samehand.app/api/partners","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/contact","auth":"none","summary":"Write to the people behind the product — free, for people and agents alike.","grupo":"Contact","desc":"One route for a question and for a sponsorship, partnership or ad proposal (`tipo`, with the placements of `GET /api/partners`). No captcha, no account, no payment. One message every 10 seconds per network: one that arrives sooner waits its turn and then goes out — no error. The message reaches the team by e-mail, with `email` as the reply address. For voice, send multipart/form-data: `dados` is this JSON (up to 32 KiB), and `audio` is one WebM, Ogg or M4A audio file (up to 2 MB). Audio can replace message. The browser records up to two minutes. Audio is attached to the owner's e-mail.","corpo":{"name":{"tipo":"string","desc":"What to call the person writing.","obrigatorio":true},"email":{"tipo":"string","desc":"Where to reply.","obrigatorio":true},"message":{"tipo":"string","desc":"What you want to say.","obrigatorio":true},"whatsapp":{"tipo":"string","desc":"Optional reply number with country code, such as +5561999999999."},"prefer_whatsapp":{"tipo":"bool","desc":"Request a WhatsApp reply. Requires whatsapp."},"tipo":{"tipo":"string","desc":"Proposal: `patrocinio`, `parceria`, `anuncio` or `consultoria`. Turns on the fields below."},"empresa":{"tipo":"string","desc":"Who is proposing, when it is a company."},"site":{"tipo":"string","desc":"Website of who is proposing."},"orcamento":{"tipo":"string","desc":"Advertising: `ate_100`, `100_500`, `500_2000`, `2000_mais` or `a_combinar`. Consulting, in US dollars: `ate_2000`, `2000_5000`, `5000_10000`, `10000_mais` or `nao_sei`."},"espaco":{"tipo":"string[]","desc":"Placement ids from `GET /api/partners`, up to 6."},"duracao":{"tipo":"string","desc":"Exposure in days: `30`, `90` or `365`."},"pagamento":{"tipo":"string","desc":"`usdc`, `deposito` or `a_combinar`."},"projeto":{"tipo":"string","desc":"Consulting: the kind of project (`llm_privado`, `voz`, `dados_sensiveis`, `gpu`, `integracao` or `outro`)."},"prazo":{"tipo":"string","desc":"Consulting: when to start (`agora`, `1_mes`, `1_3_meses` or `explorando`)."},"formato":{"tipo":"string","desc":"Consulting: `projeto` (per scope), `mensal` (monthly) or `assessoria` (advisory)."},"pais":{"tipo":"string","desc":"Consulting: the country of the person asking."},"fuso":{"tipo":"string","desc":"Consulting: the IANA time zone, such as `America/New_York`."},"horarios":{"tipo":"string[]","desc":"Consulting: up to 3 times for the call, `YYYY-MM-DDTHH:MM` in that time zone."}},"body":{"name":"Agent","email":"agent@example.com","message":"hello from an agent"},"retorno":{"ok":{"tipo":"bool","desc":"Always `true` when the message was accepted."}},"erros":{"400":"Validation: `code` names the field.","503":"Contact is not configured on this server."},"exemplo":"curl -s -XPOST $ORIGIN/api/contact -H 'content-type: application/json' -d '{\"name\":\"Agent\",\"email\":\"agent@example.com\",\"message\":\"hello from an agent\"}'","returns":"{ ok }","url":"https://staging.samehand.app/api/contact","auth_detail":"Público."},{"method":"POST","path":"/api/visit","auth":"none","summary":"One ping per page view from the interface; it feeds the visit counter.","grupo":"Operations","desc":"Counted under the product visit metric in daily_stats. Smoke and non-same-origin calls are skipped.","corpo":{"p":{"tipo":"string","desc":"Opened page path (informative)."},"smoke":{"tipo":"bool","desc":"`true` flags a test call, acknowledged without counting."}},"body":{"p":"/","smoke":false},"retorno":{"ok":{"tipo":"bool","desc":"Always `true`."},"counted":{"tipo":"bool","desc":"`true` when the counter incremented; `false` when skipped."},"reason":{"tipo":"string","desc":"`smoke` or `robo` when not counted.","opcional":true}},"exemplo":"curl -s -XPOST $ORIGIN/api/visit -H 'content-type: application/json' -d '{\"p\":\"/\",\"smoke\":false}'","returns":"{ ok, counted, reason? }","url":"https://staging.samehand.app/api/visit","auth_detail":"Público."},{"method":"GET","path":"/api/metrics","auth":"token","summary":"Uso e receita do produto, para o painel da casa. Financeiro exige token.","grupo":"Operação","retorno":{"_texto":"`{app, produto, uso, payments?}`."},"erros":{"401":"Token errado.","503":"`METRICS_TOKEN` não configurado no Worker — o financeiro não sai sem ele."},"exemplo":"curl -s $ORIGIN/api/metrics -H \"authorization: Bearer $METRICS_TOKEN\"","returns":"`{app, produto, uso, payments?}`.","url":"https://staging.samehand.app/api/metrics","auth_detail":"Token de operador `METRICS_TOKEN` em `Authorization: Bearer` (métricas)."},{"method":"GET","path":"/api/profile","auth":"session","grupo":"Writing profile","summary":"Read your private writing examples and preferences.","retorno":"WritingProfileState","erros":{"400":"Invalid examples, preferences, version, or missing authorship confirmation.","401":"A personal account session, API key, or OAuth token is required.","403":"Cookie writes require the same origin and the account CSRF header.","409":"The profile changed. Read it again before saving, deleting, or rewriting.","413":"The JSON body exceeds 32 KiB.","503":"The writing profile is unavailable."},"exemplo":"curl -s $ORIGIN/api/profile -H 'Authorization: Bearer YOUR_PERSONAL_API_KEY'","returns":"{ perfil{exemplos,instrucoes,corrigirGramatica}, versao }","url":"https://staging.samehand.app/api/profile","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"PUT","path":"/api/profile","auth":"session","grupo":"Writing profile","summary":"Save your own writing examples and preferences.","corpo":{"perfil":{"tipo":"WritingProfile","req":true,"desc":"Your examples and preferences."},"versao":{"tipo":"string","nulo":true,"req":true,"desc":"Revision from GET /api/profile. Null for a new profile."},"textosProprios":{"tipo":"bool","req":true,"desc":"Must be true. You wrote the supplied examples."}},"retorno":"WritingProfileState","erros":{"400":"Invalid examples, preferences, version, or missing authorship confirmation.","401":"A personal account session, API key, or OAuth token is required.","403":"Cookie writes require the same origin and the account CSRF header.","409":"The profile changed. Read it again before saving, deleting, or rewriting.","413":"The JSON body exceeds 32 KiB.","503":"The writing profile is unavailable."},"exemplo":"curl -s $ORIGIN/api/profile -H 'Authorization: Bearer YOUR_PERSONAL_API_KEY' -X PUT -H 'Content-Type: application/json' -d '{\"perfil\":{\"exemplos\":[\"here is how I usually write\"],\"instrucoes\":\"\",\"corrigirGramatica\":false},\"versao\":null,\"textosProprios\":true}'","returns":"{ perfil{exemplos,instrucoes,corrigirGramatica}, versao }","url":"https://staging.samehand.app/api/profile","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"DELETE","path":"/api/profile","auth":"session","grupo":"Writing profile","summary":"Delete your private writing profile. Drafts, history, account and credit remain.","corpo":{"versao":{"tipo":"string","nulo":true,"req":true,"desc":"Revision from GET /api/profile. Null for a new profile."}},"retorno":"WritingProfileState","erros":{"400":"Invalid examples, preferences, version, or missing authorship confirmation.","401":"A personal account session, API key, or OAuth token is required.","403":"Cookie writes require the same origin and the account CSRF header.","409":"The profile changed. Read it again before saving, deleting, or rewriting.","413":"The JSON body exceeds 32 KiB.","503":"The writing profile is unavailable."},"exemplo":"curl -s $ORIGIN/api/profile -H 'Authorization: Bearer YOUR_PERSONAL_API_KEY' -X DELETE -H 'Content-Type: application/json' -d '{\"versao\":\"REVISION_FROM_GET\"}'","returns":"{ perfil{exemplos,instrucoes,corrigirGramatica}, versao }","url":"https://staging.samehand.app/api/profile","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"POST","path":"/api/profile/preview","auth":"session","grupo":"Writing profile","summary":"Suggest editable preferences from your examples. No model call and no save.","corpo":{"exemplos":{"tipo":"string[]","req":true,"desc":"1–12 own texts, up to 1500 characters each and 6000 total."},"instrucoes":{"tipo":"string","req":true,"desc":"Editable style preferences, up to 2000 characters."},"corrigirGramatica":{"tipo":"bool","req":true,"desc":"Correct spelling and grammar only when true."},"idioma":{"tipo":"string","desc":"Language of suggestions: en (default) or pt."}},"retorno":"WritingProfile","erros":{"400":"Invalid examples, preferences, version, or missing authorship confirmation.","401":"A personal account session, API key, or OAuth token is required.","403":"Cookie writes require the same origin and the account CSRF header.","409":"The profile changed. Read it again before saving, deleting, or rewriting.","413":"The JSON body exceeds 32 KiB.","503":"The writing profile is unavailable."},"exemplo":"curl -s $ORIGIN/api/profile/preview -H 'Authorization: Bearer YOUR_PERSONAL_API_KEY' -X POST -H 'Content-Type: application/json' -d '{\"exemplos\":[\"here is how I usually write\"],\"instrucoes\":\"\",\"corrigirGramatica\":false}'","returns":"{ exemplos, instrucoes, corrigirGramatica }","url":"https://staging.samehand.app/api/profile/preview","auth_detail":"Global session in the product's HttpOnly cookie; writes require exact Origin and X-CSRF-Token."},{"method":"GET","path":"/api/pricing","auth":"none","grupo":"Descoberta","summary":"Preços vigentes e franquias gratuitas.","retorno":{"product":{"tipo":"string","desc":"Product name."},"quota":{"tipo":"PaymentQuota","desc":"Public allowances and current list prices; not personal usage."},"pricing":{"tipo":"string","desc":"Absolute URL of the current price list."},"billing":{"tipo":"string","desc":"Absolute URL of payment discovery or the existing billing summary."},"api_index":{"tipo":"string","desc":"Absolute URL of the API catalog."}},"erros":{"405":"Use GET ou HEAD."},"exemplo":"curl -s $ORIGIN/api/pricing","returns":"{ product, quota{free,paid,how_to_pay,live,free_now?,charged_now?,trial?}, pricing, billing, api_index }","url":"https://staging.samehand.app/api/pricing","auth_detail":"Público."},{"method":"GET","path":"/api/billing","auth":"none","grupo":"Descoberta","summary":"Descoberta pública de pagamento e crédito pré-pago.","retorno":{"product":{"tipo":"string","desc":"Product name."},"quota":{"tipo":"PaymentQuota","desc":"Public allowances and current list prices; not personal usage."},"pricing":{"tipo":"string","desc":"Absolute URL of the current price list."},"billing":{"tipo":"string","desc":"Absolute URL of payment discovery or the existing billing summary."},"api_index":{"tipo":"string","desc":"Absolute URL of the API catalog."},"payment":{"tipo":"PaymentX402","desc":"Public x402 configuration; pay_to=null means not configured."},"credit":{"tipo":"PaymentCredit","desc":"Prepaid credit entry point. Never contains a balance or token."}},"erros":{"405":"Use GET ou HEAD."},"exemplo":"curl -s $ORIGIN/api/billing","returns":"{ product, quota{free,paid,how_to_pay,live,free_now?,charged_now?,trial?}, pricing, billing, api_index, payment{provider,mode,network,chain_id,pay_to,homolog,dev,dev_gate,alternavel,gratis?,cobrados?,facilitator,asset,asset_address,faucet,wallets}, credit{url,header} }","url":"https://staging.samehand.app/api/billing","auth_detail":"Público."}],"quota":{"free":[{"o_que":"índice, saúde, estilo medido, llms.txt, OpenAPI e MCP","limite":"sem cota","janela":null},{"o_que":"reescrita","limite":"5 por dia, por conta autenticada","janela":null}],"paid":[{"o_que":"reescrita, além da franquia do dia","price_usd":0.02}],"how_to_pay":"Rota paga → **402** com `accepts[]` (x402) e `credito` (pré-pago, `POST /api/credito?usd=10`, vale em todos os produtos). Pague e repita com `PAYMENT-SIGNATURE` (v2) ou `X-PAYMENT` (v1), ou mande `Authorization: Bearer cred_…`.","live":"https://staging.samehand.app/api/"},"mcp":{"endpoint":"https://staging.samehand.app/mcp","transport":"streamable-http","tools":8},"mcp_tools":["api_index","voice_card","rewrite_in_voice","read_writing_profile","save_writing_profile","delete_writing_profile","preview_writing_profile","pricing"],"quickstart":["curl -s https://staging.samehand.app/api/health","curl -s https://staging.samehand.app/api/estilo","curl -s -XPOST https://staging.samehand.app/api/rewrite -H 'content-type: application/json' -d '{\"texto\":\"This is not just a flaw, it is a breach of trust.\",\"registro\":\"post\"}'"]}