{"openapi":"3.1.0","info":{"title":"CITAME API","version":"1.0.0","description":"API pública de CITAME para gestionar prompts, conjuntos de prompts, intervalos de confianza (Measurement Confidence) y ganadores/perdedores de citación (Citation Movers) desde herramientas externas y agentes.\n\nAutenticación con una clave de cuenta (`Authorization: Bearer ctm_...`), que se crea en Ajustes → API Keys MCP o mediante `/auth.md`. Cada clave lleva sus permisos: `citame:read` para lectura y `citame:write` para escritura.\n\nTodas las respuestas incluyen `request_id`, que también viaja en la cabecera `X-Request-Id`. Cítalo si necesitas soporte sobre una petición concreta."},"x-service-info":{"categories":["ai","seo","geo","analytics","brand-visibility"],"docs":{"homepage":"https://app.citame.io","apiReference":"https://app.citame.io/api/v1/docs","llms":"https://app.citame.io/llms.txt"}},"servers":[{"url":"https://app.citame.io/api/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Clave de API con el prefijo ctm_"}},"schemas":{"Pagination":{"type":"object","properties":{"next_cursor":{"type":["string","null"],"description":"Cursor opaco para pedir la página siguiente. null si no hay más."},"has_more":{"type":"boolean"}},"required":["next_cursor","has_more"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","limit_exceeded","rate_limited","internal"]},"message":{"type":"string"},"details":{"type":"array","items":{}}},"required":["code","message"]},"request_id":{"type":"string"}},"required":["error","request_id"]}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/prompts":{"get":{"summary":"Listar prompts","description":"Devuelve los prompts de un espacio de trabajo, paginados por cursor. Siempre se aplica un límite aunque no se indique.","parameters":[{"name":"workspace","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","paused"]}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Listar prompts monitorizados del espacio de trabajo","offers":[{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Listar prompts monitorizados del espacio de trabajo"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Listar prompts monitorizados del espacio de trabajo (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Lista de prompts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crear prompt","description":"Crea un prompt activo. Respeta el límite de prompts del plan y rechaza duplicados, incluso con redacción distinta si el significado es el mismo.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","minLength":1},"title":{"type":"string","minLength":3},"body":{"type":"string","minLength":10},"priority":{"type":"integer","minimum":1,"maximum":5},"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"tags":{"type":"array","items":{"type":"string"}}},"required":["workspace","title","body"],"additionalProperties":false}}}},"x-payment-info":{"intent":"charge","method":"stripe","amount":"50","currency":"eur","description":"Crear nuevo prompt monitorizado en Citame.ai","offers":[{"intent":"charge","method":"stripe","amount":"50","currency":"eur","description":"Crear nuevo prompt monitorizado en Citame.ai"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Crear nuevo prompt monitorizado en Citame.ai (USDC via MPP / x402)"}]},"responses":{"201":{"description":"Prompt creado","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/prompts/{id}":{"get":{"summary":"Obtener un prompt","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Obtener detalle de un prompt","offers":[{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Obtener detalle de un prompt"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Obtener detalle de un prompt (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Prompt","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"patch":{"summary":"Actualizar un prompt","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":3},"body":{"type":"string","minLength":10},"status":{"type":"string","enum":["active","paused"]},"priority":{"type":"integer","minimum":1,"maximum":5}},"additionalProperties":false}}}},"x-payment-info":{"intent":"charge","method":"stripe","amount":"25","currency":"eur","description":"Actualizar un prompt","offers":[{"intent":"charge","method":"stripe","amount":"25","currency":"eur","description":"Actualizar un prompt"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Actualizar un prompt (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Prompt actualizado","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/prompts/{id}/archive":{"post":{"summary":"Archivar un prompt","description":"Pausa el prompt y añade la etiqueta de archivo. Conserva su historial.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Archivar un prompt","offers":[{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Archivar un prompt"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Archivar un prompt (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Prompt archivado","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/prompts/{id}/restore":{"post":{"summary":"Restaurar un prompt archivado","description":"Quita la etiqueta de archivo y deja el prompt pausado.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Restaurar un prompt","offers":[{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Restaurar un prompt"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Restaurar un prompt (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Prompt restaurado","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/prompts/{id}/groups":{"put":{"summary":"Fijar los conjuntos de un prompt","description":"Reemplaza por completo los conjuntos del prompt. Una lista vacía lo saca de todos. Los conjuntos deben ser del mismo espacio de trabajo que el prompt.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"group_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["group_ids"],"additionalProperties":false}}}},"x-payment-info":{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Actualizar conjuntos de un prompt","offers":[{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Actualizar conjuntos de un prompt"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Actualizar conjuntos de un prompt (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Pertenencias actualizadas","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/prompt-groups":{"get":{"summary":"Listar conjuntos de prompts","parameters":[{"name":"workspace","in":"query","required":true,"schema":{"type":"string","minLength":1}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Listar conjuntos de prompts del espacio de trabajo","offers":[{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Listar conjuntos de prompts del espacio de trabajo"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Listar conjuntos de prompts del espacio de trabajo (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Lista de conjuntos","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Crear conjunto","description":"El nombre debe ser único dentro del espacio de trabajo.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"color":{"type":"string"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["workspace","name"],"additionalProperties":false}}}},"x-payment-info":{"intent":"charge","method":"stripe","amount":"25","currency":"eur","description":"Crear conjunto de prompts","offers":[{"intent":"charge","method":"stripe","amount":"25","currency":"eur","description":"Crear conjunto de prompts"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Crear conjunto de prompts (USDC via MPP / x402)"}]},"responses":{"201":{"description":"Conjunto creado","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/prompt-groups/{id}":{"patch":{"summary":"Actualizar conjunto","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"color":{"type":"string"},"sort_order":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":false}}}},"x-payment-info":{"intent":"charge","method":"stripe","amount":"25","currency":"eur","description":"Actualizar conjunto de prompts","offers":[{"intent":"charge","method":"stripe","amount":"25","currency":"eur","description":"Actualizar conjunto de prompts"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Actualizar conjunto de prompts (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Conjunto actualizado","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Eliminar conjunto","description":"Elimina el conjunto. Los prompts no se borran: solo dejan de pertenecer a él.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Eliminar conjunto de prompts","offers":[{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Eliminar conjunto de prompts"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Eliminar conjunto de prompts (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Conjunto eliminado","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/prompt-groups/{id}/prompts":{"post":{"summary":"Añadir prompts a un conjunto","description":"Idempotente: repetir la llamada con los mismos ids no duplica pertenencias. Los prompts deben ser del mismo espacio de trabajo que el conjunto.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["prompt_ids"],"additionalProperties":false}}}},"x-payment-info":{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Añadir prompts a un conjunto","offers":[{"intent":"charge","method":"stripe","amount":"10","currency":"eur","description":"Añadir prompts a un conjunto"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Añadir prompts a un conjunto (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Prompts añadidos","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/measurement-confidence":{"get":{"summary":"Obtener snapshot de Measurement Confidence y calidad muestral","description":"Devuelve intervalos de confianza al 95%, sample_quality, runs efectivos, versión metodológica y elegibilidad de comparación de la unidad (espacio + prompt? + engine?).","parameters":[{"name":"workspace","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"prompt_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"engine","in":"query","required":false,"schema":{"type":"string","enum":["chatgpt","claude","gemini","perplexity","deepseek","google_ai_overview","google_ai_mode"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Obtener Measurement Confidence e intervalos de confianza al 95%","offers":[{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Obtener Measurement Confidence e intervalos de confianza al 95%"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Obtener Measurement Confidence e intervalos de confianza al 95% (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Snapshot de Measurement Confidence","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/citation-core":{"get":{"summary":"Obtener Durable Citation Core (dominios estables vs border)","description":"Devuelve los dominios estables (core) y en frontera (border) del snapshot de medición más reciente de la unidad.","parameters":[{"name":"workspace","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"prompt_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"engine","in":"query","required":false,"schema":{"type":"string","enum":["chatgpt","claude","gemini","perplexity","deepseek","google_ai_overview","google_ai_mode"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Obtener Durable Citation Core (dominios core y border)","offers":[{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Obtener Durable Citation Core (dominios core y border)"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Obtener Durable Citation Core (dominios core y border) (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Durable Citation Core","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/citation-churn":{"get":{"summary":"Obtener Citation Churn y Core Retention entre ventanas","description":"Devuelve la tasa de rotación (churn/border) y retención del core del snapshot más reciente respecto al anterior comparable.","parameters":[{"name":"workspace","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"prompt_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"engine","in":"query","required":false,"schema":{"type":"string","enum":["chatgpt","claude","gemini","perplexity","deepseek","google_ai_overview","google_ai_mode"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Obtener Citation Churn y Core Retention","offers":[{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Obtener Citation Churn y Core Retention"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Obtener Citation Churn y Core Retention (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Citation Churn y Core Retention","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/measurement-snapshots":{"get":{"summary":"Listar histórico de snapshots de medición","description":"Devuelve el histórico de snapshots de medición (más recientes primero) con sample_quality, effective_run_count y elegibilidad.","parameters":[{"name":"workspace","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"prompt_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"engine","in":"query","required":false,"schema":{"type":"string","enum":["chatgpt","claude","gemini","perplexity","deepseek","google_ai_overview","google_ai_mode"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Listar histórico de snapshots de medición","offers":[{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Listar histórico de snapshots de medición"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Listar histórico de snapshots de medición (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Histórico de snapshots de medición","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/measurement-snapshots/compare":{"get":{"summary":"Comparar las dos ventanas comparables más recientes de medición","description":"Compara las dos ventanas comparables más recientes de la misma unidad; si no son comparables, devuelve el motivo y no deltas.","parameters":[{"name":"workspace","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"prompt_id","in":"query","required":false,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"engine","in":"query","required":false,"schema":{"type":"string","enum":["chatgpt","claude","gemini","perplexity","deepseek","google_ai_overview","google_ai_mode"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Comparar ventanas de snapshots de medición","offers":[{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Comparar ventanas de snapshots de medición"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Comparar ventanas de snapshots de medición (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Comparación de ventanas de medición","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}},"/citation-movers":{"get":{"summary":"Informe de Citation Movers (ganadores, perdedores y sustituciones)","description":"Compara dos periodos y devuelve dominios y sustituciones. Incluye totalCurrentRuns, totalPreviousRuns, comparable y comparison_ineligible_reason; si el periodo anterior tiene menos de 10 análisis medibles o menos del 50 % del volumen actual, comparison_ineligible_reason es previous_period_low_data y no deben interpretarse las fuentes nuevas o perdidas como movimiento.","parameters":[{"name":"workspace","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["7d","30d","60d","90d"]}},{"name":"engine","in":"query","required":false,"schema":{"type":"string","enum":["chatgpt","claude","gemini","perplexity","deepseek","google_ai_overview","google_ai_mode"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":200}}],"x-payment-info":{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Obtener informe de Citation Movers y sustituciones de dominio","offers":[{"intent":"charge","method":"stripe","amount":"100","currency":"eur","description":"Obtener informe de Citation Movers y sustituciones de dominio"},{"intent":"charge","method":"tempo","amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Obtener informe de Citation Movers y sustituciones de dominio (USDC via MPP / x402)"}]},"responses":{"200":{"description":"Informe de Citation Movers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"request_id":{"type":"string"}},"required":["data","request_id"]}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"description":"Payment Required — requiere suscripción activa (Pro/Agency) o credencial de pago MPP / x402"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}}}}