Docs
Explorar la documentación

Analytics REST API

The Privatus Analytics REST API: add .json to any app URL and send a token. Conventions and a reference of every operation, generated from the code.

Ver como Markdown

Every page and action in Privatus Analytics is also an API endpoint. There's no separate /api/v1: add .json to a URL and send an API token.

sh
curl https://privatusanalytics.com/sites/pa_7Q2K9XH3AB/stats/aggregate.json?period=7d \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
json
{
  "data": {
    "period": { "from": "2026-09-23T00:00:00Z", "to": "2026-09-30T00:00:00Z" },
    "metrics": {
      "visitors": 1840, "visits": 2310, "pageviews": 5122,
      "views_per_visit": 2.22, "bounce_rate": 41.3,
      "visit_duration": 48000, "revenue": 129900
    }
  }
}

The reference below lists every operation with its method, path, permission, input schema and response schema. It's generated from the running code, as is the OpenAPI 3.1 document, so neither can drift from what the server does. The same operations are MCP tools.

Conventions#

Base URL https://privatusanalytics.com
Format JSON. Add .json to the path (or send Accept: application/json)
Auth Authorization: Bearer pat_… (Authentication)
Ids Public ids with a prefix: ws_… workspaces, pa_… sites, seg_… segments, wh_… webhooks
Reads GET with query parameters
Writes POST, PATCH, DELETE with a JSON body of flat fields
Success { "data": … }, plus "meta" for lists
Errors { "error": { "code", "message", "details" } } (Errors)
Lists page and per_page (max 100) (Pagination)
Times ISO 8601 in UTC. Date parameters (from, to) are days in the site's timezone
Money Minor units (cents) in the site currency, e.g. revenue: 129900 = 1,299.00
Durations Milliseconds

Common tasks#

Task Operation
List workspaces GET /workspaces.json
List sites GET /workspaces/{workspace_id}/sites.json
Headline metrics GET /sites/{site_id}/stats/aggregate.json
Chart data GET /sites/{site_id}/stats/timeseries.json
Top pages, sources, countries… GET /sites/{site_id}/breakdown/{dimension}.json
Everything on the Overview GET /sites/{site_id}/overview.json
Live visitors GET /sites/{site_id}/live.json
Add a note (e.g. a deploy) POST /sites/{site_id}/notes.json

See Stats endpoints and Examples.

In this section#

Authentication · Errors · Pagination · Rate limits · Filters · Stats endpoints · Examples · Webhooks · Changelog and deprecation

Sending data in is a different API: see Server-side ingest.

Todas las operaciones

Autenticación

Envía Authorization: Bearer pat_…. Crea tokens en Ajustes del espacio de trabajo, Tokens de API. Guía de autenticación.

JSON en todas partes

Añade .json a cualquier ruta. Las respuestas son { "data": … } y los errores son { "error": { "code", "message" } }. Errores.

MCP

Envía JSON-RPC por POST a https://privatusanalytics.com/mcp con el mismo token. Cada operación de abajo es una herramienta. Guía de MCP.

Descargar openapi.json · 285 operaciones

Alertas

POST /alerts/:id/acknowledge.json Reconocer el último incidente alerts_acknowledge

Permiso: analytics.read

Ejemplo
curl -X POST https://privatusanalytics.com/alerts/:id/acknowledge.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la alerta, p. ej. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Id del sitio (null para alertas de uso)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt o lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "sensibilidad de anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de canales de notificación"
    },
    "state": {
      "type": "string",
      "description": "ok o triggered"
    },
    "enabled": {
      "type": "boolean"
    },
    "muted_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_triggered_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_evaluated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /workspaces/:workspace_id/alerts.json Crear una alerta alerts_create

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/alerts.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio (pa_…). Obligatorio salvo en alertas de uso"
    },
    "metric": {
      "type": "string",
      "description": "threshold/anomaly: visitors, visits, pageviews, bounce_rate o conversion. vitals: lcp, inp, cls, fcp o ttfb"
    },
    "operator": {
      "type": "string",
      "description": "Comparación (gt, gte, lt, lte). anomaly: lt solo caídas, gt solo picos, vacío ambos",
      "enum": [
        "gt",
        "gte",
        "lt",
        "lte"
      ]
    },
    "threshold": {
      "type": "number",
      "description": "threshold: valor de la métrica, goal: finalizaciones, no_data: horas, usage: porcentaje, ssl: días, vitals: ms (CLS: puntuación)"
    },
    "window_minutes": {
      "type": "integer",
      "description": "Ventana de evaluación en minutos (de 5 a 10080)"
    },
    "sensitivity": {
      "type": "string",
      "description": "anomaly: low, medium o high",
      "enum": [
        "low",
        "medium",
        "high"
      ]
    },
    "goal_id": {
      "type": "string",
      "description": "alertas de goal y conversion: id del objetivo (goal_…)"
    },
    "uptime_check_id": {
      "type": "string",
      "description": "uptime/ssl: id de la comprobación (por defecto: todas las del sitio)"
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de canales de notificación (nch_…)"
    },
    "enabled": {
      "type": "boolean",
      "description": "Evaluar esta alerta"
    },
    "name": {
      "type": "string",
      "description": "Nombre de la alerta",
      "examples": [
        "Traffic dropped"
      ]
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals",
      "enum": [
        "threshold",
        "anomaly",
        "goal",
        "no_data",
        "usage",
        "uptime",
        "ssl",
        "vitals"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "kind",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la alerta, p. ej. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Id del sitio (null para alertas de uso)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt o lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "sensibilidad de anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de canales de notificación"
    },
    "state": {
      "type": "string",
      "description": "ok o triggered"
    },
    "enabled": {
      "type": "boolean"
    },
    "muted_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_triggered_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_evaluated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /alerts/:id.json Eliminar una alerta alerts_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/alerts/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la alerta, p. ej. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Id del sitio (null para alertas de uso)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt o lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "sensibilidad de anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de canales de notificación"
    },
    "state": {
      "type": "string",
      "description": "ok o triggered"
    },
    "enabled": {
      "type": "boolean"
    },
    "muted_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_triggered_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_evaluated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /alerts/:id/history.json Historial de incidentes de una alerta alerts_history

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/alerts/:id/history.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "open": {
      "type": "boolean",
      "description": "Solo incidentes sin resolver",
      "default": false
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "triggered_at": {
        "type": "string",
        "format": "date-time"
      },
      "resolved_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "value": {
        "anyOf": [
          {
            "type": "number",
            "description": "Valor medido cuando se activó"
          },
          {
            "type": "null"
          }
        ]
      },
      "message": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "acknowledged_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "acknowledged_by": {
        "anyOf": [
          {
            "type": "string",
            "description": "Nombre del miembro que lo reconoció"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}
GET /workspaces/:workspace_id/alerts.json Listar alertas alerts_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/alerts.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Solo alertas de este sitio (pa_…)"
    },
    "state": {
      "type": "string",
      "description": "Solo alertas ok o triggered",
      "enum": [
        "ok",
        "triggered"
      ]
    },
    "kind": {
      "type": "string",
      "description": "Solo este tipo",
      "enum": [
        "threshold",
        "anomaly",
        "goal",
        "no_data",
        "usage",
        "uptime",
        "ssl",
        "vitals"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la alerta, p. ej. alr_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Id del sitio (null para alertas de uso)"
          },
          {
            "type": "null"
          }
        ]
      },
      "name": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
      },
      "metric": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "operator": {
        "anyOf": [
          {
            "type": "string",
            "description": "gt, gte, lt o lte"
          },
          {
            "type": "null"
          }
        ]
      },
      "threshold": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "null"
          }
        ]
      },
      "window_minutes": {
        "type": "integer"
      },
      "sensitivity": {
        "type": "string",
        "description": "sensibilidad de anomaly"
      },
      "goal_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "channel_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Ids de canales de notificación"
      },
      "state": {
        "type": "string",
        "description": "ok o triggered"
      },
      "enabled": {
        "type": "boolean"
      },
      "muted_until": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "last_triggered_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "last_evaluated_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /alerts/:id/mute.json Silenciar (o reactivar) las notificaciones de una alerta alerts_mute

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/alerts/:id/mute.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "minutes": {
      "type": "integer",
      "description": "Silenciar durante estos minutos (0 reactiva, máximo 30 días)",
      "default": 60
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la alerta, p. ej. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Id del sitio (null para alertas de uso)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt o lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "sensibilidad de anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de canales de notificación"
    },
    "state": {
      "type": "string",
      "description": "ok o triggered"
    },
    "enabled": {
      "type": "boolean"
    },
    "muted_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_triggered_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_evaluated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /alerts/:id.json Obtener una alerta alerts_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/alerts/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la alerta, p. ej. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Id del sitio (null para alertas de uso)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt o lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "sensibilidad de anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de canales de notificación"
    },
    "state": {
      "type": "string",
      "description": "ok o triggered"
    },
    "enabled": {
      "type": "boolean"
    },
    "muted_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_triggered_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_evaluated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /alerts/:id.json Actualizar una alerta alerts_update

Permiso: content.write

Ejemplo
curl -X PATCH https://privatusanalytics.com/alerts/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio (pa_…). Obligatorio salvo en alertas de uso"
    },
    "metric": {
      "type": "string",
      "description": "threshold/anomaly: visitors, visits, pageviews, bounce_rate o conversion. vitals: lcp, inp, cls, fcp o ttfb"
    },
    "operator": {
      "type": "string",
      "description": "Comparación (gt, gte, lt, lte). anomaly: lt solo caídas, gt solo picos, vacío ambos",
      "enum": [
        "gt",
        "gte",
        "lt",
        "lte"
      ]
    },
    "threshold": {
      "type": "number",
      "description": "threshold: valor de la métrica, goal: finalizaciones, no_data: horas, usage: porcentaje, ssl: días, vitals: ms (CLS: puntuación)"
    },
    "window_minutes": {
      "type": "integer",
      "description": "Ventana de evaluación en minutos (de 5 a 10080)"
    },
    "sensitivity": {
      "type": "string",
      "description": "anomaly: low, medium o high",
      "enum": [
        "low",
        "medium",
        "high"
      ]
    },
    "goal_id": {
      "type": "string",
      "description": "alertas de goal y conversion: id del objetivo (goal_…)"
    },
    "uptime_check_id": {
      "type": "string",
      "description": "uptime/ssl: id de la comprobación (por defecto: todas las del sitio)"
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de canales de notificación (nch_…)"
    },
    "enabled": {
      "type": "boolean",
      "description": "Evaluar esta alerta"
    },
    "name": {
      "type": "string",
      "description": "Nombre de la alerta"
    },
    "kind": {
      "type": "string",
      "description": "Tipo de alerta",
      "enum": [
        "threshold",
        "anomaly",
        "goal",
        "no_data",
        "usage",
        "uptime",
        "ssl",
        "vitals"
      ]
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la alerta, p. ej. alr_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Id del sitio (null para alertas de uso)"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
    },
    "metric": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "operator": {
      "anyOf": [
        {
          "type": "string",
          "description": "gt, gte, lt o lte"
        },
        {
          "type": "null"
        }
      ]
    },
    "threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "window_minutes": {
      "type": "integer"
    },
    "sensitivity": {
      "type": "string",
      "description": "sensibilidad de anomaly"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "channel_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de canales de notificación"
    },
    "state": {
      "type": "string",
      "description": "ok o triggered"
    },
    "enabled": {
      "type": "boolean"
    },
    "muted_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_triggered_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_evaluated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/alerts.json Listar las alertas de un sitio site_alerts_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/alerts.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "description": "Solo alertas ok o triggered",
      "enum": [
        "ok",
        "triggered"
      ]
    },
    "kind": {
      "type": "string",
      "description": "Solo este tipo",
      "enum": [
        "threshold",
        "anomaly",
        "goal",
        "no_data",
        "usage",
        "uptime",
        "ssl",
        "vitals"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la alerta, p. ej. alr_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Id del sitio (null para alertas de uso)"
          },
          {
            "type": "null"
          }
        ]
      },
      "name": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "description": "threshold, anomaly, goal, no_data, usage, uptime, ssl o vitals"
      },
      "metric": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "operator": {
        "anyOf": [
          {
            "type": "string",
            "description": "gt, gte, lt o lte"
          },
          {
            "type": "null"
          }
        ]
      },
      "threshold": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "null"
          }
        ]
      },
      "window_minutes": {
        "type": "integer"
      },
      "sensitivity": {
        "type": "string",
        "description": "sensibilidad de anomaly"
      },
      "goal_id": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "channel_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Ids de canales de notificación"
      },
      "state": {
        "type": "string",
        "description": "ok o triggered"
      },
      "enabled": {
        "type": "boolean"
      },
      "muted_until": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "last_triggered_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "last_evaluated_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}

Analítica

GET /sites/:site_id/overview.json Resumen del sitio: métricas, series del gráfico, paneles principales, visitantes en vivo y notas stats_overview

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/overview.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "interval": {
      "type": "string",
      "description": "Tamaño del intervalo del gráfico",
      "enum": [
        "auto",
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "auto"
    },
    "panels": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dimensiones de las que incluir los valores principales",
      "default": [
        "channel",
        "referrer",
        "page",
        "entry_page",
        "country",
        "device",
        "browser",
        "os",
        "utm_campaign",
        "event",
        "goal"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/experiments.json Informe de experimento: tasa de conversión por variante, mejora frente al control y significancia (prueba z de dos proporciones) experiments_report

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/experiments.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "property": {
      "type": "string",
      "description": "Propiedad del evento que contiene la variante, p. ej. variant",
      "examples": [
        "variant"
      ]
    },
    "goal_id": {
      "type": "string",
      "description": "Objetivo contado como conversión (goal_…)"
    },
    "control": {
      "type": "string",
      "description": "Variante de control (por defecto \"control\" si existe, si no la variante con más visitas)"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "property",
    "goal_id",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/insights.json Cambios notables frente al periodo anterior, en lenguaje natural (mayores variaciones, cambios en la conversión de objetivos) insights_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/insights.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Días completos hasta ayer, comparados con el mismo número de días anteriores",
      "enum": [
        "7d",
        "14d",
        "28d",
        "30d"
      ],
      "default": "7d"
    },
    "limit": {
      "type": "integer",
      "description": "Número máximo de insights (de 1 a 20)",
      "default": 8
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/journeys.json Recorridos: las 3 rutas de 3 pasos más frecuentes después de una página (o de cualquier entrada), o antes de una página u objetivo journeys_explore

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/journeys.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "mode": {
      "type": "string",
      "description": "forward: páginas posteriores a la página de inicio, reverse: páginas que llevan a la página final o al objetivo",
      "enum": [
        "forward",
        "reverse"
      ],
      "default": "forward"
    },
    "path": {
      "type": "string",
      "description": "Página de inicio (forward) o página final (reverse). En blanco significa cualquier entrada (solo forward)"
    },
    "goal_id": {
      "type": "string",
      "description": "Modo reverse: terminar en este objetivo (goal_…) en lugar de una página"
    },
    "limit": {
      "type": "integer",
      "description": "Páginas mostradas por paso (máx. 12)",
      "default": 6
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/pages/detail.json Detalle de página: métricas, páginas anterior y siguiente, fuentes, Web Vitals, eventos y mapa de clics de una ruta pages_detail

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/pages/detail.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "path": {
      "type": "string",
      "description": "Ruta de la página, p. ej. /pricing",
      "examples": [
        "/pricing"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "path",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/stats/aggregate.json Métricas principales de un periodo (con comparación) stats_aggregate

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/stats/aggregate.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/breakdown/:dimension.json Valores principales de una dimensión (páginas, fuentes, países…) stats_breakdown

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/breakdown/:dimension.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "dimension": {
      "type": "string",
      "description": "Dimension del recurso"
    },
    "limit": {
      "type": "integer",
      "description": "Filas por página (máx. 1000)",
      "default": 10
    },
    "page": {
      "type": "integer",
      "description": "Número de página",
      "default": 1
    },
    "sort": {
      "type": "string",
      "description": "Métrica de ordenación",
      "enum": [
        "visitors",
        "visits",
        "pageviews",
        "revenue"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "dimension",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/stats/timeseries.json Métricas por intervalo de tiempo para gráficos stats_timeseries

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/stats/timeseries.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "interval": {
      "type": "string",
      "description": "Tamaño del intervalo. auto elige uno para el rango",
      "enum": [
        "auto",
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "auto"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}

Asistente

POST /sites/:site_id/ask.json Hacer una pregunta en una conversación nueva (cuenta para el límite mensual de preguntas de IA) assistant_ask

Permiso: analytics.read

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/ask.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "question": {
      "type": "string",
      "description": "Tu primera pregunta en lenguaje natural",
      "examples": [
        "How many visitors did we have last week?"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "question",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la conversación, p. ej. ask_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Id del sitio"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "anyOf": [
        {
          "type": "string",
          "description": "La primera pregunta, abreviada"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Hora del último mensaje"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Se elimina automáticamente después de esta fecha (30 días después del último mensaje)"
    },
    "messages": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Id del mensaje dentro de la conversación"
        },
        "role": {
          "type": "string",
          "description": "user (la pregunta) o assistant (la respuesta)"
        },
        "content": {
          "type": "string",
          "description": "La pregunta, o la respuesta en Markdown"
        },
        "queries": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Cómo llegué a esto: las consultas exactas a la API detrás de la respuesta, como [{tool, input, status, error}]"
        },
        "chart": {
          "anyOf": [
            {
              "type": "object",
              "description": "Gráfico de la respuesta: {type: line, labels, series, comparison, metric, format} o {type: table, columns, rows}"
            },
            {
              "type": "null"
            }
          ]
        },
        "goal_draft": {
          "anyOf": [
            {
              "type": "object",
              "description": "Un objetivo propuesto por el asistente, para confirmar con goals_create"
            },
            {
              "type": "null"
            }
          ]
        },
        "input_tokens": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Tokens de entrada del modelo usados"
            },
            {
              "type": "null"
            }
          ]
        },
        "output_tokens": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Tokens de salida del modelo usados"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "Preguntas y respuestas, las más antiguas primero"
    }
  }
}
DELETE /sites/:site_id/ask/:id.json Eliminar una conversación de Preguntar y sus mensajes assistant_conversations_delete

Permiso: analytics.read

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/ask/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la conversación, p. ej. ask_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Id del sitio"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "anyOf": [
        {
          "type": "string",
          "description": "La primera pregunta, abreviada"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Hora del último mensaje"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Se elimina automáticamente después de esta fecha (30 días después del último mensaje)"
    }
  }
}
GET /sites/:site_id/ask.json Listar tus conversaciones de Preguntar de un sitio assistant_conversations_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/ask.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la conversación, p. ej. ask_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Id del sitio"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": {
        "anyOf": [
          {
            "type": "string",
            "description": "La primera pregunta, abreviada"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time",
        "description": "Hora del último mensaje"
      },
      "expires_at": {
        "type": "string",
        "format": "date-time",
        "description": "Se elimina automáticamente después de esta fecha (30 días después del último mensaje)"
      }
    }
  }
}
GET /sites/:site_id/ask/:id.json Una conversación de Preguntar: preguntas, respuestas, las consultas detrás de ellas y gráficos assistant_conversations_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/ask/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la conversación, p. ej. ask_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Id del sitio"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "anyOf": [
        {
          "type": "string",
          "description": "La primera pregunta, abreviada"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Hora del último mensaje"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Se elimina automáticamente después de esta fecha (30 días después del último mensaje)"
    },
    "messages": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Id del mensaje dentro de la conversación"
        },
        "role": {
          "type": "string",
          "description": "user (la pregunta) o assistant (la respuesta)"
        },
        "content": {
          "type": "string",
          "description": "La pregunta, o la respuesta en Markdown"
        },
        "queries": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Cómo llegué a esto: las consultas exactas a la API detrás de la respuesta, como [{tool, input, status, error}]"
        },
        "chart": {
          "anyOf": [
            {
              "type": "object",
              "description": "Gráfico de la respuesta: {type: line, labels, series, comparison, metric, format} o {type: table, columns, rows}"
            },
            {
              "type": "null"
            }
          ]
        },
        "goal_draft": {
          "anyOf": [
            {
              "type": "object",
              "description": "Un objetivo propuesto por el asistente, para confirmar con goals_create"
            },
            {
              "type": "null"
            }
          ]
        },
        "input_tokens": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Tokens de entrada del modelo usados"
            },
            {
              "type": "null"
            }
          ]
        },
        "output_tokens": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Tokens de salida del modelo usados"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "Preguntas y respuestas, las más antiguas primero"
    }
  }
}
POST /sites/:site_id/ask/:ask_conversation_id/messages.json Hacer una pregunta de seguimiento en una conversación (cuenta para el límite mensual de preguntas de IA). Devuelve la respuesta. assistant_ask_followup

Permiso: analytics.read

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/ask/:ask_conversation_id/messages.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "question": {
      "type": "string",
      "description": "Tu pregunta en lenguaje natural",
      "examples": [
        "Which pages had the most visitors last week?"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "ask_conversation_id": {
      "type": "string",
      "description": "Ask conversation del recurso"
    }
  },
  "required": [
    "question",
    "site_id",
    "ask_conversation_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id del mensaje dentro de la conversación"
    },
    "role": {
      "type": "string",
      "description": "user (la pregunta) o assistant (la respuesta)"
    },
    "content": {
      "type": "string",
      "description": "La pregunta, o la respuesta en Markdown"
    },
    "queries": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Cómo llegué a esto: las consultas exactas a la API detrás de la respuesta, como [{tool, input, status, error}]"
    },
    "chart": {
      "anyOf": [
        {
          "type": "object",
          "description": "Gráfico de la respuesta: {type: line, labels, series, comparison, metric, format} o {type: table, columns, rows}"
        },
        {
          "type": "null"
        }
      ]
    },
    "goal_draft": {
      "anyOf": [
        {
          "type": "object",
          "description": "Un objetivo propuesto por el asistente, para confirmar con goals_create"
        },
        {
          "type": "null"
        }
      ]
    },
    "input_tokens": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Tokens de entrada del modelo usados"
        },
        {
          "type": "null"
        }
      ]
    },
    "output_tokens": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Tokens de salida del modelo usados"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Ayuda y comentarios

POST /help.json Enviar una pregunta o comentario al equipo de Privatus Analytics support_message_send

El mensaje se envía por correo al equipo con los datos de tu cuenta, espacio de trabajo y plan adjuntos. La respuesta y un acuse de recibo llegan al correo de tu cuenta. Hasta 10 mensajes al día.

Permiso: member

Ejemplo
curl -X POST https://privatusanalytics.com/help.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "subject": {
      "type": "string",
      "description": "De qué trata el mensaje (hasta 150 caracteres)",
      "examples": [
        "Funnel shows no data"
      ]
    },
    "message": {
      "type": "string",
      "description": "Tu pregunta o comentario (de 10 a 5.000 caracteres)"
    }
  },
  "required": [
    "subject",
    "message"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Siempre true cuando se aceptó el envío"
    },
    "message": {
      "type": "string",
      "description": "Qué ocurre a continuación"
    }
  }
}

Búsqueda

GET /sites/:site_id/search.json Informe de búsqueda: clics, impresiones, CTR, posición, principales consultas y páginas, páginas de destino y oportunidades search_report

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/search.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "provider": {
      "type": "string",
      "description": "google (Search Console) o bing",
      "enum": [
        "google",
        "bing"
      ],
      "default": "google"
    },
    "limit": {
      "type": "integer",
      "description": "Filas por tabla (máx. 100)",
      "default": 25
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /sites/:site_id/search/connections.json Conectar una propiedad de Search Console o un sitio de Bing search_connect

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/search/connections.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google o bing",
      "enum": [
        "google",
        "bing"
      ],
      "default": "google"
    },
    "property": {
      "type": "string",
      "description": "Propiedad de Search Console (p. ej. sc-domain:example.com) o URL del sitio de Bing",
      "examples": [
        "sc-domain:example.com"
      ]
    },
    "bing_api_key": {
      "type": "string",
      "description": "Tu propia clave de API de Bing Webmaster Tools (Settings > API access). Obligatoria cuando provider es bing. Se almacena cifrada y nunca se devuelve."
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "property",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google o bing"
    },
    "property": {
      "type": "string",
      "description": "Propiedad de Search Console o URL del sitio de Bing"
    },
    "status": {
      "type": "string",
      "description": "active o error"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/search/connections/:provider.json Desconectar Search Console o Bing y eliminar sus datos search_disconnect

Permiso: sites.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/search/connections/:provider.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "provider": {
      "type": "string",
      "description": "Provider del recurso"
    }
  },
  "required": [
    "site_id",
    "provider"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google o bing"
    },
    "property": {
      "type": "string",
      "description": "Propiedad de Search Console o URL del sitio de Bing"
    },
    "status": {
      "type": "string",
      "description": "active o error"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/search/properties.json Listar las propiedades que puedes conectar (Search Console necesita una autorización de Google desde el navegador) search_properties

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/search/properties.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google o bing",
      "enum": [
        "google",
        "bing"
      ],
      "default": "google"
    },
    "bing_api_key": {
      "type": "string",
      "description": "Tu propia clave de API de Bing Webmaster Tools (Settings > API access). Obligatoria cuando provider es bing. Solo se usa para listar los sitios que puede ver."
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /sites/:site_id/search/sync.json Importar datos de búsqueda ahora search_sync

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/search/sync.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google o bing",
      "enum": [
        "google",
        "bing"
      ],
      "default": "google"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "google o bing"
    },
    "property": {
      "type": "string",
      "description": "Propiedad de Search Console o URL del sitio de Bing"
    },
    "status": {
      "type": "string",
      "description": "active o error"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Campañas

POST /sites/:site_id/campaigns/costs.json Definir el gasto de una campaña en un mes campaign_costs_create

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/campaigns/costs.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "campaign": {
      "type": "string",
      "description": "Valor de utm_campaign al que pertenece el gasto",
      "examples": [
        "spring_sale"
      ]
    },
    "month": {
      "type": "string",
      "description": "Mes, AAAA-MM",
      "examples": [
        "2026-09"
      ]
    },
    "amount": {
      "type": "number",
      "description": "Gasto en unidades principales, p. ej. 1250.50"
    },
    "currency": {
      "type": "string",
      "description": "Moneda ISO 4217 (por defecto la moneda del sitio)"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "campaign",
    "month",
    "amount",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la entrada de coste"
    },
    "campaign": {
      "type": "string",
      "description": "Valor de utm_campaign"
    },
    "month": {
      "type": "string",
      "description": "Mes, AAAA-MM"
    },
    "amount_minor": {
      "type": "integer",
      "description": "Gasto en unidades menores"
    },
    "currency": {
      "type": "string",
      "description": "Moneda ISO 4217 del importe"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/campaigns/costs/:id.json Eliminar una entrada de coste de campaña campaign_costs_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/campaigns/costs/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la entrada de coste"
    },
    "campaign": {
      "type": "string",
      "description": "Valor de utm_campaign"
    },
    "month": {
      "type": "string",
      "description": "Mes, AAAA-MM"
    },
    "amount_minor": {
      "type": "integer",
      "description": "Gasto en unidades menores"
    },
    "currency": {
      "type": "string",
      "description": "Moneda ISO 4217 del importe"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/campaigns/costs/import.json Importar costes de campaña desde CSV (campaign,month,amount[,currency]) campaign_costs_import

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/campaigns/costs/import.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "file": {
      "type": "string",
      "format": "binary",
      "description": "Subida de archivo CSV (formularios multipart)"
    },
    "csv": {
      "type": "string",
      "description": "Texto CSV: campaign,month,amount[,currency]"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "imported": {
      "type": "integer",
      "description": "Filas guardadas"
    },
    "failed": {
      "type": "integer",
      "description": "Filas omitidas"
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Por qué se omitieron filas (las primeras 50)"
    }
  }
}
GET /sites/:site_id/campaigns/costs.json Listar entradas de coste de campaña campaign_costs_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/campaigns/costs.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "campaign": {
      "type": "string",
      "description": "Solo esta campaña"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid",
        "description": "Id de la entrada de coste"
      },
      "campaign": {
        "type": "string",
        "description": "Valor de utm_campaign"
      },
      "month": {
        "type": "string",
        "description": "Mes, AAAA-MM"
      },
      "amount_minor": {
        "type": "integer",
        "description": "Gasto en unidades menores"
      },
      "currency": {
        "type": "string",
        "description": "Moneda ISO 4217 del importe"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
PATCH /sites/:site_id/campaigns/costs/:id.json Cambiar una entrada de coste de campaña campaign_costs_update

Permiso: content.write

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/campaigns/costs/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "campaign": {
      "type": "string",
      "description": "Valor de utm_campaign"
    },
    "month": {
      "type": "string",
      "description": "Mes, AAAA-MM"
    },
    "amount": {
      "type": "number",
      "description": "Gasto en unidades principales"
    },
    "currency": {
      "type": "string",
      "description": "Moneda ISO 4217"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la entrada de coste"
    },
    "campaign": {
      "type": "string",
      "description": "Valor de utm_campaign"
    },
    "month": {
      "type": "string",
      "description": "Mes, AAAA-MM"
    },
    "amount_minor": {
      "type": "integer",
      "description": "Gasto en unidades menores"
    },
    "currency": {
      "type": "string",
      "description": "Moneda ISO 4217 del importe"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/campaigns/builder.json Crear y validar una URL con etiquetas UTM campaigns_builder

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/campaigns/builder.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "destination": {
      "type": "string",
      "description": "URL de la página de destino (https://…)",
      "examples": [
        "https://example.com/pricing"
      ]
    },
    "preset": {
      "type": "string",
      "description": "Rellenar utm_source/utm_medium para un canal cuando estén en blanco",
      "enum": [
        "newsletter",
        "social",
        "paid_search",
        "paid_social",
        "print",
        "partner"
      ]
    },
    "utm_source": {
      "type": "string",
      "description": "De dónde viene el tráfico"
    },
    "utm_medium": {
      "type": "string",
      "description": "Medio de marketing, p. ej. email, cpc"
    },
    "utm_campaign": {
      "type": "string",
      "description": "Nombre de la campaña, p. ej. spring_sale"
    },
    "utm_content": {
      "type": "string",
      "description": "Variante, p. ej. header_button"
    },
    "utm_term": {
      "type": "string",
      "description": "Palabra clave de búsqueda de pago"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "url": {
      "anyOf": [
        {
          "type": "string",
          "description": "URL con etiquetas (null mientras haya errores)"
        },
        {
          "type": "null"
        }
      ]
    },
    "valid": {
      "type": "boolean",
      "description": "True cuando no hay errores"
    },
    "destination": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "preset": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "utm_source": {
      "anyOf": [
        {
          "type": "string",
          "description": "utm_source normalizado"
        },
        {
          "type": "null"
        }
      ]
    },
    "utm_medium": {
      "anyOf": [
        {
          "type": "string",
          "description": "utm_medium normalizado"
        },
        {
          "type": "null"
        }
      ]
    },
    "utm_campaign": {
      "anyOf": [
        {
          "type": "string",
          "description": "utm_campaign normalizado"
        },
        {
          "type": "null"
        }
      ]
    },
    "utm_content": {
      "anyOf": [
        {
          "type": "string",
          "description": "utm_content normalizado"
        },
        {
          "type": "null"
        }
      ]
    },
    "utm_term": {
      "anyOf": [
        {
          "type": "string",
          "description": "utm_term normalizado"
        },
        {
          "type": "null"
        }
      ]
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "field, level (error o warning) y message"
    },
    "presets": {
      "type": "object",
      "description": "Preajustes de canal: utm_source/utm_medium por preajuste"
    }
  }
}
GET /sites/:site_id/campaigns/hygiene.json Higiene de UTM: valores casi duplicados, problemas de estilo y fuentes desconocidas campaigns_hygiene

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/campaigns/hygiene.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "period": {
      "type": "object",
      "description": "from/to del periodo (UTC)"
    },
    "duplicates": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Valores casi duplicados: field, suggestion y variants [{value, visits}]"
    },
    "style_issues": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Valores que no están en minúsculas con guiones bajos: field, value, visits, suggestion"
    },
    "unknown_sources": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Valores de utm_source que no reconocemos: value, visits"
    }
  }
}
GET /sites/:site_id/campaigns.json Resumen de campañas con conversiones, ingresos, coste, CPA y ROAS campaigns_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/campaigns.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "goal_id": {
      "type": "string",
      "description": "Objetivo (goal_…) cuyas conversiones se cuentan. Por defecto el primer objetivo activo"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "period": {
      "type": "object",
      "description": "from/to del periodo (UTC)"
    },
    "currency": {
      "type": "string",
      "description": "Moneda del sitio para ingresos y coste"
    },
    "goal_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Objetivo contado como conversión"
        },
        {
          "type": "null"
        }
      ]
    },
    "goal_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "campaigns": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Por utm_campaign: visitors, visits, conversions, conversion_rate, revenue, cost, cpa (unidades menores), roas (ingresos ÷ coste) y sources [{source, medium, visitors, visits, conversions, conversion_rate, revenue}]"
    },
    "totals": {
      "type": "object",
      "description": "Sumas de todas las campañas listadas"
    }
  }
}

Canales de notificación

POST /workspaces/:workspace_id/channels.json Añadir un canal de notificación notification_channels_create

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/channels.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "URL del webhook (slack, teams, discord, webhook), HTTPS"
    },
    "secret": {
      "type": "string",
      "description": "webhook: secreto HMAC para X-Privatus-Signature"
    },
    "emails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "email: direcciones de destinatarios (máx. 20)"
    },
    "routing_key": {
      "type": "string",
      "description": "pagerduty: clave de integración de Events API v2"
    },
    "api_key": {
      "type": "string",
      "description": "opsgenie: clave de integración de la API"
    },
    "region": {
      "type": "string",
      "description": "opsgenie: región de la cuenta",
      "enum": [
        "us",
        "eu"
      ]
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push",
      "enum": [
        "email",
        "slack",
        "teams",
        "discord",
        "webhook",
        "pagerduty",
        "opsgenie",
        "push"
      ]
    },
    "name": {
      "type": "string",
      "description": "Nombre visible",
      "examples": [
        "#alerts"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "kind",
    "name",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del canal, p. ej. nch_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Destino enmascarado"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /channels/:id.json Eliminar un canal de notificación notification_channels_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/channels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del canal, p. ej. nch_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Destino enmascarado"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/channels.json Listar canales de notificación notification_channels_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/channels.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "Solo canales de este tipo",
      "enum": [
        "email",
        "slack",
        "teams",
        "discord",
        "webhook",
        "pagerduty",
        "opsgenie",
        "push"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del canal, p. ej. nch_7Q2K9XH3AB"
      },
      "kind": {
        "type": "string",
        "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
      },
      "name": {
        "type": "string"
      },
      "target": {
        "type": "string",
        "description": "Destino enmascarado"
      },
      "last_used_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /channels/:id/send_test.json Enviar un mensaje de prueba a través de un canal notification_channels_send_test

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/channels/:id/send_test.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del canal, p. ej. nch_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Destino enmascarado"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /channels/:id.json Obtener un canal de notificación notification_channels_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/channels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del canal, p. ej. nch_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Destino enmascarado"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /channels/:id.json Actualizar un canal de notificación notification_channels_update

Permiso: content.write

Ejemplo
curl -X PATCH https://privatusanalytics.com/channels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "URL del webhook (slack, teams, discord, webhook), HTTPS"
    },
    "secret": {
      "type": "string",
      "description": "webhook: secreto HMAC para X-Privatus-Signature"
    },
    "emails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "email: direcciones de destinatarios (máx. 20)"
    },
    "routing_key": {
      "type": "string",
      "description": "pagerduty: clave de integración de Events API v2"
    },
    "api_key": {
      "type": "string",
      "description": "opsgenie: clave de integración de la API"
    },
    "region": {
      "type": "string",
      "description": "opsgenie: región de la cuenta",
      "enum": [
        "us",
        "eu"
      ]
    },
    "name": {
      "type": "string",
      "description": "Nombre visible"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del canal, p. ej. nch_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "email, slack, teams, discord, webhook, pagerduty, opsgenie o push"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Destino enmascarado"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /push_subscription.json Registrar un navegador para notificaciones push push_subscriptions_create

Permiso: member

Ejemplo
curl -X POST https://privatusanalytics.com/push_subscription.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "description": "PushSubscription.endpoint del navegador"
    },
    "p256dh": {
      "type": "string",
      "description": "PushSubscription keys.p256dh (base64url)"
    },
    "auth": {
      "type": "string",
      "description": "PushSubscription keys.auth (base64url)"
    }
  },
  "required": [
    "endpoint",
    "p256dh",
    "auth"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "endpoint_host": {
      "type": "string",
      "description": "Host del servicio push"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /push_subscription.json Eliminar el registro push de un navegador push_subscriptions_delete

Permiso: member

Ejemplo
curl -X DELETE https://privatusanalytics.com/push_subscription.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "endpoint": {
      "type": "string",
      "description": "PushSubscription.endpoint a eliminar"
    }
  },
  "required": [
    "endpoint"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "endpoint_host": {
      "type": "string",
      "description": "Host del servicio push"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Compartir

GET /badge/:site_id.json Insignia contador de visitantes (SVG) para un sitio público badges_get

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl https://privatusanalytics.com/badge/:site_id.json
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /share/:token/breakdown/:dimension.json Valores principales de una dimensión compartida shares_breakdown

Permiso: public

Ejemplo
curl https://privatusanalytics.com/share/:token/breakdown/:dimension.json
Entradas
{
  "type": "object",
  "properties": {
    "dimension": {
      "type": "string",
      "description": "Dimension del recurso"
    },
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas (se ignora si el enlace lo bloquea)",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros adicionales, si el enlace los permite",
      "default": []
    },
    "limit": {
      "type": "integer",
      "description": "Filas (máx. 100)",
      "default": 10
    },
    "token": {
      "type": "string",
      "description": "Token del recurso"
    }
  },
  "required": [
    "dimension",
    "token"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /share/:token.json Resumen del panel compartido para un token de enlace compartido shares_overview

Permiso: public

Ejemplo
curl https://privatusanalytics.com/share/:token.json
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas (se ignora si el enlace lo bloquea)",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros adicionales, si el enlace los permite: [[\"dimension\",\"operator\",\"value\"], …]",
      "default": []
    },
    "interval": {
      "type": "string",
      "description": "Tamaño del intervalo del gráfico",
      "enum": [
        "auto",
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "auto"
    },
    "token": {
      "type": "string",
      "description": "Token del recurso"
    }
  },
  "required": [
    "token"
  ]
}
Datos de respuesta
{
  "type": "object"
}

Cuenta

GET /account.json Obtener tu perfil y preferencias account_get

Permiso: member

Ejemplo
curl https://privatusanalytics.com/account.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {},
  "required": []
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string"
    },
    "unconfirmed_email": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nuevo correo pendiente de confirmación"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "theme": {
      "type": "string"
    },
    "default_landing": {
      "type": "string"
    },
    "locale": {
      "type": "string",
      "description": "Código de idioma de la aplicación para esta cuenta (en por defecto)"
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "shortcuts_enabled": {
      "type": "boolean"
    },
    "reduce_motion": {
      "type": "boolean"
    },
    "product_emails": {
      "type": "boolean"
    },
    "marketing_emails": {
      "type": "boolean",
      "description": "Indica si se pueden enviar correos de marketing (campañas de goteo). Es false tras darte de baja"
    },
    "newsletter": {
      "type": "boolean"
    },
    "two_factor": {
      "type": "boolean"
    },
    "passkeys": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /account.json Actualizar tu perfil y preferencias account_update

Permiso: member

Ejemplo
curl -X PATCH https://privatusanalytics.com/account.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Tu nombre"
    },
    "email": {
      "type": "string",
      "description": "Nueva dirección de correo (se confirma primero por correo)"
    },
    "theme": {
      "type": "string",
      "description": "Tema de color",
      "enum": [
        "system",
        "light",
        "dark"
      ]
    },
    "default_landing": {
      "type": "string",
      "description": "Página tras iniciar sesión: sites o last_site",
      "enum": [
        "sites",
        "last_site"
      ]
    },
    "locale": {
      "type": "string",
      "description": "Idioma de la aplicación cuando has iniciado sesión, como código de idioma (en, de, fr, etc.). Las páginas públicas y la API no cambian",
      "enum": [
        "en",
        "de",
        "es",
        "fr",
        "it",
        "nl",
        "pt",
        "pl",
        "sv",
        "da",
        "no",
        "fi",
        "ja",
        "ko",
        "zh-CN",
        "zh-TW"
      ]
    },
    "timezone": {
      "type": "string",
      "description": "Tu zona horaria (nombre IANA)"
    },
    "shortcuts_enabled": {
      "type": "boolean",
      "description": "Atajos de teclado"
    },
    "reduce_motion": {
      "type": "boolean",
      "description": "Reducir animaciones"
    },
    "product_emails": {
      "type": "boolean",
      "description": "Correos de novedades y consejos del producto"
    },
    "marketing_emails": {
      "type": "boolean",
      "description": "Correos de marketing, como consejos de bienvenida. Para volver a activarlos tras darte de baja hace falta un navegador con sesión iniciada"
    },
    "newsletter": {
      "type": "boolean",
      "description": "Boletín mensual"
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string"
    },
    "unconfirmed_email": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nuevo correo pendiente de confirmación"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "theme": {
      "type": "string"
    },
    "default_landing": {
      "type": "string"
    },
    "locale": {
      "type": "string",
      "description": "Código de idioma de la aplicación para esta cuenta (en por defecto)"
    },
    "timezone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "shortcuts_enabled": {
      "type": "boolean"
    },
    "reduce_motion": {
      "type": "boolean"
    },
    "product_emails": {
      "type": "boolean"
    },
    "marketing_emails": {
      "type": "boolean",
      "description": "Indica si se pueden enviar correos de marketing (campañas de goteo). Es false tras darte de baja"
    },
    "newsletter": {
      "type": "boolean"
    },
    "two_factor": {
      "type": "boolean"
    },
    "passkeys": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Disponibilidad

POST /sites/:site_id/uptime.json Añadir una comprobación de disponibilidad a un sitio uptime_checks_create

Permiso: uptime.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/uptime.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre visible (por defecto el destino)"
    },
    "kind": {
      "type": "string",
      "description": "http (código de estado), keyword (el cuerpo contiene), tcp (host:puerto) o dns (el nombre se resuelve)",
      "enum": [
        "http",
        "keyword",
        "tcp",
        "dns"
      ],
      "default": "http"
    },
    "url": {
      "type": "string",
      "description": "URL para comprobaciones http/keyword",
      "examples": [
        "https://example.com/health"
      ]
    },
    "host": {
      "type": "string",
      "description": "Nombre de host para comprobaciones tcp/dns"
    },
    "port": {
      "type": "integer",
      "description": "Puerto TCP para comprobaciones tcp"
    },
    "keyword": {
      "type": "string",
      "description": "Texto que debe contener el cuerpo de la respuesta (keyword)"
    },
    "expected_status": {
      "type": "integer",
      "description": "Código de estado HTTP esperado",
      "default": 200
    },
    "http_method": {
      "type": "string",
      "description": "Método HTTP",
      "enum": [
        "GET",
        "HEAD"
      ],
      "default": "GET"
    },
    "interval_seconds": {
      "type": "integer",
      "description": "Segundos entre comprobaciones (se aplica el mínimo del plan, por defecto 300 o el mínimo)"
    },
    "timeout_seconds": {
      "type": "integer",
      "description": "Segundos antes de que una sonda agote el tiempo (1-30)",
      "default": 20
    },
    "public": {
      "type": "boolean",
      "description": "Puede aparecer en páginas de estado públicas",
      "default": false
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la comprobación (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio al que pertenece la comprobación"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp o dns"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "host": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "port": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "keyword": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected_status": {
      "type": "integer"
    },
    "http_method": {
      "type": "string"
    },
    "interval_seconds": {
      "type": "integer"
    },
    "timeout_seconds": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "description": "up, down, pending o paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Puede aparecer en páginas de estado"
    },
    "last_checked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_check_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_response_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_issuer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "domain_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /uptime/checks/:id.json Eliminar una comprobación de disponibilidad y su historial uptime_checks_delete

Permiso: uptime.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/uptime/checks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la comprobación (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio al que pertenece la comprobación"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp o dns"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "host": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "port": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "keyword": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected_status": {
      "type": "integer"
    },
    "http_method": {
      "type": "string"
    },
    "interval_seconds": {
      "type": "integer"
    },
    "timeout_seconds": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "description": "up, down, pending o paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Puede aparecer en páginas de estado"
    },
    "last_checked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_check_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_response_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_issuer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "domain_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/uptime.json Listar las comprobaciones de disponibilidad de un sitio uptime_checks_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/uptime.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Solo comprobaciones en este estado",
      "enum": [
        "up",
        "down",
        "pending",
        "paused"
      ]
    },
    "query": {
      "type": "string",
      "description": "Filtrar por nombre o destino"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la comprobación (upc_…)"
      },
      "workspace_id": {
        "type": "string"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Sitio al que pertenece la comprobación"
          },
          {
            "type": "null"
          }
        ]
      },
      "name": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "description": "http, keyword, tcp o dns"
      },
      "url": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "host": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "port": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "keyword": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "expected_status": {
        "type": "integer"
      },
      "http_method": {
        "type": "string"
      },
      "interval_seconds": {
        "type": "integer"
      },
      "timeout_seconds": {
        "type": "integer"
      },
      "status": {
        "type": "string",
        "description": "up, down, pending o paused"
      },
      "enabled": {
        "type": "boolean"
      },
      "public": {
        "type": "boolean",
        "description": "Puede aparecer en páginas de estado"
      },
      "last_checked_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "next_check_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "last_response_ms": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "ssl_expires_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "ssl_issuer": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "domain_expires_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /uptime/checks/:id/pause.json Pausar una comprobación de disponibilidad uptime_checks_pause

Permiso: uptime.manage

Ejemplo
curl -X POST https://privatusanalytics.com/uptime/checks/:id/pause.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la comprobación (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio al que pertenece la comprobación"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp o dns"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "host": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "port": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "keyword": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected_status": {
      "type": "integer"
    },
    "http_method": {
      "type": "string"
    },
    "interval_seconds": {
      "type": "integer"
    },
    "timeout_seconds": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "description": "up, down, pending o paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Puede aparecer en páginas de estado"
    },
    "last_checked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_check_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_response_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_issuer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "domain_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /uptime/checks/:id/resume.json Reanudar una comprobación de disponibilidad pausada uptime_checks_resume

Permiso: uptime.manage

Ejemplo
curl -X POST https://privatusanalytics.com/uptime/checks/:id/resume.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la comprobación (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio al que pertenece la comprobación"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp o dns"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "host": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "port": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "keyword": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected_status": {
      "type": "integer"
    },
    "http_method": {
      "type": "string"
    },
    "interval_seconds": {
      "type": "integer"
    },
    "timeout_seconds": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "description": "up, down, pending o paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Puede aparecer en páginas de estado"
    },
    "last_checked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_check_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_response_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_issuer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "domain_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /uptime/checks/:id.json Obtener una comprobación de disponibilidad: disponibilidad de 24 h/7 d/30 d, tiempos de respuesta e incidentes uptime_checks_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/uptime/checks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "range": {
      "type": "string",
      "description": "Ventana del gráfico de tiempos de respuesta",
      "enum": [
        "24h",
        "7d",
        "30d"
      ],
      "default": "24h"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "check": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id de la comprobación (upc_…)"
        },
        "workspace_id": {
          "type": "string"
        },
        "site_id": {
          "anyOf": [
            {
              "type": "string",
              "description": "Sitio al que pertenece la comprobación"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "description": "http, keyword, tcp o dns"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "host": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "port": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "keyword": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "expected_status": {
          "type": "integer"
        },
        "http_method": {
          "type": "string"
        },
        "interval_seconds": {
          "type": "integer"
        },
        "timeout_seconds": {
          "type": "integer"
        },
        "status": {
          "type": "string",
          "description": "up, down, pending o paused"
        },
        "enabled": {
          "type": "boolean"
        },
        "public": {
          "type": "boolean",
          "description": "Puede aparecer en páginas de estado"
        },
        "last_checked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "next_check_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_response_ms": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "ssl_expires_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "ssl_issuer": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "domain_expires_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "uptime": {
      "type": "object",
      "description": "% de disponibilidad de 24 h, 7 d y 30 d"
    },
    "range": {
      "type": "string",
      "description": "Ventana de response_times"
    },
    "response_times": {
      "type": "object",
      "description": "Tiempo de respuesta medio en ms por intervalo: {unit, labels, series: {location: [ms…]}}"
    },
    "incidents": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_seconds": {
            "type": "integer",
            "description": "Hasta ahora, si sigue abierto"
          },
          "cause": {
            "anyOf": [
              {
                "type": "string",
                "description": "Error más común, p. ej. timeout o status_503"
              },
              {
                "type": "null"
              }
            ]
          },
          "failed_locations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
PATCH /uptime/checks/:id.json Cambiar una comprobación de disponibilidad uptime_checks_update

Permiso: uptime.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/uptime/checks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre visible (por defecto el destino)"
    },
    "kind": {
      "type": "string",
      "description": "http (código de estado), keyword (el cuerpo contiene), tcp (host:puerto) o dns (el nombre se resuelve)",
      "enum": [
        "http",
        "keyword",
        "tcp",
        "dns"
      ]
    },
    "url": {
      "type": "string",
      "description": "URL para comprobaciones http/keyword",
      "examples": [
        "https://example.com/health"
      ]
    },
    "host": {
      "type": "string",
      "description": "Nombre de host para comprobaciones tcp/dns"
    },
    "port": {
      "type": "integer",
      "description": "Puerto TCP para comprobaciones tcp"
    },
    "keyword": {
      "type": "string",
      "description": "Texto que debe contener el cuerpo de la respuesta (keyword)"
    },
    "expected_status": {
      "type": "integer",
      "description": "Código de estado HTTP esperado"
    },
    "http_method": {
      "type": "string",
      "description": "Método HTTP",
      "enum": [
        "GET",
        "HEAD"
      ]
    },
    "interval_seconds": {
      "type": "integer",
      "description": "Segundos entre comprobaciones (se aplica el mínimo del plan, por defecto 300 o el mínimo)"
    },
    "timeout_seconds": {
      "type": "integer",
      "description": "Segundos antes de que una sonda agote el tiempo (1-30)"
    },
    "public": {
      "type": "boolean",
      "description": "Puede aparecer en páginas de estado públicas"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la comprobación (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio al que pertenece la comprobación"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp o dns"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "host": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "port": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "keyword": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected_status": {
      "type": "integer"
    },
    "http_method": {
      "type": "string"
    },
    "interval_seconds": {
      "type": "integer"
    },
    "timeout_seconds": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "description": "up, down, pending o paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Puede aparecer en páginas de estado"
    },
    "last_checked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_check_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_response_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_issuer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "domain_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /uptime/probes.json Centro de datos de las sondas, User-Agent y rangos de IP de salida (para permitir nuestras sondas de disponibilidad) uptime_probes_list

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl https://privatusanalytics.com/uptime/probes.json
Entradas
{
  "type": "object",
  "properties": {},
  "required": []
}
Datos de respuesta
{
  "type": "object"
}
POST /uptime/probes/results.json Enviar resultados de un agente de sonda externo (token Bearer de sonda de disponibilidad) uptime_probes_results

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/uptime/probes/results.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "check_id": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "status_code": {
            "type": "integer"
          },
          "response_ms": {
            "type": "integer"
          },
          "error": {
            "type": "string"
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "description": "Resultados de la sonda: [{check_id, location, ok, status_code, response_ms, error, checked_at}]"
    }
  },
  "required": [
    "results"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /workspaces/:workspace_id/uptime.json Añadir una comprobación de disponibilidad del espacio de trabajo (no vinculada a un sitio) workspace_uptime_checks_create

Permiso: uptime.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/uptime.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre visible (por defecto el destino)"
    },
    "kind": {
      "type": "string",
      "description": "http (código de estado), keyword (el cuerpo contiene), tcp (host:puerto) o dns (el nombre se resuelve)",
      "enum": [
        "http",
        "keyword",
        "tcp",
        "dns"
      ],
      "default": "http"
    },
    "url": {
      "type": "string",
      "description": "URL para comprobaciones http/keyword",
      "examples": [
        "https://example.com/health"
      ]
    },
    "host": {
      "type": "string",
      "description": "Nombre de host para comprobaciones tcp/dns"
    },
    "port": {
      "type": "integer",
      "description": "Puerto TCP para comprobaciones tcp"
    },
    "keyword": {
      "type": "string",
      "description": "Texto que debe contener el cuerpo de la respuesta (keyword)"
    },
    "expected_status": {
      "type": "integer",
      "description": "Código de estado HTTP esperado",
      "default": 200
    },
    "http_method": {
      "type": "string",
      "description": "Método HTTP",
      "enum": [
        "GET",
        "HEAD"
      ],
      "default": "GET"
    },
    "interval_seconds": {
      "type": "integer",
      "description": "Segundos entre comprobaciones (se aplica el mínimo del plan, por defecto 300 o el mínimo)"
    },
    "timeout_seconds": {
      "type": "integer",
      "description": "Segundos antes de que una sonda agote el tiempo (1-30)",
      "default": 20
    },
    "public": {
      "type": "boolean",
      "description": "Puede aparecer en páginas de estado públicas",
      "default": false
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la comprobación (upc_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio al que pertenece la comprobación"
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "http, keyword, tcp o dns"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "host": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "port": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "keyword": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expected_status": {
      "type": "integer"
    },
    "http_method": {
      "type": "string"
    },
    "interval_seconds": {
      "type": "integer"
    },
    "timeout_seconds": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "description": "up, down, pending o paused"
    },
    "enabled": {
      "type": "boolean"
    },
    "public": {
      "type": "boolean",
      "description": "Puede aparecer en páginas de estado"
    },
    "last_checked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_check_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_response_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "ssl_issuer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "domain_expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/uptime.json Listar todas las comprobaciones de disponibilidad de un espacio de trabajo workspace_uptime_checks_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/uptime.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Solo comprobaciones en este estado",
      "enum": [
        "up",
        "down",
        "pending",
        "paused"
      ]
    },
    "query": {
      "type": "string",
      "description": "Filtrar por nombre o destino"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la comprobación (upc_…)"
      },
      "workspace_id": {
        "type": "string"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Sitio al que pertenece la comprobación"
          },
          {
            "type": "null"
          }
        ]
      },
      "name": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "description": "http, keyword, tcp o dns"
      },
      "url": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "host": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "port": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "keyword": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "expected_status": {
        "type": "integer"
      },
      "http_method": {
        "type": "string"
      },
      "interval_seconds": {
        "type": "integer"
      },
      "timeout_seconds": {
        "type": "integer"
      },
      "status": {
        "type": "string",
        "description": "up, down, pending o paused"
      },
      "enabled": {
        "type": "boolean"
      },
      "public": {
        "type": "boolean",
        "description": "Puede aparecer en páginas de estado"
      },
      "last_checked_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "next_check_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "last_response_ms": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "ssl_expires_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "ssl_issuer": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "domain_expires_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}

Documentación

GET /docs/api.json Listar todas las operaciones de la API y herramientas MCP docs_api

Permiso: public

Ejemplo
curl https://privatusanalytics.com/docs/api.json
Entradas
{
  "type": "object",
  "properties": {
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "tool_name": {
        "type": "string",
        "description": "Nombre de la herramienta MCP y operationId de OpenAPI"
      },
      "summary": {
        "type": "string"
      },
      "description": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "group": {
        "type": "string"
      },
      "verb": {
        "type": "string",
        "description": "Método HTTP"
      },
      "path": {
        "type": "string",
        "description": "Plantilla de ruta. Añade .json para JSON"
      },
      "permission": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "input_schema": {
        "type": "object",
        "description": "JSON Schema de las entradas"
      },
      "response_schema": {
        "type": "object",
        "description": "JSON Schema de `data`"
      }
    }
  }
}
GET /docs.json Listar páginas de documentación docs_list

Permiso: public

Ejemplo
curl https://privatusanalytics.com/docs.json
Entradas
{
  "type": "object",
  "properties": {
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "title": {
        "type": "string",
        "description": "Título de la página"
      },
      "description": {
        "type": "string",
        "description": "Resumen de una línea"
      },
      "path": {
        "type": "string",
        "description": "Ruta de la página. Añade .md para Markdown o .json para JSON"
      },
      "section": {
        "type": "string",
        "description": "Slug de la sección, p. ej. tracker"
      }
    }
  }
}
GET /openapi.json Documento OpenAPI 3.1 de toda la API docs_openapi

Permiso: public

Ejemplo
curl https://privatusanalytics.com/openapi.json
Entradas
{
  "type": "object",
  "properties": {},
  "required": []
}
Datos de respuesta
{
  "type": "object"
}
GET /docs/:section/:page.json Leer una página de documentación (Markdown y HTML) docs_get

section y page provienen de la ruta de la página /docs/<section>/<page>. Usa la página "index" para ver el resumen de una sección.

Permiso: public

Ejemplo
curl https://privatusanalytics.com/docs/:section/:page.json
Entradas
{
  "type": "object",
  "properties": {
    "section": {
      "type": "string",
      "description": "Section del recurso"
    },
    "page": {
      "type": "string",
      "description": "Page del recurso"
    }
  },
  "required": [
    "section",
    "page"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Título de la página"
    },
    "description": {
      "type": "string",
      "description": "Resumen de una línea"
    },
    "path": {
      "type": "string",
      "description": "Ruta de la página. Añade .md para Markdown o .json para JSON"
    },
    "section": {
      "type": "string",
      "description": "Slug de la sección, p. ej. tracker"
    },
    "headings": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Secciones de la página (id y texto)"
    },
    "full_markdown": {
      "type": "string",
      "description": "La página en Markdown (título incluido)"
    },
    "html": {
      "type": "string",
      "description": "El cuerpo de la página renderizado como HTML"
    }
  }
}

Embudos

POST /sites/:site_id/funnels.json Crear un embudo funnels_create

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/funnels.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del embudo",
      "examples": [
        "Signup flow"
      ]
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Pasos en orden (de 2 al límite de tu plan): [{\"type\": \"page|event|goal\", \"value\": \"/pricing | Signup | goal_…\", \"match\": \"exact|prefix|glob|regex\" (pasos de página), \"name\": \"etiqueta opcional\"}]"
    },
    "order_mode": {
      "type": "string",
      "description": "strict: pasos en este orden, any: en cualquier orden",
      "enum": [
        "strict",
        "any"
      ],
      "default": "strict"
    },
    "window": {
      "type": "string",
      "description": "Ventana de conversión: visit, o day (medida dentro de una visita, que nunca abarca un día UTC)",
      "enum": [
        "visit",
        "day"
      ],
      "default": "visit"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "steps",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del embudo, p. ej. fun_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Pasos: {type: page|event|goal, value, match, name}"
    },
    "order_mode": {
      "type": "string",
      "description": "strict o any"
    },
    "window": {
      "type": "string",
      "description": "visit o day"
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "entered": {
              "type": "integer",
              "description": "Visitas que llegaron al paso 1"
            },
            "completed": {
              "type": "integer",
              "description": "Visitas que llegaron al último paso"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Completadas ÷ entradas, %"
            }
          },
          "description": "Estadísticas del periodo (solo en la lista)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/funnels/:id.json Eliminar un embudo funnels_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del embudo, p. ej. fun_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Pasos: {type: page|event|goal, value, match, name}"
    },
    "order_mode": {
      "type": "string",
      "description": "strict o any"
    },
    "window": {
      "type": "string",
      "description": "visit o day"
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "entered": {
              "type": "integer",
              "description": "Visitas que llegaron al paso 1"
            },
            "completed": {
              "type": "integer",
              "description": "Visitas que llegaron al último paso"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Completadas ÷ entradas, %"
            }
          },
          "description": "Estadísticas del periodo (solo en la lista)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/funnels.json Listar embudos con entradas, finalizaciones y tasa funnels_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/funnels.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "page": {
      "type": "integer",
      "description": "Número de página",
      "default": 1
    },
    "per_page": {
      "type": "integer",
      "description": "Embudos por página (máx. 100)",
      "default": 25
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del embudo, p. ej. fun_7Q2K9XH3AB"
      },
      "name": {
        "type": "string"
      },
      "steps": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Pasos: {type: page|event|goal, value, match, name}"
      },
      "order_mode": {
        "type": "string",
        "description": "strict o any"
      },
      "window": {
        "type": "string",
        "description": "visit o day"
      },
      "stats": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "entered": {
                "type": "integer",
                "description": "Visitas que llegaron al paso 1"
              },
              "completed": {
                "type": "integer",
                "description": "Visitas que llegaron al último paso"
              },
              "conversion_rate": {
                "type": "number",
                "description": "Completadas ÷ entradas, %"
              }
            },
            "description": "Estadísticas del periodo (solo en la lista)"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /sites/:site_id/funnels/:id.json Informe de embudo: recuento por paso, conversión, abandono, tiempo entre pasos y adónde fueron las visitas en su lugar funnels_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "breakdown": {
      "type": "string",
      "description": "Dividir los recuentos por paso según una dimensión de visita",
      "enum": [
        "channel",
        "device",
        "country",
        "utm_campaign",
        "utm_source",
        "browser",
        "os"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "period": {
      "type": "object",
      "description": "from/to del periodo (UTC)"
    },
    "funnel": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id del embudo, p. ej. fun_7Q2K9XH3AB"
        },
        "name": {
          "type": "string"
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Pasos: {type: page|event|goal, value, match, name}"
        },
        "order_mode": {
          "type": "string",
          "description": "strict o any"
        },
        "window": {
          "type": "string",
          "description": "visit o day"
        },
        "stats": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "entered": {
                  "type": "integer",
                  "description": "Visitas que llegaron al paso 1"
                },
                "completed": {
                  "type": "integer",
                  "description": "Visitas que llegaron al último paso"
                },
                "conversion_rate": {
                  "type": "number",
                  "description": "Completadas ÷ entradas, %"
                }
              },
              "description": "Estadísticas del periodo (solo en la lista)"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "La definición del embudo"
    },
    "order_mode": {
      "type": "string",
      "description": "strict o any"
    },
    "window": {
      "type": "string",
      "description": "visit o day (day se mide dentro de una visita)"
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Por paso: index, name, type, value, count, step_conversion_rate, overall_conversion_rate, dropoff, dropoff_rate, median_seconds_from_previous, next_pages [{value, count}]"
    },
    "overall_conversion_rate": {
      "type": "number",
      "description": "Último paso ÷ primer paso, %"
    },
    "breakdown": {
      "anyOf": [
        {
          "type": "object",
          "description": "dimension, label y rows [{value, counts, overall_conversion_rate}]"
        },
        {
          "type": "null"
        }
      ]
    },
    "comparison": {
      "anyOf": [
        {
          "type": "object",
          "description": "period, recuentos por paso, overall_conversion_rate y change (%)"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
PATCH /sites/:site_id/funnels/:id.json Actualizar un embudo funnels_update

Permiso: content.write

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/funnels/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del embudo",
      "examples": [
        "Signup flow"
      ]
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Pasos en orden (de 2 al límite de tu plan): [{\"type\": \"page|event|goal\", \"value\": \"/pricing | Signup | goal_…\", \"match\": \"exact|prefix|glob|regex\" (pasos de página), \"name\": \"etiqueta opcional\"}]"
    },
    "order_mode": {
      "type": "string",
      "description": "strict: pasos en este orden, any: en cualquier orden",
      "enum": [
        "strict",
        "any"
      ]
    },
    "window": {
      "type": "string",
      "description": "Ventana de conversión: visit, o day (medida dentro de una visita, que nunca abarca un día UTC)",
      "enum": [
        "visit",
        "day"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del embudo, p. ej. fun_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Pasos: {type: page|event|goal, value, match, name}"
    },
    "order_mode": {
      "type": "string",
      "description": "strict o any"
    },
    "window": {
      "type": "string",
      "description": "visit o day"
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "entered": {
              "type": "integer",
              "description": "Visitas que llegaron al paso 1"
            },
            "completed": {
              "type": "integer",
              "description": "Visitas que llegaron al último paso"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Completadas ÷ entradas, %"
            }
          },
          "description": "Estadísticas del periodo (solo en la lista)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

En vivo

GET /sites/:site_id/live.json Visitantes en vivo, flujo de actividad y lo que es popular ahora mismo (últimos 30 minutos) live_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/live.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "feed": {
      "type": "string",
      "description": "Flujo de actividad: todas las visitas, vistas de página o eventos personalizados",
      "enum": [
        "all",
        "pageviews",
        "events"
      ],
      "default": "all"
    },
    "limit": {
      "type": "integer",
      "description": "Entradas del flujo de actividad (máx. 100)",
      "default": 50
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/live/wallboard.json Tarjetas del panel de pared (en vivo y hoy) de uno o más sitios live_wallboard

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/live/wallboard.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios entre los que rotar (por defecto este sitio)",
      "default": []
    },
    "rotate_seconds": {
      "type": "integer",
      "description": "Segundos que cada sitio permanece en pantalla (5-300)",
      "default": 20
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /wallboard/:token.json Panel de pared para un token de panel de pared (sin necesidad de iniciar sesión) live_public_wallboard

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl https://privatusanalytics.com/wallboard/:token.json
Entradas
{
  "type": "object",
  "properties": {
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios entre los que rotar (por defecto este sitio)",
      "default": []
    },
    "rotate_seconds": {
      "type": "integer",
      "description": "Segundos que cada sitio permanece en pantalla (5-300)",
      "default": 20
    },
    "token": {
      "type": "string",
      "description": "Token del recurso"
    }
  },
  "required": [
    "token"
  ]
}
Datos de respuesta
{
  "type": "object"
}

Espacios de trabajo

GET /workspaces/:workspace_id/white_label.json Obtener la marca blanca white_label_get

Permiso: workspace.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/white_label.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "brand_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre que se muestra en lugar de Privatus Analytics"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_logo_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "URL de la imagen del logo"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_color": {
      "anyOf": [
        {
          "type": "string",
          "description": "Color de acento"
        },
        {
          "type": "null"
        }
      ]
    },
    "hide_branding": {
      "type": "boolean",
      "description": "La marca de Privatus Analytics está oculta"
    },
    "available": {
      "type": "boolean",
      "description": "El plan incluye marca blanca"
    },
    "active": {
      "type": "boolean",
      "description": "La marca se está aplicando actualmente"
    }
  }
}
PATCH /workspaces/:workspace_id/white_label.json Definir la marca blanca de los paneles compartidos y los informes por correo (Business) white_label_update

Permiso: workspace.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/white_label.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "brand_name": {
      "type": "string",
      "description": "Nombre que se muestra en lugar de Privatus Analytics (en blanco lo quita)"
    },
    "brand_logo_url": {
      "type": "string",
      "description": "URL https de una imagen de logo (en blanco la quita)"
    },
    "brand_color": {
      "type": "string",
      "description": "Color de acento, p. ej. #06755b"
    },
    "hide_branding": {
      "type": "boolean",
      "description": "Ocultar \"Privatus Analytics\" en los paneles compartidos y en los informes por correo"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "brand_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre que se muestra en lugar de Privatus Analytics"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_logo_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "URL de la imagen del logo"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_color": {
      "anyOf": [
        {
          "type": "string",
          "description": "Color de acento"
        },
        {
          "type": "null"
        }
      ]
    },
    "hide_branding": {
      "type": "boolean",
      "description": "La marca de Privatus Analytics está oculta"
    },
    "available": {
      "type": "boolean",
      "description": "El plan incluye marca blanca"
    },
    "active": {
      "type": "boolean",
      "description": "La marca se está aplicando actualmente"
    }
  }
}
GET /workspaces/:workspace_id/security.json Obtener los ajustes de seguridad del espacio de trabajo workspace_security_get

Permiso: workspace.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/security.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "enforce_2fa": {
      "type": "boolean",
      "description": "Los miembros deben configurar 2FA"
    },
    "login_methods": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Métodos de inicio de sesión permitidos"
    },
    "session_ttl_hours": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Duración de la sesión (null = ninguna)"
        },
        {
          "type": "null"
        }
      ]
    },
    "app_ip_allowlist": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "IP/CIDR permitidas (vacío = desde cualquier lugar)"
    },
    "support_access_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "El soporte de Privatus Analytics puede ver el espacio de trabajo hasta"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
PATCH /workspaces/:workspace_id/security.json Actualizar los ajustes de seguridad del espacio de trabajo (2FA, métodos de inicio de sesión, duración de la sesión, lista de IP permitidas, acceso de soporte) workspace_security_update

Permiso: workspace.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/security.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "enforce_2fa": {
      "type": "boolean",
      "description": "Exigir a los miembros que configuren 2FA"
    },
    "login_methods": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "password",
          "magic_link",
          "passkey",
          "google",
          "github",
          "sso"
        ]
      },
      "description": "Métodos de inicio de sesión permitidos"
    },
    "session_ttl_hours": {
      "type": "integer",
      "description": "Cerrar la sesión de los miembros tras estas horas (0 = sin límite)"
    },
    "app_ip_allowlist": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Permitir el acceso a la aplicación y a la API solo desde estas IP/CIDR (Business). Vacío = desde cualquier lugar"
    },
    "support_access": {
      "type": "boolean",
      "description": "Permitir que el soporte de Privatus Analytics vea el espacio de trabajo durante 7 días"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "enforce_2fa": {
      "type": "boolean",
      "description": "Los miembros deben configurar 2FA"
    },
    "login_methods": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Métodos de inicio de sesión permitidos"
    },
    "session_ttl_hours": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Duración de la sesión (null = ninguna)"
        },
        {
          "type": "null"
        }
      ]
    },
    "app_ip_allowlist": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "IP/CIDR permitidas (vacío = desde cualquier lugar)"
    },
    "support_access_until": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "El soporte de Privatus Analytics puede ver el espacio de trabajo hasta"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /workspaces.json Crear un espacio de trabajo (te conviertes en el propietario) workspaces_create

Permiso: member · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del espacio de trabajo",
      "examples": [
        "Acme Inc"
      ]
    },
    "timezone": {
      "type": "string",
      "description": "Zona horaria de informes por defecto (por defecto la del usuario)"
    },
    "currency": {
      "type": "string",
      "description": "Moneda por defecto (ISO 4217)",
      "default": "USD"
    },
    "how_heard": {
      "type": "string",
      "description": "Cómo nos conociste"
    }
  },
  "required": [
    "name"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "timezone": {
      "type": "string",
      "description": "Zona horaria de informes por defecto"
    },
    "currency": {
      "type": "string",
      "description": "Moneda por defecto"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business o enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Eventos al mes incluidos en el plan"
    },
    "subscription_status": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "description": "Tu rol en este espacio de trabajo"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /workspaces/:id.json Eliminar un espacio de trabajo y todos sus sitios (solo el propietario, cancela cualquier suscripción) workspaces_delete

Permiso: workspace.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/workspaces/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "confirm": {
      "type": "string",
      "description": "Escribe el nombre del espacio de trabajo para confirmar"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "confirm",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "timezone": {
      "type": "string",
      "description": "Zona horaria de informes por defecto"
    },
    "currency": {
      "type": "string",
      "description": "Moneda por defecto"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business o enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Eventos al mes incluidos en el plan"
    },
    "subscription_status": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "description": "Tu rol en este espacio de trabajo"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces.json Listar tus espacios de trabajo workspaces_list

Permiso: member

Ejemplo
curl https://privatusanalytics.com/workspaces.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
      },
      "name": {
        "type": "string"
      },
      "timezone": {
        "type": "string",
        "description": "Zona horaria de informes por defecto"
      },
      "currency": {
        "type": "string",
        "description": "Moneda por defecto"
      },
      "plan": {
        "type": "string",
        "description": "free, pro, business o enterprise"
      },
      "plan_events": {
        "type": "integer",
        "description": "Eventos al mes incluidos en el plan"
      },
      "subscription_status": {
        "type": "string"
      },
      "role": {
        "type": "string",
        "description": "Tu rol en este espacio de trabajo"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /workspaces/:id.json Obtener un espacio de trabajo workspaces_get

Permiso: member

Ejemplo
curl https://privatusanalytics.com/workspaces/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "timezone": {
      "type": "string",
      "description": "Zona horaria de informes por defecto"
    },
    "currency": {
      "type": "string",
      "description": "Moneda por defecto"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business o enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Eventos al mes incluidos en el plan"
    },
    "subscription_status": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "description": "Tu rol en este espacio de trabajo"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /workspaces/:id.json Actualizar los ajustes del espacio de trabajo workspaces_update

Permiso: workspace.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/workspaces/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del espacio de trabajo"
    },
    "timezone": {
      "type": "string",
      "description": "Zona horaria de informes por defecto"
    },
    "currency": {
      "type": "string",
      "description": "Moneda por defecto (ISO 4217)"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "timezone": {
      "type": "string",
      "description": "Zona horaria de informes por defecto"
    },
    "currency": {
      "type": "string",
      "description": "Moneda por defecto"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business o enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Eventos al mes incluidos en el plan"
    },
    "subscription_status": {
      "type": "string"
    },
    "role": {
      "type": "string",
      "description": "Tu rol en este espacio de trabajo"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Eventos

GET /sites/:site_id/events/properties.json Listar las claves de propiedades de eventos vistas en los últimos 30 días event_properties_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/events/properties.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "event": {
      "type": "string",
      "description": "Solo claves vistas en este nombre de evento sin procesar"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
PATCH /sites/:site_id/events/properties.json Renombrar u ocultar una clave de propiedad de evento event_properties_update

Permiso: sites.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/events/properties.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "key": {
      "type": "string",
      "description": "Clave de la propiedad tal como se almacena, p. ej. plan"
    },
    "display_name": {
      "type": "string",
      "description": "Etiqueta que se muestra en su lugar (en blanco la quita)"
    },
    "hidden": {
      "type": "boolean",
      "description": "Ocultar esta clave de los informes"
    },
    "export_safe": {
      "type": "boolean",
      "description": "La clave no contiene datos personales, por lo que se incluye en las exportaciones sin procesar y en las sincronizaciones con almacenes de datos"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "key",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
DELETE /sites/:site_id/events.json Eliminar un evento y su historial (se ejecuta en segundo plano, confirma escribiendo el nombre) events_delete

Permiso: sites.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/events.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del evento sin procesar a eliminar"
    },
    "confirm": {
      "type": "string",
      "description": "Escribe de nuevo el nombre del evento para confirmar"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "confirm",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/events.json Listar eventos con finalizaciones, visitas, tasa de conversión y primera/última vez visto events_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/events.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "search": {
      "type": "string",
      "description": "Solo eventos cuyo nombre contenga esto"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /sites/:site_id/events/merge.json Combinar varios eventos en un solo nombre visible events_merge

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/events/merge.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "names": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Nombres de eventos sin procesar a combinar"
    },
    "into": {
      "type": "string",
      "description": "Nombre visible del evento combinado",
      "examples": [
        "Signup"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "names",
    "into",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del evento sin procesar tal como lo envía el rastreador"
    },
    "display_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre mostrado en los informes"
        },
        {
          "type": "null"
        }
      ]
    },
    "hidden": {
      "type": "boolean",
      "description": "Oculto de los informes"
    },
    "currency": {
      "anyOf": [
        {
          "type": "string",
          "description": "Moneda de los ingresos"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/events/detail.json Un evento: gráfico, tabla dinámica de propiedades, agregados de propiedades numéricas, páginas y fuentes events_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/events/detail.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "name": {
      "type": "string",
      "description": "Nombre del evento tal como se muestra (tras los cambios de nombre)",
      "examples": [
        "Signup"
      ]
    },
    "properties": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Hasta 3 claves de propiedad por las que pivotar",
      "default": []
    },
    "interval": {
      "type": "string",
      "description": "Tamaño del intervalo del gráfico",
      "enum": [
        "auto",
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "auto"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
PATCH /sites/:site_id/events/settings.json Renombrar, ocultar o mostrar un evento, o definir su moneda events_update

Permiso: sites.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/events/settings.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del evento sin procesar tal como lo envía el rastreador",
      "examples": [
        "signup_click"
      ]
    },
    "display_name": {
      "type": "string",
      "description": "Nombre que se muestra en su lugar (en blanco quita el cambio de nombre)"
    },
    "hidden": {
      "type": "boolean",
      "description": "Ocultar de los informes (los datos se conservan)"
    },
    "currency": {
      "type": "string",
      "description": "Moneda de los ingresos de este evento (ISO 4217)"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del evento sin procesar tal como lo envía el rastreador"
    },
    "display_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre mostrado en los informes"
        },
        {
          "type": "null"
        }
      ]
    },
    "hidden": {
      "type": "boolean",
      "description": "Oculto de los informes"
    },
    "currency": {
      "anyOf": [
        {
          "type": "string",
          "description": "Moneda de los ingresos"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Exportaciones

POST /workspaces/:workspace_id/exports.json Poner en cola una exportación (se genera en segundo plano) exports_create

Permiso: analytics.export

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/exports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Sitio a exportar (pa_…)",
      "examples": [
        "pa_7Q2K9XH3AB"
      ]
    },
    "kind": {
      "type": "string",
      "description": "aggregated: métricas por intervalo de tiempo y dimensiones. pageviews/events/raw: una fila por visita (Pro y superior). imported: estadísticas diarias importadas. dashboard: ZIP de los paneles del resumen",
      "enum": [
        "aggregated",
        "pageviews",
        "events",
        "imported",
        "raw",
        "dashboard"
      ],
      "default": "aggregated"
    },
    "file_format": {
      "type": "string",
      "description": "csv, json o xlsx (aggregated, pageviews, events, imported), csv o ndjson (raw), zip (dashboard)",
      "enum": [
        "csv",
        "json",
        "xlsx",
        "ndjson",
        "zip"
      ],
      "default": "csv"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Primer día, en la zona horaria de la exportación",
      "examples": [
        "2026-09-01"
      ]
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Último día, inclusive (máx. 400 días, raw 93 días)",
      "examples": [
        "2026-09-28"
      ]
    },
    "timezone": {
      "type": "string",
      "description": "Zona horaria para fechas y agrupación, p. ej. America/New_York (por defecto: la zona horaria del sitio)"
    },
    "grouping": {
      "type": "string",
      "description": "Intervalo de tiempo de las exportaciones agregadas",
      "enum": [
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "day"
    },
    "dimensions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dimensiones de visita por las que agrupar las exportaciones agregadas (hasta 6), p. ej. country, channel, entry_page. En exportaciones imported: las dimensiones importadas a incluir",
      "default": []
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Métricas de las exportaciones agregadas (por defecto todas): visitors, visits, pageviews, bounce_rate, visit_duration, views_per_visit, revenue",
      "default": []
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Columnas para las exportaciones pageviews/events/raw (por defecto todas menos visit_id, vital_value, selector): occurred_at, kind, name, visit_id, hostname, path, referrer_host, referrer_path, channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, ref, paid_click, country, language, device, browser, browser_major, os, os_major, screen_bucket, engaged_ms, scroll_depth, revenue_minor, currency, vital_value, selector, props",
      "default": []
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros, mismo formato que la API de estadísticas: [[\"dimension\",\"operator\",\"value\"], …]",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id",
    "from",
    "to",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la exportación, p. ej. exp_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio exportado (pa_…)"
        },
        {
          "type": "null"
        }
      ]
    },
    "kind": {
      "type": "string",
      "description": "aggregated, pageviews, events, imported, raw o dashboard"
    },
    "format": {
      "type": "string",
      "description": "csv, json, xlsx, ndjson o zip"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete, failed o expired"
    },
    "params": {
      "type": "object",
      "description": "La definición de la exportación (fechas, zona horaria, agrupación, dimensiones, métricas, campos, filtros)"
    },
    "row_count": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Filas escritas"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Por qué falló la exportación"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se elimina el archivo"
        },
        {
          "type": "null"
        }
      ]
    },
    "download_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Ruta que devuelve un enlace firmado de corta duración al archivo (exports_download)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /exports/:id.json Eliminar una exportación y su archivo exports_delete

Permiso: analytics.export

Ejemplo
curl -X DELETE https://privatusanalytics.com/exports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la exportación, p. ej. exp_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio exportado (pa_…)"
        },
        {
          "type": "null"
        }
      ]
    },
    "kind": {
      "type": "string",
      "description": "aggregated, pageviews, events, imported, raw o dashboard"
    },
    "format": {
      "type": "string",
      "description": "csv, json, xlsx, ndjson o zip"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete, failed o expired"
    },
    "params": {
      "type": "object",
      "description": "La definición de la exportación (fechas, zona horaria, agrupación, dimensiones, métricas, campos, filtros)"
    },
    "row_count": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Filas escritas"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Por qué falló la exportación"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se elimina el archivo"
        },
        {
          "type": "null"
        }
      ]
    },
    "download_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Ruta que devuelve un enlace firmado de corta duración al archivo (exports_download)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /exports/:id/download.json Obtener un enlace firmado al archivo (válido 10 minutos) exports_download

Permiso: analytics.export

Ejemplo
curl https://privatusanalytics.com/exports/:id/download.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /workspaces/:workspace_id/exports.json Listar exportaciones (la cola de trabajos) exports_list

Permiso: analytics.export

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/exports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Solo exportaciones de este sitio (pa_…)"
    },
    "status": {
      "type": "string",
      "description": "Solo exportaciones con este estado",
      "enum": [
        "queued",
        "running",
        "complete",
        "failed",
        "expired"
      ]
    },
    "kind": {
      "type": "string",
      "description": "Solo exportaciones de este tipo",
      "enum": [
        "aggregated",
        "pageviews",
        "events",
        "imported",
        "raw",
        "dashboard"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la exportación, p. ej. exp_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Sitio exportado (pa_…)"
          },
          {
            "type": "null"
          }
        ]
      },
      "kind": {
        "type": "string",
        "description": "aggregated, pageviews, events, imported, raw o dashboard"
      },
      "format": {
        "type": "string",
        "description": "csv, json, xlsx, ndjson o zip"
      },
      "status": {
        "type": "string",
        "description": "queued, running, complete, failed o expired"
      },
      "params": {
        "type": "object",
        "description": "La definición de la exportación (fechas, zona horaria, agrupación, dimensiones, métricas, campos, filtros)"
      },
      "row_count": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Filas escritas"
          },
          {
            "type": "null"
          }
        ]
      },
      "error": {
        "anyOf": [
          {
            "type": "string",
            "description": "Por qué falló la exportación"
          },
          {
            "type": "null"
          }
        ]
      },
      "completed_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "expires_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Cuándo se elimina el archivo"
          },
          {
            "type": "null"
          }
        ]
      },
      "download_url": {
        "anyOf": [
          {
            "type": "string",
            "description": "Ruta que devuelve un enlace firmado de corta duración al archivo (exports_download)"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /workspaces/:workspace_id/exports/preview.json Previsualizar una exportación: las primeras 20 filas y el número estimado de filas exports_preview

Permiso: analytics.export

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/exports/preview.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Sitio a exportar (pa_…)",
      "examples": [
        "pa_7Q2K9XH3AB"
      ]
    },
    "kind": {
      "type": "string",
      "description": "aggregated: métricas por intervalo de tiempo y dimensiones. pageviews/events/raw: una fila por visita (Pro y superior). imported: estadísticas diarias importadas. dashboard: ZIP de los paneles del resumen",
      "enum": [
        "aggregated",
        "pageviews",
        "events",
        "imported",
        "raw",
        "dashboard"
      ],
      "default": "aggregated"
    },
    "file_format": {
      "type": "string",
      "description": "csv, json o xlsx (aggregated, pageviews, events, imported), csv o ndjson (raw), zip (dashboard)",
      "enum": [
        "csv",
        "json",
        "xlsx",
        "ndjson",
        "zip"
      ],
      "default": "csv"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Primer día, en la zona horaria de la exportación",
      "examples": [
        "2026-09-01"
      ]
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Último día, inclusive (máx. 400 días, raw 93 días)",
      "examples": [
        "2026-09-28"
      ]
    },
    "timezone": {
      "type": "string",
      "description": "Zona horaria para fechas y agrupación, p. ej. America/New_York (por defecto: la zona horaria del sitio)"
    },
    "grouping": {
      "type": "string",
      "description": "Intervalo de tiempo de las exportaciones agregadas",
      "enum": [
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "day"
    },
    "dimensions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dimensiones de visita por las que agrupar las exportaciones agregadas (hasta 6), p. ej. country, channel, entry_page. En exportaciones imported: las dimensiones importadas a incluir",
      "default": []
    },
    "metrics": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Métricas de las exportaciones agregadas (por defecto todas): visitors, visits, pageviews, bounce_rate, visit_duration, views_per_visit, revenue",
      "default": []
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Columnas para las exportaciones pageviews/events/raw (por defecto todas menos visit_id, vital_value, selector): occurred_at, kind, name, visit_id, hostname, path, referrer_host, referrer_path, channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, ref, paid_click, country, language, device, browser, browser_major, os, os_major, screen_bucket, engaged_ms, scroll_depth, revenue_minor, currency, vital_value, selector, props",
      "default": []
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros, mismo formato que la API de estadísticas: [[\"dimension\",\"operator\",\"value\"], …]",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id",
    "from",
    "to",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /exports/:id.json Obtener una exportación y su estado exports_get

Permiso: analytics.export

Ejemplo
curl https://privatusanalytics.com/exports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la exportación, p. ej. exp_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio exportado (pa_…)"
        },
        {
          "type": "null"
        }
      ]
    },
    "kind": {
      "type": "string",
      "description": "aggregated, pageviews, events, imported, raw o dashboard"
    },
    "format": {
      "type": "string",
      "description": "csv, json, xlsx, ndjson o zip"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete, failed o expired"
    },
    "params": {
      "type": "object",
      "description": "La definición de la exportación (fechas, zona horaria, agrupación, dimensiones, métricas, campos, filtros)"
    },
    "row_count": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Filas escritas"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Por qué falló la exportación"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se elimina el archivo"
        },
        {
          "type": "null"
        }
      ]
    },
    "download_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Ruta que devuelve un enlace firmado de corta duración al archivo (exports_download)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Facturación

POST /workspaces/:workspace_id/billing/badge.json Activar o desactivar el bonus de la insignia (plan gratuito) billing_badge

Permiso: billing.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/badge.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean",
      "description": "true para verificar la insignia y obtener el bonus"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "enabled",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business o enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Eventos al mes del nivel de pago"
    },
    "allowance": {
      "type": "integer",
      "description": "Eventos al mes incluido cualquier bonus de la insignia"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month o year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD por intervalo de facturación"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused o canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Se renueva o termina en"
        },
        {
          "type": "null"
        }
      ]
    },
    "cancel_at_period_end": {
      "type": "boolean"
    },
    "canceled_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "auto_upgrade": {
      "type": "boolean"
    },
    "discount": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "program": {
              "type": "string",
              "description": "nonprofit, education, open_source, open_source_free o agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (aún no aplicado a la suscripción), active, rejected o revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Porcentaje de descuento en Pro y Business (null para el programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Eventos gratuitos al mes (solo programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Nombre de la organización, centro educativo, proyecto o agencia"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Sitio web"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Enlace de prueba o URL del repositorio"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Licencia OSI (código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Nota para la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Por qué no se aprobó la solicitud"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Fecha de la solicitud"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Descuento activo desde"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de fin del programa"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "La última solicitud de programa de descuento, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Porcentaje de descuento en Pro y Business de un programa aprobado, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Bonus de la insignia (plan gratuito)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Primer día del mes del informe"
        },
        "events": {
          "type": "integer",
          "description": "Eventos facturables (vistas de página y eventos personalizados)"
        },
        "bots": {
          "type": "integer",
          "description": "Visitas de bots filtradas (no se facturan)"
        },
        "allowance": {
          "type": "integer",
          "description": "Eventos incluidos, con el bonus de la insignia si lo hay"
        },
        "percent": {
          "type": "number",
          "description": "Eventos como porcentaje de la cuota"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Eventos previstos a fin de mes"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Días que quedan en el mes"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80% o más), over (un mes pasado que alcanzó o superó la cuota), locked o paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Vistas de página y eventos personalizados este mes"
              },
              "share": {
                "type": "number",
                "description": "Porcentaje del total del espacio de trabajo"
              }
            }
          },
          "description": "Eventos por sitio"
        },
        "history": {
          "type": "array",
          "description": "Meses anteriores, del más reciente al más antiguo"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Paneles bloqueados por el equipo de Privatus Analytics desde"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True mientras se descartan los eventos nuevos (se alcanzó el límite mensual o el equipo pausó la recopilación)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Por qué está en pausa la recopilación: limit (se alcanzó la cuota mensual) o staff. null cuando se está recopilando"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo pausó el equipo la recopilación"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo termina una pausa por límite: el inicio del mes siguiente (UTC), o antes si mejoras tu plan. null en los demás casos"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Este mes hasta ahora"
    }
  }
}
POST /workspaces/:workspace_id/billing/cancel.json Cancelar al final del periodo de facturación billing_cancel

Permiso: billing.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/cancel.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "reason": {
      "type": "string",
      "description": "Motivo principal de la cancelación (encuesta opcional)",
      "enum": [
        "too_expensive",
        "missing_features",
        "switching_tool",
        "not_using",
        "temporary",
        "other"
      ]
    },
    "comment": {
      "type": "string",
      "description": "Cualquier cosa que podamos mejorar"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business o enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Eventos al mes del nivel de pago"
    },
    "allowance": {
      "type": "integer",
      "description": "Eventos al mes incluido cualquier bonus de la insignia"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month o year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD por intervalo de facturación"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused o canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Se renueva o termina en"
        },
        {
          "type": "null"
        }
      ]
    },
    "cancel_at_period_end": {
      "type": "boolean"
    },
    "canceled_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "auto_upgrade": {
      "type": "boolean"
    },
    "discount": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "program": {
              "type": "string",
              "description": "nonprofit, education, open_source, open_source_free o agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (aún no aplicado a la suscripción), active, rejected o revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Porcentaje de descuento en Pro y Business (null para el programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Eventos gratuitos al mes (solo programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Nombre de la organización, centro educativo, proyecto o agencia"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Sitio web"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Enlace de prueba o URL del repositorio"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Licencia OSI (código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Nota para la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Por qué no se aprobó la solicitud"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Fecha de la solicitud"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Descuento activo desde"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de fin del programa"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "La última solicitud de programa de descuento, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Porcentaje de descuento en Pro y Business de un programa aprobado, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Bonus de la insignia (plan gratuito)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Primer día del mes del informe"
        },
        "events": {
          "type": "integer",
          "description": "Eventos facturables (vistas de página y eventos personalizados)"
        },
        "bots": {
          "type": "integer",
          "description": "Visitas de bots filtradas (no se facturan)"
        },
        "allowance": {
          "type": "integer",
          "description": "Eventos incluidos, con el bonus de la insignia si lo hay"
        },
        "percent": {
          "type": "number",
          "description": "Eventos como porcentaje de la cuota"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Eventos previstos a fin de mes"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Días que quedan en el mes"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80% o más), over (un mes pasado que alcanzó o superó la cuota), locked o paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Vistas de página y eventos personalizados este mes"
              },
              "share": {
                "type": "number",
                "description": "Porcentaje del total del espacio de trabajo"
              }
            }
          },
          "description": "Eventos por sitio"
        },
        "history": {
          "type": "array",
          "description": "Meses anteriores, del más reciente al más antiguo"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Paneles bloqueados por el equipo de Privatus Analytics desde"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True mientras se descartan los eventos nuevos (se alcanzó el límite mensual o el equipo pausó la recopilación)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Por qué está en pausa la recopilación: limit (se alcanzó la cuota mensual) o staff. null cuando se está recopilando"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo pausó el equipo la recopilación"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo termina una pausa por límite: el inicio del mes siguiente (UTC), o antes si mejoras tu plan. null en los demás casos"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Este mes hasta ahora"
    }
  }
}
POST /workspaces/:workspace_id/billing/change_plan.json Cambiar de plan, nivel o intervalo (prorrateado) billing_change_plan

Permiso: billing.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/change_plan.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "plan": {
      "type": "string",
      "description": "Plan al que cambiar: pro o business",
      "enum": [
        "pro",
        "business"
      ]
    },
    "events": {
      "type": "integer",
      "description": "Eventos al mes del nivel, de GET /plans",
      "examples": [
        1000000
      ]
    },
    "interval": {
      "type": "string",
      "description": "Intervalo de facturación. El anual incluye 2 meses gratis",
      "enum": [
        "month",
        "year"
      ],
      "default": "month"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "plan",
    "events",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business o enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Eventos al mes del nivel de pago"
    },
    "allowance": {
      "type": "integer",
      "description": "Eventos al mes incluido cualquier bonus de la insignia"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month o year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD por intervalo de facturación"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused o canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Se renueva o termina en"
        },
        {
          "type": "null"
        }
      ]
    },
    "cancel_at_period_end": {
      "type": "boolean"
    },
    "canceled_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "auto_upgrade": {
      "type": "boolean"
    },
    "discount": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "program": {
              "type": "string",
              "description": "nonprofit, education, open_source, open_source_free o agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (aún no aplicado a la suscripción), active, rejected o revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Porcentaje de descuento en Pro y Business (null para el programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Eventos gratuitos al mes (solo programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Nombre de la organización, centro educativo, proyecto o agencia"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Sitio web"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Enlace de prueba o URL del repositorio"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Licencia OSI (código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Nota para la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Por qué no se aprobó la solicitud"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Fecha de la solicitud"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Descuento activo desde"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de fin del programa"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "La última solicitud de programa de descuento, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Porcentaje de descuento en Pro y Business de un programa aprobado, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Bonus de la insignia (plan gratuito)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Primer día del mes del informe"
        },
        "events": {
          "type": "integer",
          "description": "Eventos facturables (vistas de página y eventos personalizados)"
        },
        "bots": {
          "type": "integer",
          "description": "Visitas de bots filtradas (no se facturan)"
        },
        "allowance": {
          "type": "integer",
          "description": "Eventos incluidos, con el bonus de la insignia si lo hay"
        },
        "percent": {
          "type": "number",
          "description": "Eventos como porcentaje de la cuota"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Eventos previstos a fin de mes"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Días que quedan en el mes"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80% o más), over (un mes pasado que alcanzó o superó la cuota), locked o paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Vistas de página y eventos personalizados este mes"
              },
              "share": {
                "type": "number",
                "description": "Porcentaje del total del espacio de trabajo"
              }
            }
          },
          "description": "Eventos por sitio"
        },
        "history": {
          "type": "array",
          "description": "Meses anteriores, del más reciente al más antiguo"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Paneles bloqueados por el equipo de Privatus Analytics desde"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True mientras se descartan los eventos nuevos (se alcanzó el límite mensual o el equipo pausó la recopilación)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Por qué está en pausa la recopilación: limit (se alcanzó la cuota mensual) o staff. null cuando se está recopilando"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo pausó el equipo la recopilación"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo termina una pausa por límite: el inicio del mes siguiente (UTC), o antes si mejoras tu plan. null en los demás casos"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Este mes hasta ahora"
    }
  }
}
POST /workspaces/:workspace_id/billing/checkout.json Iniciar un pago de Paddle para un plan de pago billing_checkout

Permiso: billing.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/checkout.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "plan": {
      "type": "string",
      "description": "Plan al que cambiar: pro o business",
      "enum": [
        "pro",
        "business"
      ]
    },
    "events": {
      "type": "integer",
      "description": "Eventos al mes del nivel, de GET /plans",
      "examples": [
        1000000
      ]
    },
    "interval": {
      "type": "string",
      "description": "Intervalo de facturación. El anual incluye 2 meses gratis",
      "enum": [
        "month",
        "year"
      ],
      "default": "month"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "plan",
    "events",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "transaction_id": {
      "type": "string",
      "description": "Id de transacción de Paddle (txn_...)"
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "description": "URL del pago alojado"
        },
        {
          "type": "null"
        }
      ]
    },
    "price_id": {
      "type": "string"
    },
    "plan": {
      "type": "string"
    },
    "events": {
      "type": "integer"
    },
    "interval": {
      "type": "string"
    },
    "amount": {
      "type": "integer",
      "description": "USD por intervalo"
    },
    "client_token": {
      "anyOf": [
        {
          "type": "string",
          "description": "Token del lado del cliente de Paddle.js"
        },
        {
          "type": "null"
        }
      ]
    },
    "environment": {
      "type": "string",
      "description": "sandbox o production"
    },
    "custom_data": {
      "type": "object",
      "description": "Se pasa a Paddle para vincular la suscripción"
    },
    "discount_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Id del descuento de Paddle de un programa aprobado, aplicado a este pago"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /workspaces/:workspace_id/billing/discount.json Solicitar un descuento para organizaciones sin ánimo de lucro, educación o código abierto billing_discount

Permiso: billing.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/discount.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "program": {
      "type": "string",
      "description": "nonprofit, education, open_source (50% de descuento), open_source_free (Pro gratis hasta 1M de eventos al mes) o agency (20% de descuento en cada espacio de trabajo que posees)",
      "enum": [
        "nonprofit",
        "education",
        "open_source",
        "open_source_free",
        "agency"
      ]
    },
    "organization_name": {
      "type": "string",
      "description": "Nombre de la organización, centro educativo, proyecto o agencia"
    },
    "website": {
      "type": "string",
      "description": "Su sitio web"
    },
    "proof_url": {
      "type": "string",
      "description": "Enlace de prueba. Para código abierto, la URL del repositorio"
    },
    "license": {
      "type": "string",
      "description": "Licencia OSI del proyecto (solo código abierto)"
    },
    "note": {
      "type": "string",
      "description": "Cualquier dato que ayude a la revisión, hasta 1.000 caracteres"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "program",
    "organization_name",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "program": {
      "type": "string",
      "description": "nonprofit, education, open_source, open_source_free o agency"
    },
    "status": {
      "type": "string",
      "description": "pending, approved (aún no aplicado a la suscripción), active, rejected o revoked"
    },
    "percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Porcentaje de descuento en Pro y Business (null para el programa gratuito de código abierto)"
        },
        {
          "type": "null"
        }
      ]
    },
    "comp_events": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Eventos gratuitos al mes (solo programa gratuito de código abierto)"
        },
        {
          "type": "null"
        }
      ]
    },
    "organization_name": {
      "type": "string",
      "description": "Nombre de la organización, centro educativo, proyecto o agencia"
    },
    "website": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio web"
        },
        {
          "type": "null"
        }
      ]
    },
    "proof_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "Enlace de prueba o URL del repositorio"
        },
        {
          "type": "null"
        }
      ]
    },
    "license": {
      "anyOf": [
        {
          "type": "string",
          "description": "Licencia OSI (código abierto)"
        },
        {
          "type": "null"
        }
      ]
    },
    "note": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nota para la revisión"
        },
        {
          "type": "null"
        }
      ]
    },
    "rejection_reason": {
      "anyOf": [
        {
          "type": "string",
          "description": "Por qué no se aprobó la solicitud"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Fecha de la solicitud"
    },
    "reviewed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Fecha de la revisión"
        },
        {
          "type": "null"
        }
      ]
    },
    "applied_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Descuento activo desde"
        },
        {
          "type": "null"
        }
      ]
    },
    "revoked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Fecha de fin del programa"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /workspaces/:workspace_id/billing/payment_method.json Obtener un enlace para actualizar el método de pago billing_payment_method

Permiso: billing.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/payment_method.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "portal, payment_method o invoice"
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "description": "URL de Paddle de corta duración"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /workspaces/:workspace_id/billing/portal.json Obtener un enlace al portal de clientes de Paddle billing_portal

Permiso: billing.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/portal.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "portal, payment_method o invoice"
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "description": "URL de Paddle de corta duración"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
GET /workspaces/:workspace_id/billing/preview.json Previsualizar un cambio de plan con prorrateo billing_preview

Permiso: billing.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/preview.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "plan": {
      "type": "string",
      "description": "Plan al que cambiar: pro o business",
      "enum": [
        "pro",
        "business"
      ]
    },
    "events": {
      "type": "integer",
      "description": "Eventos al mes del nivel, de GET /plans",
      "examples": [
        1000000
      ]
    },
    "interval": {
      "type": "string",
      "description": "Intervalo de facturación. El anual incluye 2 meses gratis",
      "enum": [
        "month",
        "year"
      ],
      "default": "month"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "plan",
    "events",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "plan": {
      "type": "string"
    },
    "events": {
      "type": "integer"
    },
    "interval": {
      "type": "string"
    },
    "price_id": {
      "type": "string"
    },
    "amount": {
      "type": "integer",
      "description": "Nuevo precio en USD por intervalo"
    },
    "currency": {
      "type": "string"
    },
    "charge_minor": {
      "type": "integer",
      "description": "Cargado ahora, en unidades menores"
    },
    "credit_minor": {
      "type": "integer",
      "description": "Crédito por el tiempo no utilizado, en unidades menores"
    },
    "result_action": {
      "anyOf": [
        {
          "type": "string",
          "description": "charge o credit"
        },
        {
          "type": "null"
        }
      ]
    },
    "result_minor": {
      "type": "integer",
      "description": "Cargo o crédito neto, en unidades menores"
    },
    "next_billed_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Uso o límites que el nuevo plan no cubriría"
    }
  }
}
POST /workspaces/:workspace_id/billing/resume.json Deshacer una cancelación programada o reanudar una pausa billing_resume

Permiso: billing.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/billing/resume.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business o enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Eventos al mes del nivel de pago"
    },
    "allowance": {
      "type": "integer",
      "description": "Eventos al mes incluido cualquier bonus de la insignia"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month o year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD por intervalo de facturación"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused o canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Se renueva o termina en"
        },
        {
          "type": "null"
        }
      ]
    },
    "cancel_at_period_end": {
      "type": "boolean"
    },
    "canceled_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "auto_upgrade": {
      "type": "boolean"
    },
    "discount": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "program": {
              "type": "string",
              "description": "nonprofit, education, open_source, open_source_free o agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (aún no aplicado a la suscripción), active, rejected o revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Porcentaje de descuento en Pro y Business (null para el programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Eventos gratuitos al mes (solo programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Nombre de la organización, centro educativo, proyecto o agencia"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Sitio web"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Enlace de prueba o URL del repositorio"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Licencia OSI (código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Nota para la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Por qué no se aprobó la solicitud"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Fecha de la solicitud"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Descuento activo desde"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de fin del programa"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "La última solicitud de programa de descuento, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Porcentaje de descuento en Pro y Business de un programa aprobado, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Bonus de la insignia (plan gratuito)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Primer día del mes del informe"
        },
        "events": {
          "type": "integer",
          "description": "Eventos facturables (vistas de página y eventos personalizados)"
        },
        "bots": {
          "type": "integer",
          "description": "Visitas de bots filtradas (no se facturan)"
        },
        "allowance": {
          "type": "integer",
          "description": "Eventos incluidos, con el bonus de la insignia si lo hay"
        },
        "percent": {
          "type": "number",
          "description": "Eventos como porcentaje de la cuota"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Eventos previstos a fin de mes"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Días que quedan en el mes"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80% o más), over (un mes pasado que alcanzó o superó la cuota), locked o paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Vistas de página y eventos personalizados este mes"
              },
              "share": {
                "type": "number",
                "description": "Porcentaje del total del espacio de trabajo"
              }
            }
          },
          "description": "Eventos por sitio"
        },
        "history": {
          "type": "array",
          "description": "Meses anteriores, del más reciente al más antiguo"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Paneles bloqueados por el equipo de Privatus Analytics desde"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True mientras se descartan los eventos nuevos (se alcanzó el límite mensual o el equipo pausó la recopilación)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Por qué está en pausa la recopilación: limit (se alcanzó la cuota mensual) o staff. null cuando se está recopilando"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo pausó el equipo la recopilación"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo termina una pausa por límite: el inicio del mes siguiente (UTC), o antes si mejoras tu plan. null en los demás casos"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Este mes hasta ahora"
    }
  }
}
GET /workspaces/:workspace_id/billing.json Obtener el plan, la suscripción y el uso billing_get

Permiso: billing.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/billing.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business o enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Eventos al mes del nivel de pago"
    },
    "allowance": {
      "type": "integer",
      "description": "Eventos al mes incluido cualquier bonus de la insignia"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month o year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD por intervalo de facturación"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused o canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Se renueva o termina en"
        },
        {
          "type": "null"
        }
      ]
    },
    "cancel_at_period_end": {
      "type": "boolean"
    },
    "canceled_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "auto_upgrade": {
      "type": "boolean"
    },
    "discount": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "program": {
              "type": "string",
              "description": "nonprofit, education, open_source, open_source_free o agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (aún no aplicado a la suscripción), active, rejected o revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Porcentaje de descuento en Pro y Business (null para el programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Eventos gratuitos al mes (solo programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Nombre de la organización, centro educativo, proyecto o agencia"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Sitio web"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Enlace de prueba o URL del repositorio"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Licencia OSI (código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Nota para la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Por qué no se aprobó la solicitud"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Fecha de la solicitud"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Descuento activo desde"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de fin del programa"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "La última solicitud de programa de descuento, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Porcentaje de descuento en Pro y Business de un programa aprobado, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Bonus de la insignia (plan gratuito)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Primer día del mes del informe"
        },
        "events": {
          "type": "integer",
          "description": "Eventos facturables (vistas de página y eventos personalizados)"
        },
        "bots": {
          "type": "integer",
          "description": "Visitas de bots filtradas (no se facturan)"
        },
        "allowance": {
          "type": "integer",
          "description": "Eventos incluidos, con el bonus de la insignia si lo hay"
        },
        "percent": {
          "type": "number",
          "description": "Eventos como porcentaje de la cuota"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Eventos previstos a fin de mes"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Días que quedan en el mes"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80% o más), over (un mes pasado que alcanzó o superó la cuota), locked o paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Vistas de página y eventos personalizados este mes"
              },
              "share": {
                "type": "number",
                "description": "Porcentaje del total del espacio de trabajo"
              }
            }
          },
          "description": "Eventos por sitio"
        },
        "history": {
          "type": "array",
          "description": "Meses anteriores, del más reciente al más antiguo"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Paneles bloqueados por el equipo de Privatus Analytics desde"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True mientras se descartan los eventos nuevos (se alcanzó el límite mensual o el equipo pausó la recopilación)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Por qué está en pausa la recopilación: limit (se alcanzó la cuota mensual) o staff. null cuando se está recopilando"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo pausó el equipo la recopilación"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo termina una pausa por límite: el inicio del mes siguiente (UTC), o antes si mejoras tu plan. null en los demás casos"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Este mes hasta ahora"
    }
  }
}
PATCH /workspaces/:workspace_id/billing.json Actualizar los correos de facturación, el identificador fiscal y la mejora automática billing_update

Permiso: billing.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/billing.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Direcciones adicionales para facturas y avisos de facturación (hasta 5)"
    },
    "tax_id": {
      "type": "string",
      "description": "Identificador fiscal (IVA/GST/otro) que se muestra en las facturas"
    },
    "auto_upgrade": {
      "type": "boolean",
      "description": "true para pasar al siguiente nivel y cobrar la diferencia cuando se alcanza el límite mensual, en lugar de pausar la recopilación. Desactivado por defecto"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string"
    },
    "plan": {
      "type": "string",
      "description": "free, pro, business o enterprise"
    },
    "plan_events": {
      "type": "integer",
      "description": "Eventos al mes del nivel de pago"
    },
    "allowance": {
      "type": "integer",
      "description": "Eventos al mes incluido cualquier bonus de la insignia"
    },
    "billing_interval": {
      "anyOf": [
        {
          "type": "string",
          "description": "month o year"
        },
        {
          "type": "null"
        }
      ]
    },
    "price": {
      "anyOf": [
        {
          "type": "integer",
          "description": "USD por intervalo de facturación"
        },
        {
          "type": "null"
        }
      ]
    },
    "subscription_status": {
      "type": "string",
      "description": "none, trialing, active, past_due, paused o canceled"
    },
    "current_period_ends_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Se renueva o termina en"
        },
        {
          "type": "null"
        }
      ]
    },
    "cancel_at_period_end": {
      "type": "boolean"
    },
    "canceled_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "auto_upgrade": {
      "type": "boolean"
    },
    "discount": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "program": {
              "type": "string",
              "description": "nonprofit, education, open_source, open_source_free o agency"
            },
            "status": {
              "type": "string",
              "description": "pending, approved (aún no aplicado a la suscripción), active, rejected o revoked"
            },
            "percent": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Porcentaje de descuento en Pro y Business (null para el programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "comp_events": {
              "anyOf": [
                {
                  "type": "integer",
                  "description": "Eventos gratuitos al mes (solo programa gratuito de código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "organization_name": {
              "type": "string",
              "description": "Nombre de la organización, centro educativo, proyecto o agencia"
            },
            "website": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Sitio web"
                },
                {
                  "type": "null"
                }
              ]
            },
            "proof_url": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Enlace de prueba o URL del repositorio"
                },
                {
                  "type": "null"
                }
              ]
            },
            "license": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Licencia OSI (código abierto)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "note": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Nota para la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "rejection_reason": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Por qué no se aprobó la solicitud"
                },
                {
                  "type": "null"
                }
              ]
            },
            "created_at": {
              "type": "string",
              "format": "date-time",
              "description": "Fecha de la solicitud"
            },
            "reviewed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de la revisión"
                },
                {
                  "type": "null"
                }
              ]
            },
            "applied_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Descuento activo desde"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revoked_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Fecha de fin del programa"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "La última solicitud de programa de descuento, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "discount_percent": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Porcentaje de descuento en Pro y Business de un programa aprobado, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "billing_emails": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tax_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "badge": {
      "type": "object",
      "description": "Bonus de la insignia (plan gratuito)"
    },
    "usage": {
      "type": "object",
      "properties": {
        "month": {
          "type": "string",
          "format": "date",
          "description": "Primer día del mes del informe"
        },
        "events": {
          "type": "integer",
          "description": "Eventos facturables (vistas de página y eventos personalizados)"
        },
        "bots": {
          "type": "integer",
          "description": "Visitas de bots filtradas (no se facturan)"
        },
        "allowance": {
          "type": "integer",
          "description": "Eventos incluidos, con el bonus de la insignia si lo hay"
        },
        "percent": {
          "type": "number",
          "description": "Eventos como porcentaje de la cuota"
        },
        "forecast": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Eventos previstos a fin de mes"
            },
            {
              "type": "null"
            }
          ]
        },
        "forecast_percent": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "days_left": {
          "type": "integer",
          "description": "Días que quedan en el mes"
        },
        "status": {
          "type": "string",
          "description": "ok, warning (80% o más), over (un mes pasado que alcanzó o superó la cuota), locked o paused"
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "string"
              },
              "domain": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "events": {
                "type": "integer",
                "description": "Vistas de página y eventos personalizados este mes"
              },
              "share": {
                "type": "number",
                "description": "Porcentaje del total del espacio de trabajo"
              }
            }
          },
          "description": "Eventos por sitio"
        },
        "history": {
          "type": "array",
          "description": "Meses anteriores, del más reciente al más antiguo"
        },
        "access_locked_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Paneles bloqueados por el equipo de Privatus Analytics desde"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused": {
          "type": "boolean",
          "description": "True mientras se descartan los eventos nuevos (se alcanzó el límite mensual o el equipo pausó la recopilación)"
        },
        "pause_reason": {
          "anyOf": [
            {
              "type": "string",
              "description": "Por qué está en pausa la recopilación: limit (se alcanzó la cuota mensual) o staff. null cuando se está recopilando"
            },
            {
              "type": "null"
            }
          ]
        },
        "collection_paused_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo pausó el equipo la recopilación"
            },
            {
              "type": "null"
            }
          ]
        },
        "resumes_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "Cuándo termina una pausa por límite: el inicio del mes siguiente (UTC), o antes si mejoras tu plan. null en los demás casos"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "description": "Este mes hasta ahora"
    }
  }
}
GET /workspaces/:workspace_id/billing/usage.json Obtener el uso de este mes, la previsión y el reparto por sitio billing_usage

Permiso: billing.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/usage.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "month": {
      "type": "string",
      "format": "date",
      "description": "Cualquier día del mes a informar (por defecto este mes)",
      "examples": [
        "2026-09-01"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "month": {
      "type": "string",
      "format": "date",
      "description": "Primer día del mes del informe"
    },
    "events": {
      "type": "integer",
      "description": "Eventos facturables (vistas de página y eventos personalizados)"
    },
    "bots": {
      "type": "integer",
      "description": "Visitas de bots filtradas (no se facturan)"
    },
    "allowance": {
      "type": "integer",
      "description": "Eventos incluidos, con el bonus de la insignia si lo hay"
    },
    "percent": {
      "type": "number",
      "description": "Eventos como porcentaje de la cuota"
    },
    "forecast": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Eventos previstos a fin de mes"
        },
        {
          "type": "null"
        }
      ]
    },
    "forecast_percent": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "days_left": {
      "type": "integer",
      "description": "Días que quedan en el mes"
    },
    "status": {
      "type": "string",
      "description": "ok, warning (80% o más), over (un mes pasado que alcanzó o superó la cuota), locked o paused"
    },
    "sites": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "site_id": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "events": {
            "type": "integer",
            "description": "Vistas de página y eventos personalizados este mes"
          },
          "share": {
            "type": "number",
            "description": "Porcentaje del total del espacio de trabajo"
          }
        }
      },
      "description": "Eventos por sitio"
    },
    "history": {
      "type": "array",
      "description": "Meses anteriores, del más reciente al más antiguo"
    },
    "access_locked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Paneles bloqueados por el equipo de Privatus Analytics desde"
        },
        {
          "type": "null"
        }
      ]
    },
    "collection_paused": {
      "type": "boolean",
      "description": "True mientras se descartan los eventos nuevos (se alcanzó el límite mensual o el equipo pausó la recopilación)"
    },
    "pause_reason": {
      "anyOf": [
        {
          "type": "string",
          "description": "Por qué está en pausa la recopilación: limit (se alcanzó la cuota mensual) o staff. null cuando se está recopilando"
        },
        {
          "type": "null"
        }
      ]
    },
    "collection_paused_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo pausó el equipo la recopilación"
        },
        {
          "type": "null"
        }
      ]
    },
    "resumes_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo termina una pausa por límite: el inicio del mes siguiente (UTC), o antes si mejoras tu plan. null en los demás casos"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
GET /workspaces/:workspace_id/billing/invoices.json Listar facturas billing_invoices_list

Permiso: billing.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/invoices.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de transacción de Paddle"
      },
      "invoice_number": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "status": {
        "type": "string",
        "description": "paid, completed, payment_failed, ..."
      },
      "amount_minor": {
        "type": "integer",
        "description": "Total en unidades menores (céntimos)"
      },
      "currency": {
        "type": "string"
      },
      "billed_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}
GET /workspaces/:workspace_id/billing/invoices/:id.json Obtener el enlace al PDF de una factura billing_invoices_get

Permiso: billing.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/billing/invoices/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "portal, payment_method o invoice"
    },
    "url": {
      "anyOf": [
        {
          "type": "string",
          "description": "URL de Paddle de corta duración"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Importaciones

GET /sites/:site_id/imports/google/properties.json Listar propiedades de Google Analytics 4 para importar imports_google_properties

Permiso: sites.manage

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/imports/google/properties.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /sites/:site_id/imports.json Iniciar una importación (propiedad de GA4 o subida de CSV) imports_create

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/imports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "description": "ga4 (API de Google Analytics 4) o la herramienta cuya exportación CSV subes",
      "enum": [
        "ga4",
        "universal_analytics",
        "fathom",
        "simple_analytics",
        "plausible",
        "matomo",
        "umami",
        "clicky"
      ]
    },
    "property_id": {
      "type": "string",
      "description": "Propiedad de GA4, p. ej. properties/123 (consulta imports_google_properties). Obligatorio para ga4",
      "examples": [
        "properties/123456789"
      ]
    },
    "date_from": {
      "type": "string",
      "format": "date",
      "description": "Primer día a importar. Obligatorio para ga4. En archivos CSV sin columna de fecha, todas las filas se fechan con este día"
    },
    "date_to": {
      "type": "string",
      "format": "date",
      "description": "Último día a importar (ga4 usa por defecto el día anterior a tu primer evento rastreado, o ayer)"
    },
    "file": {
      "type": "string",
      "format": "binary",
      "description": "Exportación CSV (subida multipart, máx. 50 MB). Obligatorio para fuentes CSV"
    },
    "dimension": {
      "type": "string",
      "description": "Qué desglosan las filas del CSV (anula la detección, necesario para exportaciones \"Label\" de Matomo)",
      "enum": [
        "total",
        "page",
        "source",
        "country",
        "device",
        "browser",
        "os"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "source",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la importación"
    },
    "site_id": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami o clicky"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete o failed"
    },
    "date_from": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Primer día importado"
        },
        {
          "type": "null"
        }
      ]
    },
    "date_to": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Último día importado"
        },
        {
          "type": "null"
        }
      ]
    },
    "rows_imported": {
      "type": "integer",
      "description": "Filas diarias almacenadas"
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Por qué falló la importación"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/imports/:id.json Eliminar una importación y todos sus datos importados imports_delete

Permiso: sites.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/imports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la importación"
    },
    "site_id": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami o clicky"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete o failed"
    },
    "date_from": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Primer día importado"
        },
        {
          "type": "null"
        }
      ]
    },
    "date_to": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Último día importado"
        },
        {
          "type": "null"
        }
      ]
    },
    "rows_imported": {
      "type": "integer",
      "description": "Filas diarias almacenadas"
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Por qué falló la importación"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/imports.json Listar las importaciones de un sitio imports_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/imports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Solo importaciones con este estado",
      "enum": [
        "queued",
        "running",
        "complete",
        "failed"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la importación"
      },
      "site_id": {
        "type": "string"
      },
      "source": {
        "type": "string",
        "description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami o clicky"
      },
      "status": {
        "type": "string",
        "description": "queued, running, complete o failed"
      },
      "date_from": {
        "anyOf": [
          {
            "type": "string",
            "format": "date",
            "description": "Primer día importado"
          },
          {
            "type": "null"
          }
        ]
      },
      "date_to": {
        "anyOf": [
          {
            "type": "string",
            "format": "date",
            "description": "Último día importado"
          },
          {
            "type": "null"
          }
        ]
      },
      "rows_imported": {
        "type": "integer",
        "description": "Filas diarias almacenadas"
      },
      "error": {
        "anyOf": [
          {
            "type": "string",
            "description": "Por qué falló la importación"
          },
          {
            "type": "null"
          }
        ]
      },
      "completed_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /sites/:site_id/imports/:id.json Obtener una importación y su estado imports_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/imports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la importación"
    },
    "site_id": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "description": "ga4, universal_analytics, fathom, simple_analytics, plausible, matomo, umami o clicky"
    },
    "status": {
      "type": "string",
      "description": "queued, running, complete o failed"
    },
    "date_from": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Primer día importado"
        },
        {
          "type": "null"
        }
      ]
    },
    "date_to": {
      "anyOf": [
        {
          "type": "string",
          "format": "date",
          "description": "Último día importado"
        },
        {
          "type": "null"
        }
      ]
    },
    "rows_imported": {
      "type": "integer",
      "description": "Filas diarias almacenadas"
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Por qué falló la importación"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Informes por correo

DELETE /recipients/:id.json Quitar un destinatario de un informe por correo email_report_recipients_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/recipients/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del destinatario, p. ej. rcp_7Q2K9XH3AB"
    },
    "email": {
      "type": "string",
      "description": "La dirección"
    },
    "status": {
      "type": "string",
      "description": "active, pending, declined o unsubscribed"
    },
    "invited_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se envió la última invitación"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo caduca una invitación pendiente"
        },
        {
          "type": "null"
        }
      ]
    },
    "confirmed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo pasó la dirección a estar activa"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
GET /reports/:report_id/recipients.json Listar los destinatarios de un informe por correo con su estado email_report_recipients_list

Estados: active (recibe informes), pending (invitado, aún sin aceptar), declined o unsubscribed. Añade o quita direcciones mediante la lista de destinatarios del informe.

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/reports/:report_id/recipients.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Solo los destinatarios con este estado",
      "enum": [
        "pending",
        "active",
        "declined",
        "unsubscribed"
      ]
    },
    "report_id": {
      "type": "string",
      "description": "Report del recurso"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "report_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del destinatario, p. ej. rcp_7Q2K9XH3AB"
      },
      "email": {
        "type": "string",
        "description": "La dirección"
      },
      "status": {
        "type": "string",
        "description": "active, pending, declined o unsubscribed"
      },
      "invited_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Cuándo se envió la última invitación"
          },
          {
            "type": "null"
          }
        ]
      },
      "expires_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Cuándo caduca una invitación pendiente"
          },
          {
            "type": "null"
          }
        ]
      },
      "confirmed_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Cuándo pasó la dirección a estar activa"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}
POST /recipients/:id/resend.json Reenviar una invitación de informe pendiente email_report_recipients_resend

Envía de nuevo la invitación con enlaces nuevos. Se permite una vez cada 7 días por dirección y por informe.

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/recipients/:id/resend.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del destinatario, p. ej. rcp_7Q2K9XH3AB"
    },
    "email": {
      "type": "string",
      "description": "La dirección"
    },
    "status": {
      "type": "string",
      "description": "active, pending, declined o unsubscribed"
    },
    "invited_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se envió la última invitación"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo caduca una invitación pendiente"
        },
        {
          "type": "null"
        }
      ]
    },
    "confirmed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo pasó la dirección a estar activa"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /workspaces/:workspace_id/reports.json Crear un informe por correo email_reports_create

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/reports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios (pa_…) incluidos en el informe"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly (en un día de la semana) o monthly (el día 1)",
      "enum": [
        "daily",
        "weekly",
        "monthly"
      ]
    },
    "hour": {
      "type": "integer",
      "description": "Hora del día de envío (de 0 a 23, zona horaria del espacio de trabajo)"
    },
    "weekday": {
      "type": "integer",
      "description": "Informes semanales: 0 = domingo … 6 = sábado"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Direcciones de correo (no hace falta cuenta). Las entradas pueden separarse con comas o saltos de línea. Los miembros del espacio de trabajo se añaden al momento. Los demás reciben una invitación y solo reciben informes después de aceptarla. Se rechazan las direcciones que se dieron de baja de los informes"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Contenido: kpis, chart, pages, sources, goals, campaigns, vitals, uptime"
    },
    "attach_pdf": {
      "type": "boolean",
      "description": "Adjuntar una versión en PDF"
    },
    "intro": {
      "type": "string",
      "description": "Texto de introducción personalizado (máx. 2000 caracteres)"
    },
    "enabled": {
      "type": "boolean",
      "description": "Enviar según el calendario"
    },
    "name": {
      "type": "string",
      "description": "Nombre del informe",
      "examples": [
        "Weekly traffic"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del informe, p. ej. rep_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios del informe"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly o monthly"
    },
    "hour": {
      "type": "integer",
      "description": "Hora de envío (zona horaria del espacio de trabajo)"
    },
    "weekday": {
      "type": "integer",
      "description": "Semanal: 0 = domingo … 6 = sábado"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Todas las direcciones del informe, sea cual sea su estado"
    },
    "recipient_details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id del destinatario, p. ej. rcp_7Q2K9XH3AB"
          },
          "email": {
            "type": "string",
            "description": "La dirección"
          },
          "status": {
            "type": "string",
            "description": "active, pending, declined o unsubscribed"
          },
          "invited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo se envió la última invitación"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo caduca una invitación pendiente"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo pasó la dirección a estar activa"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "description": "Cada destinatario con su estado de suscripción (solo los destinatarios activos reciben informes)"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Bloques de contenido"
    },
    "attach_pdf": {
      "type": "boolean"
    },
    "intro": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "last_sent_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /reports/:id/deliveries.json Registro de envíos de un informe por correo email_reports_deliveries

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/reports/:id/deliveries.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Solo envíos con este estado",
      "enum": [
        "sent",
        "test",
        "failed",
        "skipped"
      ]
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "status": {
        "type": "string",
        "description": "sent, test, failed o skipped"
      },
      "recipients_count": {
        "type": "integer"
      },
      "error": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "sent_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
DELETE /reports/:id.json Eliminar un informe por correo email_reports_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/reports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del informe, p. ej. rep_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios del informe"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly o monthly"
    },
    "hour": {
      "type": "integer",
      "description": "Hora de envío (zona horaria del espacio de trabajo)"
    },
    "weekday": {
      "type": "integer",
      "description": "Semanal: 0 = domingo … 6 = sábado"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Todas las direcciones del informe, sea cual sea su estado"
    },
    "recipient_details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id del destinatario, p. ej. rcp_7Q2K9XH3AB"
          },
          "email": {
            "type": "string",
            "description": "La dirección"
          },
          "status": {
            "type": "string",
            "description": "active, pending, declined o unsubscribed"
          },
          "invited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo se envió la última invitación"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo caduca una invitación pendiente"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo pasó la dirección a estar activa"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "description": "Cada destinatario con su estado de suscripción (solo los destinatarios activos reciben informes)"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Bloques de contenido"
    },
    "attach_pdf": {
      "type": "boolean"
    },
    "intro": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "last_sent_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/reports.json Listar informes por correo email_reports_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/reports.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "frequency": {
      "type": "string",
      "description": "Solo informes con esta frecuencia",
      "enum": [
        "daily",
        "weekly",
        "monthly"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del informe, p. ej. rep_7Q2K9XH3AB"
      },
      "name": {
        "type": "string"
      },
      "site_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Ids de sitios del informe"
      },
      "frequency": {
        "type": "string",
        "description": "daily, weekly o monthly"
      },
      "hour": {
        "type": "integer",
        "description": "Hora de envío (zona horaria del espacio de trabajo)"
      },
      "weekday": {
        "type": "integer",
        "description": "Semanal: 0 = domingo … 6 = sábado"
      },
      "recipients": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Todas las direcciones del informe, sea cual sea su estado"
      },
      "recipient_details": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Id del destinatario, p. ej. rcp_7Q2K9XH3AB"
            },
            "email": {
              "type": "string",
              "description": "La dirección"
            },
            "status": {
              "type": "string",
              "description": "active, pending, declined o unsubscribed"
            },
            "invited_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Cuándo se envió la última invitación"
                },
                {
                  "type": "null"
                }
              ]
            },
            "expires_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Cuándo caduca una invitación pendiente"
                },
                {
                  "type": "null"
                }
              ]
            },
            "confirmed_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "description": "Cuándo pasó la dirección a estar activa"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "description": "Cada destinatario con su estado de suscripción (solo los destinatarios activos reciben informes)"
      },
      "blocks": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Bloques de contenido"
      },
      "attach_pdf": {
        "type": "boolean"
      },
      "intro": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "enabled": {
        "type": "boolean"
      },
      "last_sent_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "next_run_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /reports/:id/send_test.json Enviar ahora un informe por correo como prueba email_reports_send_test

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/reports/:id/send_test.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "recipient": {
      "type": "string",
      "description": "Enviar la prueba aquí (por defecto: tu correo)"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "sent, test, failed o skipped"
    },
    "recipients_count": {
      "type": "integer"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "sent_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /reports/:id.json Obtener un informe por correo email_reports_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/reports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del informe, p. ej. rep_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios del informe"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly o monthly"
    },
    "hour": {
      "type": "integer",
      "description": "Hora de envío (zona horaria del espacio de trabajo)"
    },
    "weekday": {
      "type": "integer",
      "description": "Semanal: 0 = domingo … 6 = sábado"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Todas las direcciones del informe, sea cual sea su estado"
    },
    "recipient_details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id del destinatario, p. ej. rcp_7Q2K9XH3AB"
          },
          "email": {
            "type": "string",
            "description": "La dirección"
          },
          "status": {
            "type": "string",
            "description": "active, pending, declined o unsubscribed"
          },
          "invited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo se envió la última invitación"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo caduca una invitación pendiente"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo pasó la dirección a estar activa"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "description": "Cada destinatario con su estado de suscripción (solo los destinatarios activos reciben informes)"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Bloques de contenido"
    },
    "attach_pdf": {
      "type": "boolean"
    },
    "intro": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "last_sent_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /reports/:id.json Actualizar un informe por correo email_reports_update

Permiso: content.write

Ejemplo
curl -X PATCH https://privatusanalytics.com/reports/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios (pa_…) incluidos en el informe"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly (en un día de la semana) o monthly (el día 1)",
      "enum": [
        "daily",
        "weekly",
        "monthly"
      ]
    },
    "hour": {
      "type": "integer",
      "description": "Hora del día de envío (de 0 a 23, zona horaria del espacio de trabajo)"
    },
    "weekday": {
      "type": "integer",
      "description": "Informes semanales: 0 = domingo … 6 = sábado"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Direcciones de correo (no hace falta cuenta). Las entradas pueden separarse con comas o saltos de línea. Los miembros del espacio de trabajo se añaden al momento. Los demás reciben una invitación y solo reciben informes después de aceptarla. Se rechazan las direcciones que se dieron de baja de los informes"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Contenido: kpis, chart, pages, sources, goals, campaigns, vitals, uptime"
    },
    "attach_pdf": {
      "type": "boolean",
      "description": "Adjuntar una versión en PDF"
    },
    "intro": {
      "type": "string",
      "description": "Texto de introducción personalizado (máx. 2000 caracteres)"
    },
    "enabled": {
      "type": "boolean",
      "description": "Enviar según el calendario"
    },
    "name": {
      "type": "string",
      "description": "Nombre del informe"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del informe, p. ej. rep_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios del informe"
    },
    "frequency": {
      "type": "string",
      "description": "daily, weekly o monthly"
    },
    "hour": {
      "type": "integer",
      "description": "Hora de envío (zona horaria del espacio de trabajo)"
    },
    "weekday": {
      "type": "integer",
      "description": "Semanal: 0 = domingo … 6 = sábado"
    },
    "recipients": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Todas las direcciones del informe, sea cual sea su estado"
    },
    "recipient_details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id del destinatario, p. ej. rcp_7Q2K9XH3AB"
          },
          "email": {
            "type": "string",
            "description": "La dirección"
          },
          "status": {
            "type": "string",
            "description": "active, pending, declined o unsubscribed"
          },
          "invited_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo se envió la última invitación"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo caduca una invitación pendiente"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "description": "Cuándo pasó la dirección a estar activa"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "description": "Cada destinatario con su estado de suscripción (solo los destinatarios activos reciben informes)"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Bloques de contenido"
    },
    "attach_pdf": {
      "type": "boolean"
    },
    "intro": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "last_sent_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /reports/invites/:token/accept.json Aceptar una invitación a un informe report_invites_accept

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/reports/invites/:token/accept.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token del recurso"
    }
  },
  "required": [
    "token"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del destinatario, p. ej. rcp_7Q2K9XH3AB"
    },
    "email": {
      "type": "string",
      "description": "La dirección"
    },
    "status": {
      "type": "string",
      "description": "active, pending, declined o unsubscribed"
    },
    "invited_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se envió la última invitación"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo caduca una invitación pendiente"
        },
        {
          "type": "null"
        }
      ]
    },
    "confirmed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo pasó la dirección a estar activa"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /reports/invites/:token/decline.json Rechazar una invitación a un informe report_invites_decline

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/reports/invites/:token/decline.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token del recurso"
    }
  },
  "required": [
    "token"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del destinatario, p. ej. rcp_7Q2K9XH3AB"
    },
    "email": {
      "type": "string",
      "description": "La dirección"
    },
    "status": {
      "type": "string",
      "description": "active, pending, declined o unsubscribed"
    },
    "invited_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se envió la última invitación"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo caduca una invitación pendiente"
        },
        {
          "type": "null"
        }
      ]
    },
    "confirmed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo pasó la dirección a estar activa"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /reports/resubscribe/:token.json Volver a recibir informes después de darse de baja report_resubscribes_confirm

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/reports/resubscribe/:token.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token del recurso"
    }
  },
  "required": [
    "token"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /reports/unsubscribe/:token/resubscribe.json Enviar a una dirección un enlace para volver a recibir informes report_resubscribes_create

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/reports/unsubscribe/:token/resubscribe.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token del recurso"
    }
  },
  "required": [
    "token"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /reports/unsubscribe/:token.json Dar de baja una dirección de un informe por correo report_unsubscribes_create

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/reports/unsubscribe/:token.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token del recurso"
    }
  },
  "required": [
    "token"
  ]
}
Datos de respuesta
{
  "type": "object"
}

Miembros

POST /workspaces/:workspace_id/invitations.json Invitar a personas por correo invitations_create

Permiso: members.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/invitations.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "emails": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Direcciones de correo a invitar"
    },
    "role": {
      "type": "string",
      "description": "Rol de los nuevos miembros (custom necesita custom_role_id)",
      "enum": [
        "admin",
        "editor",
        "analyst",
        "viewer",
        "billing",
        "custom"
      ],
      "default": "viewer"
    },
    "custom_role_id": {
      "type": "string",
      "description": "Id del rol personalizado (Business)"
    },
    "all_sites": {
      "type": "boolean",
      "description": "Acceso a todos los sitios, incluidos los futuros",
      "default": true
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios (pa_…) cuando all_sites es false",
      "default": []
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "emails",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "email": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "custom_role": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "all_sites": {
      "type": "boolean"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "invited_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /workspaces/:workspace_id/invitations/:id.json Revocar una invitación pendiente invitations_delete

Permiso: members.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/invitations/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "email": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "custom_role": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "all_sites": {
      "type": "boolean"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "invited_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/invitations.json Listar invitaciones pendientes invitations_list

Permiso: members.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/invitations.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "email": {
        "type": "string"
      },
      "role": {
        "type": "string"
      },
      "custom_role": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "all_sites": {
        "type": "boolean"
      },
      "site_ids": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "invited_by": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "expires_at": {
        "type": "string",
        "format": "date-time"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
DELETE /workspaces/:workspace_id/members/:id.json Eliminar a un miembro (o abandonar el espacio de trabajo) members_delete

Permiso: member

Ejemplo
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/members/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id del miembro (úsalo para actualizar o eliminar al miembro)"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "role": {
      "type": "string",
      "description": "owner, admin, editor, analyst, viewer, billing o custom"
    },
    "custom_role": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre del rol personalizado"
        },
        {
          "type": "null"
        }
      ]
    },
    "custom_role_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "all_sites": {
      "type": "boolean",
      "description": "Acceso a todos los sitios"
    },
    "include_future_sites": {
      "type": "boolean"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios cuando all_sites es false"
    },
    "two_factor": {
      "type": "boolean",
      "description": "Tiene 2FA o una passkey"
    },
    "last_active_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Se unió el"
    }
  }
}
GET /workspaces/:workspace_id/members.json Listar los miembros del espacio de trabajo members_list

Permiso: member

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/members.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Filtrar por nombre o correo"
    },
    "role": {
      "type": "string",
      "description": "Solo miembros con este rol",
      "enum": [
        "owner",
        "admin",
        "editor",
        "analyst",
        "viewer",
        "billing",
        "custom"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid",
        "description": "Id del miembro (úsalo para actualizar o eliminar al miembro)"
      },
      "email": {
        "type": "string"
      },
      "name": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "role": {
        "type": "string",
        "description": "owner, admin, editor, analyst, viewer, billing o custom"
      },
      "custom_role": {
        "anyOf": [
          {
            "type": "string",
            "description": "Nombre del rol personalizado"
          },
          {
            "type": "null"
          }
        ]
      },
      "custom_role_id": {
        "anyOf": [
          {
            "type": "string",
            "format": "uuid"
          },
          {
            "type": "null"
          }
        ]
      },
      "all_sites": {
        "type": "boolean",
        "description": "Acceso a todos los sitios"
      },
      "include_future_sites": {
        "type": "boolean"
      },
      "site_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Ids de sitios cuando all_sites es false"
      },
      "two_factor": {
        "type": "boolean",
        "description": "Tiene 2FA o una passkey"
      },
      "last_active_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "description": "Se unió el"
      }
    }
  }
}
PATCH /workspaces/:workspace_id/members/:id.json Cambiar el rol o el acceso a sitios de un miembro members_update

Permiso: members.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/members/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "role": {
      "type": "string",
      "description": "Nuevo rol (custom necesita custom_role_id)",
      "enum": [
        "admin",
        "editor",
        "analyst",
        "viewer",
        "billing",
        "custom"
      ]
    },
    "custom_role_id": {
      "type": "string",
      "description": "Id del rol personalizado (Business)"
    },
    "all_sites": {
      "type": "boolean",
      "description": "Acceso a todos los sitios, incluidos los futuros"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios (pa_…) cuando all_sites es false"
    },
    "include_future_sites": {
      "type": "boolean",
      "description": "Conceder también los sitios añadidos más adelante"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id del miembro (úsalo para actualizar o eliminar al miembro)"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "role": {
      "type": "string",
      "description": "owner, admin, editor, analyst, viewer, billing o custom"
    },
    "custom_role": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre del rol personalizado"
        },
        {
          "type": "null"
        }
      ]
    },
    "custom_role_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "all_sites": {
      "type": "boolean",
      "description": "Acceso a todos los sitios"
    },
    "include_future_sites": {
      "type": "boolean"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios cuando all_sites es false"
    },
    "two_factor": {
      "type": "boolean",
      "description": "Tiene 2FA o una passkey"
    },
    "last_active_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Se unió el"
    }
  }
}
POST /workspaces/:workspace_id/ownership_transfer.json Transferir la propiedad del espacio de trabajo a otro miembro (solo el propietario, tú pasas a ser administrador) ownership_transfers_create

Permiso: member

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/ownership_transfer.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "membership_id": {
      "type": "string",
      "description": "Id de miembro del nuevo propietario"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "membership_id",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id del miembro (úsalo para actualizar o eliminar al miembro)"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "role": {
      "type": "string",
      "description": "owner, admin, editor, analyst, viewer, billing o custom"
    },
    "custom_role": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre del rol personalizado"
        },
        {
          "type": "null"
        }
      ]
    },
    "custom_role_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "all_sites": {
      "type": "boolean",
      "description": "Acceso a todos los sitios"
    },
    "include_future_sites": {
      "type": "boolean"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de sitios cuando all_sites es false"
    },
    "two_factor": {
      "type": "boolean",
      "description": "Tiene 2FA o una passkey"
    },
    "last_active_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Se unió el"
    }
  }
}

Notas

POST /sites/:site_id/notes.json Añadir una nota a un sitio (usa la fuente "deploy" para webhooks de lanzamientos) notes_create

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/notes.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Día de la nota (zona horaria del sitio). Por defecto hoy"
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Último día, para un rango de fechas"
    },
    "title": {
      "type": "string",
      "description": "Título corto que se muestra en los gráficos",
      "examples": [
        "Launched new pricing"
      ]
    },
    "body": {
      "type": "string",
      "description": "Detalles (Markdown)"
    },
    "url": {
      "type": "string",
      "description": "Enlace, p. ej. un PR o el registro de cambios"
    },
    "color": {
      "type": "string",
      "description": "Color del marcador",
      "enum": [
        "neutral",
        "brand",
        "blue",
        "amber",
        "red",
        "violet"
      ]
    },
    "source": {
      "type": "string",
      "description": "manual, o deploy para webhooks de lanzamientos",
      "enum": [
        "manual",
        "deploy",
        "system",
        "import",
        "incident"
      ],
      "default": "manual"
    },
    "version": {
      "type": "string",
      "description": "Despliegues: versión de lanzamiento o commit, usado para el título por defecto"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la nota, p. ej. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio, o null para notas de todo el espacio de trabajo"
        },
        {
          "type": "null"
        }
      ]
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "end_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Markdown"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "color": {
      "type": "string",
      "description": "neutral, brand, blue, amber, red, violet"
    },
    "source": {
      "type": "string",
      "description": "manual, deploy, system, import, incident"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/notes/:id.json Eliminar una nota notes_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/notes/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la nota, p. ej. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio, o null para notas de todo el espacio de trabajo"
        },
        {
          "type": "null"
        }
      ]
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "end_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Markdown"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "color": {
      "type": "string",
      "description": "neutral, brand, blue, amber, red, violet"
    },
    "source": {
      "type": "string",
      "description": "manual, deploy, system, import, incident"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/notes.json Listar las notas de un sitio (incluidas las notas de todo el espacio de trabajo) notes_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/notes.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "format": "date",
      "description": "Solo notas de esta fecha o posteriores"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Solo notas de esta fecha o anteriores"
    },
    "source": {
      "type": "string",
      "description": "Solo notas de esta fuente",
      "enum": [
        "manual",
        "deploy",
        "system",
        "import",
        "incident"
      ]
    },
    "query": {
      "type": "string",
      "description": "Buscar en título, cuerpo y enlace"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la nota, p. ej. note_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Sitio, o null para notas de todo el espacio de trabajo"
          },
          {
            "type": "null"
          }
        ]
      },
      "date": {
        "type": "string",
        "format": "date"
      },
      "end_date": {
        "anyOf": [
          {
            "type": "string",
            "format": "date"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": {
        "type": "string"
      },
      "body": {
        "anyOf": [
          {
            "type": "string",
            "description": "Markdown"
          },
          {
            "type": "null"
          }
        ]
      },
      "url": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "color": {
        "type": "string",
        "description": "neutral, brand, blue, amber, red, violet"
      },
      "source": {
        "type": "string",
        "description": "manual, deploy, system, import, incident"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /sites/:site_id/notes/:id.json Obtener una nota notes_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/notes/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la nota, p. ej. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio, o null para notas de todo el espacio de trabajo"
        },
        {
          "type": "null"
        }
      ]
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "end_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Markdown"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "color": {
      "type": "string",
      "description": "neutral, brand, blue, amber, red, violet"
    },
    "source": {
      "type": "string",
      "description": "manual, deploy, system, import, incident"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /sites/:site_id/notes/:id.json Editar una nota notes_update

Permiso: content.write

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/notes/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Día de la nota"
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Último día, para un rango de fechas"
    },
    "title": {
      "type": "string",
      "description": "Título corto que se muestra en los gráficos"
    },
    "body": {
      "type": "string",
      "description": "Detalles (Markdown)"
    },
    "url": {
      "type": "string",
      "description": "Enlace"
    },
    "color": {
      "type": "string",
      "description": "Color del marcador",
      "enum": [
        "neutral",
        "brand",
        "blue",
        "amber",
        "red",
        "violet"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la nota, p. ej. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio, o null para notas de todo el espacio de trabajo"
        },
        {
          "type": "null"
        }
      ]
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "end_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Markdown"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "color": {
      "type": "string",
      "description": "neutral, brand, blue, amber, red, violet"
    },
    "source": {
      "type": "string",
      "description": "manual, deploy, system, import, incident"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /workspaces/:workspace_id/notes.json Añadir una nota de todo el espacio de trabajo (se muestra en todos los sitios) workspace_notes_create

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/notes.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Día de la nota (zona horaria del sitio). Por defecto hoy"
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Último día, para un rango de fechas"
    },
    "title": {
      "type": "string",
      "description": "Título corto que se muestra en los gráficos",
      "examples": [
        "Launched new pricing"
      ]
    },
    "body": {
      "type": "string",
      "description": "Detalles (Markdown)"
    },
    "url": {
      "type": "string",
      "description": "Enlace, p. ej. un PR o el registro de cambios"
    },
    "color": {
      "type": "string",
      "description": "Color del marcador",
      "enum": [
        "neutral",
        "brand",
        "blue",
        "amber",
        "red",
        "violet"
      ]
    },
    "source": {
      "type": "string",
      "description": "manual, o deploy para webhooks de lanzamientos",
      "enum": [
        "manual",
        "deploy",
        "system",
        "import",
        "incident"
      ],
      "default": "manual"
    },
    "version": {
      "type": "string",
      "description": "Despliegues: versión de lanzamiento o commit, usado para el título por defecto"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la nota, p. ej. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio, o null para notas de todo el espacio de trabajo"
        },
        {
          "type": "null"
        }
      ]
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "end_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Markdown"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "color": {
      "type": "string",
      "description": "neutral, brand, blue, amber, red, violet"
    },
    "source": {
      "type": "string",
      "description": "manual, deploy, system, import, incident"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /workspaces/:workspace_id/notes/:id.json Eliminar una nota del espacio de trabajo workspace_notes_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/notes/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la nota, p. ej. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio, o null para notas de todo el espacio de trabajo"
        },
        {
          "type": "null"
        }
      ]
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "end_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Markdown"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "color": {
      "type": "string",
      "description": "neutral, brand, blue, amber, red, violet"
    },
    "source": {
      "type": "string",
      "description": "manual, deploy, system, import, incident"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/notes.json Listar las notas de un espacio de trabajo workspace_notes_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/notes.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "format": "date",
      "description": "Solo notas de esta fecha o posteriores"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Solo notas de esta fecha o anteriores"
    },
    "source": {
      "type": "string",
      "description": "Solo notas de esta fuente",
      "enum": [
        "manual",
        "deploy",
        "system",
        "import",
        "incident"
      ]
    },
    "query": {
      "type": "string",
      "description": "Buscar en título, cuerpo y enlace"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la nota, p. ej. note_7Q2K9XH3AB"
      },
      "site_id": {
        "anyOf": [
          {
            "type": "string",
            "description": "Sitio, o null para notas de todo el espacio de trabajo"
          },
          {
            "type": "null"
          }
        ]
      },
      "date": {
        "type": "string",
        "format": "date"
      },
      "end_date": {
        "anyOf": [
          {
            "type": "string",
            "format": "date"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": {
        "type": "string"
      },
      "body": {
        "anyOf": [
          {
            "type": "string",
            "description": "Markdown"
          },
          {
            "type": "null"
          }
        ]
      },
      "url": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "color": {
        "type": "string",
        "description": "neutral, brand, blue, amber, red, violet"
      },
      "source": {
        "type": "string",
        "description": "manual, deploy, system, import, incident"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
PATCH /workspaces/:workspace_id/notes/:id.json Editar una nota del espacio de trabajo workspace_notes_update

Permiso: content.write

Ejemplo
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/notes/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Día de la nota"
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Último día, para un rango de fechas"
    },
    "title": {
      "type": "string",
      "description": "Título corto que se muestra en los gráficos"
    },
    "body": {
      "type": "string",
      "description": "Detalles (Markdown)"
    },
    "url": {
      "type": "string",
      "description": "Enlace"
    },
    "color": {
      "type": "string",
      "description": "Color del marcador",
      "enum": [
        "neutral",
        "brand",
        "blue",
        "amber",
        "red",
        "violet"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la nota, p. ej. note_7Q2K9XH3AB"
    },
    "site_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Sitio, o null para notas de todo el espacio de trabajo"
        },
        {
          "type": "null"
        }
      ]
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "end_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Markdown"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "color": {
      "type": "string",
      "description": "neutral, brand, blue, amber, red, violet"
    },
    "source": {
      "type": "string",
      "description": "manual, deploy, system, import, incident"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Objetivos

POST /sites/:site_id/goals/:id/archive.json Archivar un objetivo (se oculta de los informes) goals_archive

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/archive.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del objetivo, p. ej. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound o download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob o regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Patrón de ruta, dominio o archivo"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Restricción de nombre de host (objetivos de página)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre del evento personalizado (objetivos de evento)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Condiciones de propiedades del evento"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: % de desplazamiento"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: segundos en la página"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed o revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Valor fijo en unidades menores"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit o every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Eventos coincidentes, repeticiones incluidas"
            },
            "conversions": {
              "type": "integer",
              "description": "Visitas con al menos una finalización"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversiones ÷ visitas (o ÷ visitantes, según el ajuste del sitio), %"
            },
            "value": {
              "type": "integer",
              "description": "Valor del objetivo en unidades menores de la moneda del sitio"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Variación de las conversiones frente al periodo anterior, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Estadísticas del periodo (solo en la lista)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/goals.json Crear un objetivo goals_create

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/goals.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del objetivo",
      "examples": [
        "Signed up"
      ]
    },
    "kind": {
      "type": "string",
      "description": "page (visitar una página), event (evento personalizado), engagement (desplazamiento o tiempo en la página), outbound (clic en un enlace externo) o download (descarga de archivo)",
      "enum": [
        "page",
        "event",
        "engagement",
        "outbound",
        "download"
      ]
    },
    "match_type": {
      "type": "string",
      "description": "Cómo pattern coincide con la ruta (page, engagement), el dominio del enlace (outbound) o el archivo (download): exact, prefix, glob (*) o regex",
      "enum": [
        "exact",
        "prefix",
        "glob",
        "regex"
      ],
      "default": "exact"
    },
    "pattern": {
      "type": "string",
      "description": "Patrón de ruta, dominio o archivo, p. ej. /pricing, /blog/*, stripe.com o *.pdf"
    },
    "hostname": {
      "type": "string",
      "description": "Contar solo las páginas de este nombre de host (objetivos de página)"
    },
    "event_name": {
      "type": "string",
      "description": "Nombre del evento personalizado (objetivos de evento)"
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Condiciones de propiedades del evento: [{\"key\": \"plan\", \"operator\": \"is|is_not|contains|gt|lt\", \"value\": \"pro\"}]",
      "default": []
    },
    "scroll_threshold": {
      "type": "integer",
      "description": "Engagement: % de profundidad de desplazamiento a alcanzar"
    },
    "time_threshold_seconds": {
      "type": "integer",
      "description": "Engagement: segundos en la página"
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed (fixed_value por conversión) o revenue (los ingresos del evento)",
      "enum": [
        "none",
        "fixed",
        "revenue"
      ],
      "default": "none"
    },
    "fixed_value": {
      "type": "number",
      "description": "Valor fijo por conversión en la moneda del sitio, p. ej. 50.0"
    },
    "count_mode": {
      "type": "string",
      "description": "El valor cuenta once_per_visit o every completion",
      "enum": [
        "once_per_visit",
        "every"
      ],
      "default": "once_per_visit"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "kind",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del objetivo, p. ej. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound o download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob o regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Patrón de ruta, dominio o archivo"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Restricción de nombre de host (objetivos de página)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre del evento personalizado (objetivos de evento)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Condiciones de propiedades del evento"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: % de desplazamiento"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: segundos en la página"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed o revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Valor fijo en unidades menores"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit o every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Eventos coincidentes, repeticiones incluidas"
            },
            "conversions": {
              "type": "integer",
              "description": "Visitas con al menos una finalización"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversiones ÷ visitas (o ÷ visitantes, según el ajuste del sitio), %"
            },
            "value": {
              "type": "integer",
              "description": "Valor del objetivo en unidades menores de la moneda del sitio"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Variación de las conversiones frente al periodo anterior, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Estadísticas del periodo (solo en la lista)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/goals/:id.json Eliminar un objetivo (los datos se conservan) goals_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/goals/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del objetivo, p. ej. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound o download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob o regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Patrón de ruta, dominio o archivo"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Restricción de nombre de host (objetivos de página)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre del evento personalizado (objetivos de evento)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Condiciones de propiedades del evento"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: % de desplazamiento"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: segundos en la página"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed o revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Valor fijo en unidades menores"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit o every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Eventos coincidentes, repeticiones incluidas"
            },
            "conversions": {
              "type": "integer",
              "description": "Visitas con al menos una finalización"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversiones ÷ visitas (o ÷ visitantes, según el ajuste del sitio), %"
            },
            "value": {
              "type": "integer",
              "description": "Valor del objetivo en unidades menores de la moneda del sitio"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Variación de las conversiones frente al periodo anterior, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Estadísticas del periodo (solo en la lista)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/goals/:id/duplicate.json Copiar un objetivo goals_duplicate

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/duplicate.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre de la copia"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del objetivo, p. ej. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound o download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob o regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Patrón de ruta, dominio o archivo"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Restricción de nombre de host (objetivos de página)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre del evento personalizado (objetivos de evento)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Condiciones de propiedades del evento"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: % de desplazamiento"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: segundos en la página"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed o revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Valor fijo en unidades menores"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit o every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Eventos coincidentes, repeticiones incluidas"
            },
            "conversions": {
              "type": "integer",
              "description": "Visitas con al menos una finalización"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversiones ÷ visitas (o ÷ visitantes, según el ajuste del sitio), %"
            },
            "value": {
              "type": "integer",
              "description": "Valor del objetivo en unidades menores de la moneda del sitio"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Variación de las conversiones frente al periodo anterior, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Estadísticas del periodo (solo en la lista)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/goals.json Listar objetivos con finalizaciones, conversiones, tasa y valor de un periodo goals_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/goals.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "status": {
      "type": "string",
      "description": "Objetivos active, archived o all",
      "enum": [
        "active",
        "archived",
        "all"
      ],
      "default": "active"
    },
    "page": {
      "type": "integer",
      "description": "Número de página",
      "default": 1
    },
    "per_page": {
      "type": "integer",
      "description": "Objetivos por página (máx. 100)",
      "default": 25
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del objetivo, p. ej. goal_7Q2K9XH3AB"
      },
      "name": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "description": "page, event, engagement, outbound o download"
      },
      "match_type": {
        "type": "string",
        "description": "exact, prefix, glob o regex"
      },
      "pattern": {
        "anyOf": [
          {
            "type": "string",
            "description": "Patrón de ruta, dominio o archivo"
          },
          {
            "type": "null"
          }
        ]
      },
      "hostname": {
        "anyOf": [
          {
            "type": "string",
            "description": "Restricción de nombre de host (objetivos de página)"
          },
          {
            "type": "null"
          }
        ]
      },
      "event_name": {
        "anyOf": [
          {
            "type": "string",
            "description": "Nombre del evento personalizado (objetivos de evento)"
          },
          {
            "type": "null"
          }
        ]
      },
      "conditions": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Condiciones de propiedades del evento"
      },
      "scroll_threshold": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Engagement: % de desplazamiento"
          },
          {
            "type": "null"
          }
        ]
      },
      "time_threshold_seconds": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Engagement: segundos en la página"
          },
          {
            "type": "null"
          }
        ]
      },
      "value_mode": {
        "type": "string",
        "description": "none, fixed o revenue"
      },
      "fixed_value_minor": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Valor fijo en unidades menores"
          },
          {
            "type": "null"
          }
        ]
      },
      "count_mode": {
        "type": "string",
        "description": "once_per_visit o every"
      },
      "archived": {
        "type": "boolean"
      },
      "archived_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "stats": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "completions": {
                "type": "integer",
                "description": "Eventos coincidentes, repeticiones incluidas"
              },
              "conversions": {
                "type": "integer",
                "description": "Visitas con al menos una finalización"
              },
              "conversion_rate": {
                "type": "number",
                "description": "Conversiones ÷ visitas (o ÷ visitantes, según el ajuste del sitio), %"
              },
              "value": {
                "type": "integer",
                "description": "Valor del objetivo en unidades menores de la moneda del sitio"
              },
              "change": {
                "anyOf": [
                  {
                    "type": "number",
                    "description": "Variación de las conversiones frente al periodo anterior, %"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "description": "Estadísticas del periodo (solo en la lista)"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /sites/:site_id/goals/:id.json Informe de objetivo: métricas, gráfico, desgloses y el recorrido hasta convertir goals_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/goals/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "interval": {
      "type": "string",
      "description": "Tamaño del intervalo del gráfico",
      "enum": [
        "auto",
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "quarter",
        "year"
      ],
      "default": "auto"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "period": {
      "type": "object",
      "description": "from/to del periodo (UTC)"
    },
    "goal": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id del objetivo, p. ej. goal_7Q2K9XH3AB"
        },
        "name": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "description": "page, event, engagement, outbound o download"
        },
        "match_type": {
          "type": "string",
          "description": "exact, prefix, glob o regex"
        },
        "pattern": {
          "anyOf": [
            {
              "type": "string",
              "description": "Patrón de ruta, dominio o archivo"
            },
            {
              "type": "null"
            }
          ]
        },
        "hostname": {
          "anyOf": [
            {
              "type": "string",
              "description": "Restricción de nombre de host (objetivos de página)"
            },
            {
              "type": "null"
            }
          ]
        },
        "event_name": {
          "anyOf": [
            {
              "type": "string",
              "description": "Nombre del evento personalizado (objetivos de evento)"
            },
            {
              "type": "null"
            }
          ]
        },
        "conditions": {
          "type": "array",
          "items": {
            "type": "object"
          },
          "description": "Condiciones de propiedades del evento"
        },
        "scroll_threshold": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Engagement: % de desplazamiento"
            },
            {
              "type": "null"
            }
          ]
        },
        "time_threshold_seconds": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Engagement: segundos en la página"
            },
            {
              "type": "null"
            }
          ]
        },
        "value_mode": {
          "type": "string",
          "description": "none, fixed o revenue"
        },
        "fixed_value_minor": {
          "anyOf": [
            {
              "type": "integer",
              "description": "Valor fijo en unidades menores"
            },
            {
              "type": "null"
            }
          ]
        },
        "count_mode": {
          "type": "string",
          "description": "once_per_visit o every"
        },
        "archived": {
          "type": "boolean"
        },
        "archived_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "stats": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "completions": {
                  "type": "integer",
                  "description": "Eventos coincidentes, repeticiones incluidas"
                },
                "conversions": {
                  "type": "integer",
                  "description": "Visitas con al menos una finalización"
                },
                "conversion_rate": {
                  "type": "number",
                  "description": "Conversiones ÷ visitas (o ÷ visitantes, según el ajuste del sitio), %"
                },
                "value": {
                  "type": "integer",
                  "description": "Valor del objetivo en unidades menores de la moneda del sitio"
                },
                "change": {
                  "anyOf": [
                    {
                      "type": "number",
                      "description": "Variación de las conversiones frente al periodo anterior, %"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "description": "Estadísticas del periodo (solo en la lista)"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "La definición del objetivo"
    },
    "metrics": {
      "type": "object",
      "description": "completions, conversions, conversion_rate (%), value (unidades menores)"
    },
    "comparison_period": {
      "anyOf": [
        {
          "type": "object",
          "description": "from/to de la comparación"
        },
        {
          "type": "null"
        }
      ]
    },
    "comparison": {
      "anyOf": [
        {
          "type": "object",
          "description": "Métricas del periodo de comparación"
        },
        {
          "type": "null"
        }
      ]
    },
    "change": {
      "anyOf": [
        {
          "type": "object",
          "description": "Variación frente a la comparación, % por métrica"
        },
        {
          "type": "null"
        }
      ]
    },
    "interval": {
      "type": "string",
      "description": "Tamaño del intervalo del gráfico"
    },
    "series": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Por intervalo: date, completions, conversions, conversion_rate"
    },
    "breakdowns": {
      "type": "object",
      "description": "Valores principales por conversiones para channel, utm_campaign, entry_page, country y device: value, completions, conversions, conversion_rate"
    },
    "journey": {
      "anyOf": [
        {
          "type": "object",
          "description": "converting_visits, median_seconds_to_convert, median_pages_before y pages_before (páginas vistas antes en la visita, por visitas que convierten)"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
POST /sites/:site_id/goals/:id/unarchive.json Restaurar un objetivo archivado goals_unarchive

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/goals/:id/unarchive.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del objetivo, p. ej. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound o download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob o regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Patrón de ruta, dominio o archivo"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Restricción de nombre de host (objetivos de página)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre del evento personalizado (objetivos de evento)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Condiciones de propiedades del evento"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: % de desplazamiento"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: segundos en la página"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed o revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Valor fijo en unidades menores"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit o every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Eventos coincidentes, repeticiones incluidas"
            },
            "conversions": {
              "type": "integer",
              "description": "Visitas con al menos una finalización"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversiones ÷ visitas (o ÷ visitantes, según el ajuste del sitio), %"
            },
            "value": {
              "type": "integer",
              "description": "Valor del objetivo en unidades menores de la moneda del sitio"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Variación de las conversiones frente al periodo anterior, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Estadísticas del periodo (solo en la lista)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /sites/:site_id/goals/:id.json Actualizar un objetivo goals_update

Permiso: content.write

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/goals/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del objetivo",
      "examples": [
        "Signed up"
      ]
    },
    "kind": {
      "type": "string",
      "description": "page (visitar una página), event (evento personalizado), engagement (desplazamiento o tiempo en la página), outbound (clic en un enlace externo) o download (descarga de archivo)",
      "enum": [
        "page",
        "event",
        "engagement",
        "outbound",
        "download"
      ]
    },
    "match_type": {
      "type": "string",
      "description": "Cómo pattern coincide con la ruta (page, engagement), el dominio del enlace (outbound) o el archivo (download): exact, prefix, glob (*) o regex",
      "enum": [
        "exact",
        "prefix",
        "glob",
        "regex"
      ]
    },
    "pattern": {
      "type": "string",
      "description": "Patrón de ruta, dominio o archivo, p. ej. /pricing, /blog/*, stripe.com o *.pdf"
    },
    "hostname": {
      "type": "string",
      "description": "Contar solo las páginas de este nombre de host (objetivos de página)"
    },
    "event_name": {
      "type": "string",
      "description": "Nombre del evento personalizado (objetivos de evento)"
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Condiciones de propiedades del evento: [{\"key\": \"plan\", \"operator\": \"is|is_not|contains|gt|lt\", \"value\": \"pro\"}]"
    },
    "scroll_threshold": {
      "type": "integer",
      "description": "Engagement: % de profundidad de desplazamiento a alcanzar"
    },
    "time_threshold_seconds": {
      "type": "integer",
      "description": "Engagement: segundos en la página"
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed (fixed_value por conversión) o revenue (los ingresos del evento)",
      "enum": [
        "none",
        "fixed",
        "revenue"
      ]
    },
    "fixed_value": {
      "type": "number",
      "description": "Valor fijo por conversión en la moneda del sitio, p. ej. 50.0"
    },
    "count_mode": {
      "type": "string",
      "description": "El valor cuenta once_per_visit o every completion",
      "enum": [
        "once_per_visit",
        "every"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del objetivo, p. ej. goal_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "description": "page, event, engagement, outbound o download"
    },
    "match_type": {
      "type": "string",
      "description": "exact, prefix, glob o regex"
    },
    "pattern": {
      "anyOf": [
        {
          "type": "string",
          "description": "Patrón de ruta, dominio o archivo"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostname": {
      "anyOf": [
        {
          "type": "string",
          "description": "Restricción de nombre de host (objetivos de página)"
        },
        {
          "type": "null"
        }
      ]
    },
    "event_name": {
      "anyOf": [
        {
          "type": "string",
          "description": "Nombre del evento personalizado (objetivos de evento)"
        },
        {
          "type": "null"
        }
      ]
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Condiciones de propiedades del evento"
    },
    "scroll_threshold": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: % de desplazamiento"
        },
        {
          "type": "null"
        }
      ]
    },
    "time_threshold_seconds": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Engagement: segundos en la página"
        },
        {
          "type": "null"
        }
      ]
    },
    "value_mode": {
      "type": "string",
      "description": "none, fixed o revenue"
    },
    "fixed_value_minor": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Valor fijo en unidades menores"
        },
        {
          "type": "null"
        }
      ]
    },
    "count_mode": {
      "type": "string",
      "description": "once_per_visit o every"
    },
    "archived": {
      "type": "boolean"
    },
    "archived_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "completions": {
              "type": "integer",
              "description": "Eventos coincidentes, repeticiones incluidas"
            },
            "conversions": {
              "type": "integer",
              "description": "Visitas con al menos una finalización"
            },
            "conversion_rate": {
              "type": "number",
              "description": "Conversiones ÷ visitas (o ÷ visitantes, según el ajuste del sitio), %"
            },
            "value": {
              "type": "integer",
              "description": "Valor del objetivo en unidades menores de la moneda del sitio"
            },
            "change": {
              "anyOf": [
                {
                  "type": "number",
                  "description": "Variación de las conversiones frente al periodo anterior, %"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "Estadísticas del periodo (solo en la lista)"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Paneles

GET /workspaces/:workspace_id/dashboards/:id/cards/:index.json Datos de una tarjeta de un panel personalizado dashboards_card

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id/cards/:index.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    },
    "index": {
      "type": "string",
      "description": "Index del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id",
    "index"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /workspaces/:workspace_id/dashboards.json Crear un panel personalizado dashboards_create

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/dashboards.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del panel",
      "examples": [
        "Client: Acme"
      ]
    },
    "cards": {
      "type": "array",
      "items": {},
      "description": "Tarjetas en orden (máx. 40): [{\"type\": \"metric|chart|breakdown|goal|live|funnel|uptime|vitals\", \"site_id\": \"pa_…\", \"title\": \"opcional\", \"params\": {\"period\": \"30d\", \"metric\": \"visitors\", \"dimension\": \"page\", \"funnel_id\": \"fun_…\"}}]. Los parámetros que un tipo no usa se ignoran",
      "default": []
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del panel, p. ej. dash_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "cards": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Tarjetas en orden: [{type, site_id, title, params}]"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /workspaces/:workspace_id/dashboards/:id.json Eliminar un panel personalizado dashboards_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del panel, p. ej. dash_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "cards": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Tarjetas en orden: [{type, site_id, title, params}]"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/dashboards.json Listar paneles personalizados dashboards_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del panel, p. ej. dash_7Q2K9XH3AB"
      },
      "name": {
        "type": "string"
      },
      "cards": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Tarjetas en orden: [{type, site_id, title, params}]"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /workspaces/:workspace_id/dashboards/:id.json Obtener un panel personalizado y sus tarjetas dashboards_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del panel, p. ej. dash_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "cards": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Tarjetas en orden: [{type, site_id, title, params}]"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /workspaces/:workspace_id/dashboards/:id.json Renombrar un panel personalizado o reemplazar sus tarjetas dashboards_update

Permiso: content.write

Ejemplo
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/dashboards/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nuevo nombre (sin cambios si está vacío)"
    },
    "cards": {
      "type": "array",
      "items": {},
      "description": "Reemplaza todas las tarjetas. Tarjetas en orden (máx. 40): [{\"type\": \"metric|chart|breakdown|goal|live|funnel|uptime|vitals\", \"site_id\": \"pa_…\", \"title\": \"opcional\", \"params\": {\"period\": \"30d\", \"metric\": \"visitors\", \"dimension\": \"page\", \"funnel_id\": \"fun_…\"}}]. Los parámetros que un tipo no usa se ignoran"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del panel, p. ej. dash_7Q2K9XH3AB"
    },
    "name": {
      "type": "string"
    },
    "cards": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Tarjetas en orden: [{type, site_id, title, params}]"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Planes

GET /plans.json Listar planes, precios y límites plans_list

Permiso: public

Ejemplo
curl https://privatusanalytics.com/plans.json
Entradas
{
  "type": "object",
  "properties": {
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "free, pro, business o enterprise"
      },
      "events": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Eventos incluidos al mes (solo plan gratuito)"
          },
          {
            "type": "null"
          }
        ]
      },
      "badge_bonus": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Eventos adicionales al mes por mostrar la insignia (plan gratuito)"
          },
          {
            "type": "null"
          }
        ]
      },
      "limits": {
        "type": "object",
        "description": "Límites del plan. Null significa ilimitado"
      },
      "tiers": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "events": {
              "type": "integer",
              "description": "Eventos al mes incluidos"
            },
            "monthly": {
              "type": "integer",
              "description": "USD al mes, facturados mensualmente"
            },
            "yearly": {
              "type": "integer",
              "description": "USD al año, facturados anualmente (2 meses gratis)"
            },
            "monthly_price_id": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Id de precio de Paddle (mensual)"
                },
                {
                  "type": "null"
                }
              ]
            },
            "yearly_price_id": {
              "anyOf": [
                {
                  "type": "string",
                  "description": "Id de precio de Paddle (anual)"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "description": "Escala de precios por eventos al mes"
      },
      "contact_sales": {
        "type": "boolean",
        "description": "Precio según contrato"
      }
    }
  }
}

Programa de afiliados

GET /account/affiliate/commissions.json Listar tus comisiones de afiliado affiliate_commissions_list

Comisiones, recuperaciones por reembolso o contracargo y reversiones, de la más reciente a la más antigua. Los importes están en céntimos.

Permiso: member

Ejemplo
curl https://privatusanalytics.com/account/affiliate/commissions.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Solo las comisiones con este estado",
      "enum": [
        "pending",
        "approved",
        "paid",
        "void"
      ]
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid",
        "description": "Id de la comisión"
      },
      "kind": {
        "type": "string",
        "description": "commission, clawback (reembolso o contracargo) o reversal"
      },
      "status": {
        "type": "string",
        "description": "pending (retenida), approved (pagadera), paid o void"
      },
      "amount_cents": {
        "type": "integer",
        "description": "Tu parte en céntimos (negativa en una recuperación)"
      },
      "basis_cents": {
        "type": "integer",
        "description": "El pago neto (sin impuestos) a partir del cual se calculó, en céntimos"
      },
      "currency": {
        "type": "string",
        "description": "Código ISO de la moneda"
      },
      "earned_at": {
        "type": "string",
        "format": "date-time",
        "description": "Cuándo se produjo el pago (o el reembolso)"
      },
      "approved_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Cuándo pasó a ser pagadera"
          },
          {
            "type": "null"
          }
        ]
      },
      "paid_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time",
            "description": "Cuándo se pagó"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}
GET /account/affiliate/signup-box.json Obtener el código de tu formulario de registro de afiliado y sus resultados affiliate_signup_box_get

El código para insertar tu formulario de registro (un script y un iframe simple) para el tema elegido, los atributos que rellenan el formulario, los eventos que el script dispara en tu página y las cifras del formulario: registros pendientes de confirmar, registros confirmados y clientes de pago. available es false hasta que se apruebe tu solicitud de afiliado.

Permiso: member

Ejemplo
curl https://privatusanalytics.com/account/affiliate/signup-box.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "theme": {
      "type": "string",
      "description": "Tema del formulario: auto (se adapta al dispositivo del visitante), light o dark",
      "enum": [
        "auto",
        "light",
        "dark"
      ],
      "examples": [
        "auto"
      ],
      "default": "auto"
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "available": {
      "type": "boolean",
      "description": "Si tienes un formulario de registro (solo afiliados aprobados)"
    },
    "theme": {
      "type": "string",
      "description": "El tema para el que se creó el código"
    },
    "frame_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "La dirección del formulario, para un iframe simple"
        },
        {
          "type": "null"
        }
      ]
    },
    "script": {
      "anyOf": [
        {
          "type": "string",
          "description": "El código de inserción del script: un elemento y el script cargador"
        },
        {
          "type": "null"
        }
      ]
    },
    "iframe": {
      "anyOf": [
        {
          "type": "string",
          "description": "El código de inserción del iframe simple"
        },
        {
          "type": "null"
        }
      ]
    },
    "prefill_attributes": {
      "type": "array",
      "description": "Atributos del elemento que rellenan el formulario para los visitantes con sesión iniciada"
    },
    "events": {
      "type": "array",
      "description": "Eventos del DOM que el script dispara en el elemento"
    },
    "waiting": {
      "type": "integer",
      "description": "Registros cuyo enlace enviado por correo aún no se ha abierto"
    },
    "signups": {
      "type": "integer",
      "description": "Registros confirmados que llegaron a través del formulario"
    },
    "customers": {
      "type": "integer",
      "description": "Los que se convirtieron en clientes de pago"
    }
  }
}
GET /account/affiliate.json Obtener tu estado de afiliado, enlace de recomendación y estadísticas affiliate_get

El estado de tu solicitud de afiliado, el enlace de recomendación, los registros y clientes de pago que recomendaste y los saldos por moneda (retenido, pagadero, pagado). status es none cuando no has enviado una solicitud.

Permiso: member

Ejemplo
curl https://privatusanalytics.com/account/affiliate.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {},
  "required": []
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "none (sin solicitud), pending, approved, rejected o suspended"
    },
    "code": {
      "anyOf": [
        {
          "type": "string",
          "description": "Tu código de recomendación"
        },
        {
          "type": "null"
        }
      ]
    },
    "referral_url": {
      "anyOf": [
        {
          "type": "string",
          "description": "El enlace para compartir (solo afiliados aprobados)"
        },
        {
          "type": "null"
        }
      ]
    },
    "payout_method": {
      "anyOf": [
        {
          "type": "string",
          "description": "wise o credit"
        },
        {
          "type": "null"
        }
      ]
    },
    "rejection_reason": {
      "anyOf": [
        {
          "type": "string",
          "description": "Por qué se rechazó la última solicitud"
        },
        {
          "type": "null"
        }
      ]
    },
    "applied_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo enviaste la solicitud"
        },
        {
          "type": "null"
        }
      ]
    },
    "approved_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se aprobó la solicitud"
        },
        {
          "type": "null"
        }
      ]
    },
    "credit_blocked": {
      "anyOf": [
        {
          "type": "string",
          "description": "Por qué el crédito de cuenta está en espera: program (el espacio de trabajo está en un programa de descuento), no_subscription o no_workspace. null cuando nada lo bloquea"
        },
        {
          "type": "null"
        }
      ]
    },
    "signups": {
      "type": "integer",
      "description": "Cuentas creadas mediante tu enlace o código"
    },
    "customers": {
      "type": "integer",
      "description": "Espacios de trabajo recomendados que han pagado"
    },
    "balances": {
      "type": "array",
      "description": "Por moneda: pending_cents (retenido), approved_cents (pagadero) y paid_cents"
    },
    "payouts": {
      "type": "array",
      "description": "Pagos recientes con amount_cents, currency, payout_method, status (applied: crédito de cuenta a la espera de tu próxima renovación, o paid), applied_at y paid_at"
    },
    "terms": {
      "type": "object",
      "description": "Porcentaje de comisión, meses, días de retención y el umbral de pago por Wise en céntimos"
    }
  }
}

Páginas de estado

GET /status/:slug/confirm/:token.json Confirmar una suscripción desde el enlace enviado por correo public_status_pages_confirm

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl https://privatusanalytics.com/status/:slug/confirm/:token.json
Entradas
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token del recurso"
    },
    "slug": {
      "type": "string",
      "description": "Slug del recurso"
    }
  },
  "required": [
    "token",
    "slug"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /status/:slug.json Página de estado pública: estado actual, barras de disponibilidad de 90 días, incidentes y publicaciones public_status_pages_get

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl https://privatusanalytics.com/status/:slug.json
Entradas
{
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "description": "Slug del recurso"
    }
  },
  "required": [
    "slug"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "logo_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_color": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "operational, degraded u outage"
    },
    "checks": {
      "type": "array",
      "description": "Cada una: {name, status, uptime_90d, days: [{date, uptime, downtime_seconds}]}"
    },
    "posts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id de la publicación (spp_…)"
          },
          "title": {
            "type": "string"
          },
          "body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "description": "investigating, identified, monitoring o resolved"
          },
          "posted_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "incidents": {
      "type": "array",
      "description": "Incidentes recientes: {check, started_at, resolved_at, duration_seconds}"
    }
  }
}
POST /status/:slug/subscribers.json Suscribir una dirección de correo (doble confirmación) public_status_pages_subscribe

Los clientes de navegador envían un token de Cloudflare Turnstile como `cf-turnstile-response`. Las solicitudes con un token de API no necesitan ninguno.

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/status/:slug/subscribers.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Dirección de correo a la que avisar",
      "examples": [
        "[email protected]"
      ]
    },
    "slug": {
      "type": "string",
      "description": "Slug del recurso"
    }
  },
  "required": [
    "email",
    "slug"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /status/:slug/unsubscribe/:token.json Darse de baja con el token enviado por correo public_status_pages_unsubscribe

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/status/:slug/unsubscribe/:token.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token del recurso"
    },
    "slug": {
      "type": "string",
      "description": "Slug del recurso"
    }
  },
  "required": [
    "token",
    "slug"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /status_pages/:status_page_id/posts.json Publicar una actualización de incidente (envía un correo a los suscriptores) status_page_posts_create

Permiso: uptime.manage

Ejemplo
curl -X POST https://privatusanalytics.com/status_pages/:status_page_id/posts.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Titular, p. ej. \"Tasas de error elevadas\""
    },
    "body": {
      "type": "string",
      "description": "Texto de la actualización (texto sin formato)"
    },
    "status": {
      "type": "string",
      "description": "investigating, identified, monitoring o resolved",
      "enum": [
        "investigating",
        "identified",
        "monitoring",
        "resolved"
      ],
      "default": "investigating"
    },
    "posted_at": {
      "type": "string",
      "format": "date-time",
      "description": "Cuándo ocurrió (por defecto ahora)"
    },
    "notify": {
      "type": "boolean",
      "description": "Enviar correo a los suscriptores confirmados",
      "default": true
    },
    "status_page_id": {
      "type": "string",
      "description": "Status page del recurso"
    }
  },
  "required": [
    "title",
    "status_page_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la publicación (spp_…)"
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "investigating, identified, monitoring o resolved"
    },
    "posted_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /status_pages/:status_page_id/posts/:id.json Eliminar una publicación de una página de estado status_page_posts_delete

Permiso: uptime.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/status_pages/:status_page_id/posts/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "status_page_id": {
      "type": "string",
      "description": "Status page del recurso"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "status_page_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la publicación (spp_…)"
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "investigating, identified, monitoring o resolved"
    },
    "posted_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /status_pages/:status_page_id/posts.json Listar las publicaciones de una página de estado status_page_posts_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/status_pages/:status_page_id/posts.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Solo publicaciones con este estado",
      "enum": [
        "investigating",
        "identified",
        "monitoring",
        "resolved"
      ]
    },
    "status_page_id": {
      "type": "string",
      "description": "Status page del recurso"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "status_page_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la publicación (spp_…)"
      },
      "title": {
        "type": "string"
      },
      "body": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "status": {
        "type": "string",
        "description": "investigating, identified, monitoring o resolved"
      },
      "posted_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
PATCH /status_pages/:status_page_id/posts/:id.json Editar una publicación de una página de estado status_page_posts_update

Permiso: uptime.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/status_pages/:status_page_id/posts/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Titular"
    },
    "body": {
      "type": "string",
      "description": "Texto de la actualización (texto sin formato)"
    },
    "status": {
      "type": "string",
      "description": "investigating, identified, monitoring o resolved",
      "enum": [
        "investigating",
        "identified",
        "monitoring",
        "resolved"
      ]
    },
    "notify": {
      "type": "boolean",
      "description": "Enviar correo a los suscriptores confirmados si cambia el estado",
      "default": true
    },
    "status_page_id": {
      "type": "string",
      "description": "Status page del recurso"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "status_page_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la publicación (spp_…)"
    },
    "title": {
      "type": "string"
    },
    "body": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "investigating, identified, monitoring o resolved"
    },
    "posted_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /status_pages/:status_page_id/subscribers/:id.json Eliminar a un suscriptor status_page_subscribers_delete

Permiso: uptime.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/status_pages/:status_page_id/subscribers/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "status_page_id": {
      "type": "string",
      "description": "Status page del recurso"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "status_page_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "email": {
      "type": "string"
    },
    "confirmed_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /status_pages/:status_page_id/subscribers.json Listar los suscriptores de una página de estado status_page_subscribers_list

Permiso: uptime.manage

Ejemplo
curl https://privatusanalytics.com/status_pages/:status_page_id/subscribers.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "confirmed": {
      "type": "boolean",
      "description": "true: solo confirmados, false: solo pendientes"
    },
    "status_page_id": {
      "type": "string",
      "description": "Status page del recurso"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "status_page_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "email": {
        "type": "string"
      },
      "confirmed_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /workspaces/:workspace_id/status_pages.json Crear una página de estado status_pages_create

Permiso: uptime.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/status_pages.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Título de la página, p. ej. \"Estado de Acme\""
    },
    "slug": {
      "type": "string",
      "description": "Slug de la URL pública: /status/<slug> (por defecto a partir del nombre)"
    },
    "description": {
      "type": "string",
      "description": "Texto de introducción bajo el título"
    },
    "logo_url": {
      "type": "string",
      "description": "URL HTTPS de una imagen de logo"
    },
    "brand_color": {
      "type": "string",
      "description": "Color de acento, p. ej. #06755b"
    },
    "custom_domain": {
      "type": "string",
      "description": "Dominio personalizado (CNAME a nuestro host), p. ej. status.example.com. Vacío para quitarlo"
    },
    "check_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de comprobaciones de disponibilidad (upc_…) a mostrar"
    },
    "published": {
      "type": "boolean",
      "description": "Visible al público",
      "default": true
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la página de estado (sp_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "URL pública: /status/<slug>"
    },
    "custom_domain": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "logo_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_color": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "published": {
      "type": "boolean"
    },
    "check_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de comprobaciones de disponibilidad mostradas"
    },
    "subscribers": {
      "type": "integer",
      "description": "Suscriptores confirmados"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /status_pages/:id.json Eliminar una página de estado status_pages_delete

Permiso: uptime.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/status_pages/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la página de estado (sp_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "URL pública: /status/<slug>"
    },
    "custom_domain": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "logo_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_color": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "published": {
      "type": "boolean"
    },
    "check_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de comprobaciones de disponibilidad mostradas"
    },
    "subscribers": {
      "type": "integer",
      "description": "Suscriptores confirmados"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/status_pages.json Listar páginas de estado status_pages_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/status_pages.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Filtrar por nombre o slug"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la página de estado (sp_…)"
      },
      "workspace_id": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "slug": {
        "type": "string",
        "description": "URL pública: /status/<slug>"
      },
      "custom_domain": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "description": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "logo_url": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "brand_color": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "published": {
        "type": "boolean"
      },
      "check_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Ids de comprobaciones de disponibilidad mostradas"
      },
      "subscribers": {
        "type": "integer",
        "description": "Suscriptores confirmados"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /status_pages/:id.json Obtener una página de estado status_pages_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/status_pages/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la página de estado (sp_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "URL pública: /status/<slug>"
    },
    "custom_domain": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "logo_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_color": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "published": {
      "type": "boolean"
    },
    "check_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de comprobaciones de disponibilidad mostradas"
    },
    "subscribers": {
      "type": "integer",
      "description": "Suscriptores confirmados"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /status_pages/:id.json Cambiar una página de estado status_pages_update

Permiso: uptime.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/status_pages/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Título de la página, p. ej. \"Estado de Acme\""
    },
    "slug": {
      "type": "string",
      "description": "Slug de la URL pública: /status/<slug> (por defecto a partir del nombre)"
    },
    "description": {
      "type": "string",
      "description": "Texto de introducción bajo el título"
    },
    "logo_url": {
      "type": "string",
      "description": "URL HTTPS de una imagen de logo"
    },
    "brand_color": {
      "type": "string",
      "description": "Color de acento, p. ej. #06755b"
    },
    "custom_domain": {
      "type": "string",
      "description": "Dominio personalizado (CNAME a nuestro host), p. ej. status.example.com. Vacío para quitarlo"
    },
    "check_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de comprobaciones de disponibilidad (upc_…) a mostrar"
    },
    "published": {
      "type": "boolean",
      "description": "Visible al público"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la página de estado (sp_…)"
    },
    "workspace_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "URL pública: /status/<slug>"
    },
    "custom_domain": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "logo_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_color": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "published": {
      "type": "boolean"
    },
    "check_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ids de comprobaciones de disponibilidad mostradas"
    },
    "subscribers": {
      "type": "integer",
      "description": "Suscriptores confirmados"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Rastreadores

POST /sites/:site_id/crawlers/connection.json Sincronizar visitas de rastreadores de IA desde una zona de Cloudflare (requiere un permiso de Cloudflare desde el navegador) crawlers_cloudflare_connect

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/crawlers/connection.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "zone_id": {
      "type": "string",
      "description": "Id de la zona de Cloudflare, de crawlers_cloudflare_zones",
      "examples": [
        "023e105f4ecef8ad9ca31a8372d0c353"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "zone_id",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "zone_id": {
      "type": "string",
      "description": "Id de la zona de Cloudflare"
    },
    "zone_name": {
      "type": "string",
      "description": "Nombre de la zona de Cloudflare, p. ej. example.com"
    },
    "status": {
      "type": "string",
      "description": "active o error"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se importaron por última vez las visitas de rastreadores, o null antes de la primera importación"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/crawlers/connection.json Desconectar Cloudflare y eliminar las visitas de rastreadores que importó crawlers_cloudflare_disconnect

Permiso: sites.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/crawlers/connection.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "zone_id": {
      "type": "string",
      "description": "Id de la zona de Cloudflare"
    },
    "zone_name": {
      "type": "string",
      "description": "Nombre de la zona de Cloudflare, p. ej. example.com"
    },
    "status": {
      "type": "string",
      "description": "active o error"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se importaron por última vez las visitas de rastreadores, o null antes de la primera importación"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/crawlers/sync.json Importar ahora las visitas de rastreadores desde Cloudflare crawlers_cloudflare_sync

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/crawlers/sync.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "zone_id": {
      "type": "string",
      "description": "Id de la zona de Cloudflare"
    },
    "zone_name": {
      "type": "string",
      "description": "Nombre de la zona de Cloudflare, p. ej. example.com"
    },
    "status": {
      "type": "string",
      "description": "active o error"
    },
    "last_synced_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "description": "Cuándo se importaron por última vez las visitas de rastreadores, o null antes de la primera importación"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/crawlers/zones.json Listar las zonas de Cloudflare que puedes conectar (requiere un permiso de Cloudflare desde el navegador) crawlers_cloudflare_zones

Permiso: sites.manage

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/crawlers/zones.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/crawlers.json Informe de rastreadores de IA: visitas por rastreador a lo largo del tiempo, rutas principales por rastreador, por categoría crawlers_report

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/crawlers.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "category": {
      "type": "string",
      "description": "ai, search, seo, other o all",
      "enum": [
        "all",
        "ai",
        "search",
        "seo",
        "other"
      ],
      "default": "ai"
    },
    "crawler": {
      "type": "string",
      "description": "Solo este rastreador, p. ej. GPTBot"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}

Recopilación

POST /api/logs.json Enviar registros de acceso del servidor para informes de rastreadores de IA (JSON {lines: [...]} o texto de registro combinado, con la clave de ingesta del sitio como token Bearer) crawler_logs_create

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/api/logs.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "lines": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ts": {
            "type": "string"
          },
          "path": {
            "type": "string",
            "default": "/"
          },
          "status": {
            "type": "integer"
          },
          "user_agent": {
            "type": "string",
            "default": ""
          }
        }
      },
      "description": "Líneas de registro: [{ts, path, status, user_agent}] (máx. 1000)"
    }
  },
  "required": [
    "lines"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /api/event.json Recopilar una visita del navegador (lo usa /js/pa.js) ingest_event

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/api/event.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site": {
      "type": "string",
      "description": "Id del sitio (pa_…)"
    },
    "type": {
      "type": "string",
      "description": "Tipo de visita",
      "enum": [
        "pageview",
        "event",
        "engagement",
        "vital",
        "click"
      ]
    },
    "url": {
      "type": "string",
      "description": "URL completa de la página"
    },
    "referrer": {
      "type": "string",
      "description": "document.referrer"
    },
    "name": {
      "type": "string",
      "description": "Nombre del evento (type=event) o nombre del vital"
    },
    "props": {
      "type": "object",
      "additionalProperties": true,
      "description": "Propiedades del evento: hasta 30 valores de tipo cadena/número/booleano",
      "default": {}
    },
    "screen_width": {
      "type": "integer",
      "description": "Ancho de pantalla en píxeles"
    },
    "language": {
      "type": "string",
      "description": "navigator.language"
    },
    "engaged_ms": {
      "type": "integer",
      "description": "Tiempo visible en la página (engagement)"
    },
    "scroll_depth": {
      "type": "integer",
      "description": "% máximo de profundidad de desplazamiento (engagement)"
    },
    "value": {
      "type": "number",
      "description": "Valor del Web Vital (type=vital)"
    },
    "selector": {
      "type": "string",
      "description": "Selector del elemento en el que se hizo clic (type=click)"
    },
    "hash_mode": {
      "type": "boolean",
      "description": "Conservar el #fragmento (sitios con rutas por hash)",
      "default": false
    },
    "dnt": {
      "type": "boolean",
      "description": "Do Not Track está activado",
      "default": false
    },
    "gpc": {
      "type": "boolean",
      "description": "Global Privacy Control está activado",
      "default": false
    },
    "interacted": {
      "type": "boolean",
      "description": "1 una vez que se detectó una entrada de confianza (puntero, tecla, toque o rueda) en la página, 0 antes. Sin coordenadas ni tiempos"
    },
    "revenue": {
      "type": "number",
      "description": "Ingresos en unidades principales, p. ej. 49.99"
    },
    "currency": {
      "type": "string",
      "description": "Moneda ISO 4217 de los ingresos"
    }
  },
  "required": [
    "site",
    "type",
    "url"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /api/events.json Recopilar eventos del lado del servidor con una clave de ingesta del sitio ingest_events

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/api/events.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Hasta 100 eventos"
    }
  },
  "required": [
    "events"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /api/pixel.json Recopilar una vista de página sin JavaScript (GIF de 1×1) ingest_pixel

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl https://privatusanalytics.com/api/pixel.json
Entradas
{
  "type": "object",
  "properties": {},
  "required": []
}
Datos de respuesta
{
  "type": "object"
}

Registro de auditoría

GET /workspaces/:workspace_id/audit_log.json Listar entradas del registro de auditoría (añade .csv para exportar) audit_logs_get

Permiso: workspace.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/audit_log.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "actor": {
      "type": "string",
      "description": "Solo cambios de este miembro (correo)"
    },
    "item_type": {
      "type": "string",
      "description": "Solo este tipo de registro, p. ej. Site"
    },
    "event": {
      "type": "string",
      "description": "Solo esta acción",
      "enum": [
        "create",
        "update",
        "destroy"
      ]
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Desde la fecha (inclusive)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Hasta la fecha (inclusive)"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "description": "Cuándo"
      },
      "event": {
        "type": "string",
        "description": "create, update o destroy"
      },
      "item_type": {
        "type": "string",
        "description": "Tipo de registro, p. ej. Site"
      },
      "item_id": {
        "type": "string",
        "format": "uuid"
      },
      "target": {
        "type": "string",
        "description": "El registro, por nombre si se conoce"
      },
      "actor_email": {
        "anyOf": [
          {
            "type": "string",
            "description": "Miembro que hizo el cambio"
          },
          {
            "type": "null"
          }
        ]
      },
      "actor_name": {
        "type": "string"
      },
      "token_name": {
        "anyOf": [
          {
            "type": "string",
            "description": "Token de API usado, si lo hubo"
          },
          {
            "type": "null"
          }
        ]
      },
      "changes": {
        "type": "object",
        "description": "Campos modificados: { field: [antes, después] }"
      },
      "ip": {
        "anyOf": [
          {
            "type": "string",
            "description": "La dirección IP del miembro"
          },
          {
            "type": "null"
          }
        ]
      }
    }
  }
}

Reglas de canal

POST /sites/:site_id/channel_rules.json Añadir una regla de canal channel_rules_create

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/channel_rules.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "channel": {
      "type": "string",
      "description": "Nombre del canal a asignar, p. ej. Partners"
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "operator": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "description": "Condiciones que deben cumplirse todas: [{\"field\": \"utm_source\", \"operator\": \"is\", \"value\": \"newsletter\"}]. Campos: referrer_host, utm_source, utm_medium, utm_campaign, ref, path. Operadores: is, contains, starts_with, regex."
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "channel",
    "conditions",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la regla"
    },
    "channel": {
      "type": "string",
      "description": "Canal asignado cuando se cumplen todas las condiciones"
    },
    "position": {
      "type": "integer",
      "description": "Orden de evaluación (gana la primera coincidencia)"
    },
    "conditions": {
      "type": "array",
      "description": "Condiciones: field, operator, value"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/channel_rules/:id.json Eliminar una regla de canal channel_rules_delete

Permiso: sites.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/channel_rules/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la regla"
    },
    "channel": {
      "type": "string",
      "description": "Canal asignado cuando se cumplen todas las condiciones"
    },
    "position": {
      "type": "integer",
      "description": "Orden de evaluación (gana la primera coincidencia)"
    },
    "conditions": {
      "type": "array",
      "description": "Condiciones: field, operator, value"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/channel_rules.json Listar las reglas de canal en orden channel_rules_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/channel_rules.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la regla"
    },
    "channel": {
      "type": "string",
      "description": "Canal asignado cuando se cumplen todas las condiciones"
    },
    "position": {
      "type": "integer",
      "description": "Orden de evaluación (gana la primera coincidencia)"
    },
    "conditions": {
      "type": "array",
      "description": "Condiciones: field, operator, value"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /sites/:site_id/channel_rules/:id/move.json Subir o bajar una regla de canal channel_rules_move

Permiso: sites.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/channel_rules/:id/move.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "direction": {
      "type": "string",
      "description": "Hacia dónde mover la regla",
      "enum": [
        "up",
        "down",
        "top",
        "bottom"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "direction",
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la regla"
    },
    "channel": {
      "type": "string",
      "description": "Canal asignado cuando se cumplen todas las condiciones"
    },
    "position": {
      "type": "integer",
      "description": "Orden de evaluación (gana la primera coincidencia)"
    },
    "conditions": {
      "type": "array",
      "description": "Condiciones: field, operator, value"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/channel_rules/preview.json Previsualizar el canal de un referente y unas etiquetas UTM de ejemplo channel_rules_preview

Permiso: analytics.read

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/channel_rules/preview.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "referrer": {
      "type": "string",
      "description": "URL o nombre de host del referente"
    },
    "utm_source": {
      "type": "string",
      "description": "Valor de utm_source"
    },
    "utm_medium": {
      "type": "string",
      "description": "Valor de utm_medium"
    },
    "utm_campaign": {
      "type": "string",
      "description": "Valor de utm_campaign"
    },
    "ref": {
      "type": "string",
      "description": "Parámetro ref / via / source"
    },
    "path": {
      "type": "string",
      "description": "Ruta de la página de destino, p. ej. /pricing"
    },
    "paid_click": {
      "type": "boolean",
      "description": "La URL tenía un id de clic como gclid",
      "default": false
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
PATCH /sites/:site_id/channel_rules/:id.json Cambiar una regla de canal channel_rules_update

Permiso: sites.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/channel_rules/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "channel": {
      "type": "string",
      "description": "Nombre del canal a asignar"
    },
    "conditions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "operator": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "description": "Condiciones que deben cumplirse todas: [{\"field\": \"utm_source\", \"operator\": \"is\", \"value\": \"newsletter\"}]. Campos: referrer_host, utm_source, utm_medium, utm_campaign, ref, path. Operadores: is, contains, starts_with, regex."
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la regla"
    },
    "channel": {
      "type": "string",
      "description": "Canal asignado cuando se cumplen todas las condiciones"
    },
    "position": {
      "type": "integer",
      "description": "Orden de evaluación (gana la primera coincidencia)"
    },
    "conditions": {
      "type": "array",
      "description": "Condiciones: field, operator, value"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Reglas de tráfico

POST /sites/:site_id/traffic_rules.json Añadir una regla de tráfico traffic_rules_create

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/traffic_rules.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "list": {
      "type": "string",
      "description": "hostnames, paths, referrers, countries, ip_ranges, user_agents o events",
      "enum": [
        "hostnames",
        "paths",
        "referrers",
        "countries",
        "ip_ranges",
        "user_agents",
        "events"
      ]
    },
    "pattern": {
      "type": "string",
      "description": "Valor a comparar. * es un comodín. ip_ranges acepta una IP o CIDR (v4/v6), countries un código ISO",
      "examples": [
        "/admin/*"
      ]
    },
    "label": {
      "type": "string",
      "description": "Nota opcional, p. ej. \"Oficina\""
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "list",
    "pattern",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la regla"
    },
    "list": {
      "type": "string",
      "description": "hostnames, paths, referrers, countries, ip_ranges, user_agents o events"
    },
    "pattern": {
      "type": "string",
      "description": "Patrón (comodines *, CIDR para ip_ranges)"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "type": "string",
      "description": "block o allow (el modo de su lista)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/traffic_rules/:id.json Eliminar una regla de tráfico traffic_rules_delete

Permiso: sites.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/traffic_rules/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la regla"
    },
    "list": {
      "type": "string",
      "description": "hostnames, paths, referrers, countries, ip_ranges, user_agents o events"
    },
    "pattern": {
      "type": "string",
      "description": "Patrón (comodines *, CIDR para ip_ranges)"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "type": "string",
      "description": "block o allow (el modo de su lista)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/traffic_rules.json Listar reglas de tráfico traffic_rules_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/traffic_rules.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "list": {
      "type": "string",
      "description": "Solo reglas de esta lista",
      "enum": [
        "hostnames",
        "paths",
        "referrers",
        "countries",
        "ip_ranges",
        "user_agents",
        "events"
      ]
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la regla"
    },
    "list": {
      "type": "string",
      "description": "hostnames, paths, referrers, countries, ip_ranges, user_agents o events"
    },
    "pattern": {
      "type": "string",
      "description": "Patrón (comodines *, CIDR para ip_ranges)"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "type": "string",
      "description": "block o allow (el modo de su lista)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/traffic_rules/test.json Probar si una visita se contaría con las reglas actuales del sitio traffic_rules_test

Permiso: analytics.read

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/traffic_rules/test.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "URL de la página, p. ej. https://example.com/a"
    },
    "referrer": {
      "type": "string",
      "description": "URL o nombre de host del referente"
    },
    "country": {
      "type": "string",
      "description": "Código de país ISO, p. ej. US"
    },
    "ip": {
      "type": "string",
      "description": "Dirección IP a probar contra ip_ranges (no se almacena)"
    },
    "user_agent": {
      "type": "string",
      "description": "Cadena User-Agent (reducida a navegador y versión principal, como en la ingesta)"
    },
    "event": {
      "type": "string",
      "description": "Nombre del evento personalizado"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
PATCH /sites/:site_id/traffic_rules/:id.json Cambiar una regla de tráfico traffic_rules_update

Permiso: sites.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/traffic_rules/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "pattern": {
      "type": "string",
      "description": "Nuevo patrón"
    },
    "label": {
      "type": "string",
      "description": "Nueva etiqueta"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de la regla"
    },
    "list": {
      "type": "string",
      "description": "hostnames, paths, referrers, countries, ip_ranges, user_agents o events"
    },
    "pattern": {
      "type": "string",
      "description": "Patrón (comodines *, CIDR para ip_ranges)"
    },
    "label": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "mode": {
      "type": "string",
      "description": "block o allow (el modo de su lista)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Rendimiento

GET /sites/:site_id/performance.json Web Vitals: cuadro de mando p75, tendencia diaria y desgloses por página, dispositivo, navegador y país performance_report

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/performance.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "period": {
      "type": "string",
      "description": "Preajuste de rango de fechas. Usa custom con from/to",
      "enum": [
        "today",
        "yesterday",
        "24h",
        "7d",
        "14d",
        "28d",
        "30d",
        "90d",
        "mtd",
        "last_month",
        "qtd",
        "last_quarter",
        "ytd",
        "12mo",
        "last_year",
        "all",
        "custom"
      ],
      "default": "30d"
    },
    "from": {
      "type": "string",
      "format": "date",
      "description": "Inicio del rango personalizado (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Fin del rango personalizado, inclusive"
    },
    "compare": {
      "type": "string",
      "description": "Periodo de comparación",
      "enum": [
        "none",
        "previous_period",
        "previous_year",
        "custom"
      ],
      "default": "none"
    },
    "compare_from": {
      "type": "string",
      "format": "date",
      "description": "Inicio de la comparación personalizada"
    },
    "compare_to": {
      "type": "string",
      "format": "date",
      "description": "Fin de la comparación personalizada"
    },
    "match_weekday": {
      "type": "boolean",
      "description": "Alinear los días de la semana de la comparación",
      "default": false
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros: [[\"dimension\",\"operator\",\"value\"], …]. Operadores: is, is_not, any_of, none_of, contains, not_contains, starts_with, regex, not_regex, gt, lt, between. Envuelve las condiciones en {\"any\": [...]} para OR.",
      "default": []
    },
    "segment_id": {
      "type": "string",
      "description": "Aplicar un segmento guardado (seg_…)"
    },
    "include_imported": {
      "type": "boolean",
      "description": "Añadir datos históricos importados (fechas anteriores al primer evento nativo, se ignora cuando se aplican filtros o un segmento)",
      "default": false
    },
    "metric": {
      "type": "string",
      "description": "Métrica para la tendencia y los desgloses",
      "enum": [
        "LCP",
        "INP",
        "CLS",
        "FCP",
        "TTFB"
      ],
      "default": "LCP"
    },
    "limit": {
      "type": "integer",
      "description": "Filas por desglose (máx. 100)",
      "default": 10
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}

Roles

POST /workspaces/:workspace_id/roles.json Crear un rol personalizado roles_create

Permiso: members.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/roles.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del rol",
      "examples": [
        "Client reviewer"
      ]
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "analytics.read",
          "analytics.export",
          "content.write",
          "sites.manage",
          "uptime.manage",
          "members.manage",
          "tokens.manage",
          "billing.manage",
          "workspace.manage"
        ]
      },
      "description": "Permisos que concede el rol"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "permissions",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id del rol personalizado (custom_role_id en los miembros)"
    },
    "name": {
      "type": "string"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Permisos concedidos"
    },
    "members": {
      "type": "integer",
      "description": "Miembros con este rol"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /workspaces/:workspace_id/roles/:id.json Eliminar un rol personalizado (no debe estar en uso) roles_delete

Permiso: members.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/roles/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id del rol personalizado (custom_role_id en los miembros)"
    },
    "name": {
      "type": "string"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Permisos concedidos"
    },
    "members": {
      "type": "integer",
      "description": "Miembros con este rol"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/roles.json Listar roles personalizados roles_list

Permiso: member

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/roles.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid",
        "description": "Id del rol personalizado (custom_role_id en los miembros)"
      },
      "name": {
        "type": "string"
      },
      "permissions": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Permisos concedidos"
      },
      "members": {
        "type": "integer",
        "description": "Miembros con este rol"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
PATCH /workspaces/:workspace_id/roles/:id.json Actualizar un rol personalizado roles_update

Permiso: members.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/roles/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del rol"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "analytics.read",
          "analytics.export",
          "content.write",
          "sites.manage",
          "uptime.manage",
          "members.manage",
          "tokens.manage",
          "billing.manage",
          "workspace.manage"
        ]
      },
      "description": "Permisos que concede el rol"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id del rol personalizado (custom_role_id en los miembros)"
    },
    "name": {
      "type": "string"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Permisos concedidos"
    },
    "members": {
      "type": "integer",
      "description": "Miembros con este rol"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

SCIM

POST /scim/v2/Users.json Aprovisionar un usuario scim_users_create

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/scim/v2/Users.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "userName": {
      "type": "string",
      "description": "Dirección de correo"
    },
    "name": {
      "type": "object",
      "additionalProperties": true,
      "description": "givenName, familyName, formatted",
      "default": {}
    },
    "active": {
      "type": "boolean",
      "description": "Miembro del espacio de trabajo",
      "default": true
    }
  },
  "required": [
    "userName"
  ]
}
Datos de respuesta
{
  "type": "object"
}
DELETE /scim/v2/Users/:id.json Desaprovisionar un usuario scim_users_delete

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X DELETE https://privatusanalytics.com/scim/v2/Users/:id.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /scim/v2/Users.json Listar usuarios aprovisionados scim_users_list

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl https://privatusanalytics.com/scim/v2/Users.json
Entradas
{
  "type": "object",
  "properties": {
    "scim_filter": {
      "type": "string",
      "description": "Filtro SCIM (parámetro de consulta `filter`), p. ej. userName eq \"[email protected]\""
    },
    "startIndex": {
      "type": "integer",
      "description": "Índice del primer resultado, empezando en 1",
      "default": 1
    },
    "count": {
      "type": "integer",
      "description": "Tamaño de página (máx. 200)",
      "default": 100
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "object"
}
GET /scim/v2/Users/:id.json Obtener un usuario aprovisionado scim_users_get

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl https://privatusanalytics.com/scim/v2/Users/:id.json
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
PATCH /scim/v2/Users/:id.json Actualizar un usuario (PATCH active, name) scim_users_update

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X PATCH https://privatusanalytics.com/scim/v2/Users/:id.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "Operations": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      },
      "description": "Operaciones PatchOp de SCIM"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "Operations",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object"
}

SSO

POST /workspaces/:workspace_id/sso/activate.json Activar una configuración de SSO probada sso_activate

Permiso: workspace.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/activate.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "saml u oidc"
    },
    "status": {
      "type": "string",
      "description": "draft, testing, tested o active"
    },
    "enforced": {
      "type": "boolean",
      "description": "SSO es la única forma de entrar (excepto el propietario)"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dominios de correo verificados"
    },
    "idp_sso_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "idp_entity_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "idp_cert_present": {
      "type": "boolean"
    },
    "oidc_issuer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "oidc_client_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "oidc_client_secret_present": {
      "type": "boolean"
    },
    "default_role": {
      "type": "string"
    },
    "jit_provisioning": {
      "type": "boolean"
    },
    "scim_enabled": {
      "type": "boolean"
    }
  }
}
POST /workspaces/:workspace_id/sso/deactivate.json Desactivar SSO (vuelve a borrador) sso_deactivate

Permiso: workspace.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/deactivate.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "saml u oidc"
    },
    "status": {
      "type": "string",
      "description": "draft, testing, tested o active"
    },
    "enforced": {
      "type": "boolean",
      "description": "SSO es la única forma de entrar (excepto el propietario)"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dominios de correo verificados"
    },
    "idp_sso_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "idp_entity_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "idp_cert_present": {
      "type": "boolean"
    },
    "oidc_issuer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "oidc_client_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "oidc_client_secret_present": {
      "type": "boolean"
    },
    "default_role": {
      "type": "string"
    },
    "jit_provisioning": {
      "type": "boolean"
    },
    "scim_enabled": {
      "type": "boolean"
    }
  }
}
POST /workspaces/:workspace_id/sso/scim_token.json Generar un nuevo token SCIM (se muestra una sola vez) sso_scim_token

Permiso: workspace.manage · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sso/scim_token.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /workspaces/:workspace_id/sso.json Obtener los ajustes de SSO sso_get

Permiso: workspace.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/sso.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "saml u oidc"
    },
    "status": {
      "type": "string",
      "description": "draft, testing, tested o active"
    },
    "enforced": {
      "type": "boolean",
      "description": "SSO es la única forma de entrar (excepto el propietario)"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dominios de correo verificados"
    },
    "idp_sso_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "idp_entity_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "idp_cert_present": {
      "type": "boolean"
    },
    "oidc_issuer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "oidc_client_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "oidc_client_secret_present": {
      "type": "boolean"
    },
    "default_role": {
      "type": "string"
    },
    "jit_provisioning": {
      "type": "boolean"
    },
    "scim_enabled": {
      "type": "boolean"
    }
  }
}
PATCH /workspaces/:workspace_id/sso.json Crear o actualizar los ajustes de SSO sso_update

Permiso: workspace.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/sso.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "saml u oidc",
      "enum": [
        "saml",
        "oidc"
      ]
    },
    "idp_sso_url": {
      "type": "string",
      "description": "SAML: URL de inicio de sesión único del IdP"
    },
    "idp_entity_id": {
      "type": "string",
      "description": "SAML: id de entidad del IdP (emisor)"
    },
    "idp_cert": {
      "type": "string",
      "description": "SAML: certificado de firma X.509 del IdP (PEM)"
    },
    "oidc_issuer": {
      "type": "string",
      "description": "OIDC: URL del emisor (descubrimiento)"
    },
    "oidc_client_id": {
      "type": "string",
      "description": "OIDC: id de cliente"
    },
    "oidc_client_secret": {
      "type": "string",
      "description": "OIDC: secreto de cliente (solo escritura)"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dominios de correo verificados que usan este SSO"
    },
    "default_role": {
      "type": "string",
      "description": "Rol de los miembros creados por JIT o SCIM",
      "enum": [
        "admin",
        "editor",
        "analyst",
        "viewer",
        "billing"
      ]
    },
    "jit_provisioning": {
      "type": "boolean",
      "description": "Crear miembros en el primer inicio de sesión con SSO"
    },
    "enforced": {
      "type": "boolean",
      "description": "Permitir solo inicios de sesión con SSO (necesita una configuración activa)"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "description": "saml u oidc"
    },
    "status": {
      "type": "string",
      "description": "draft, testing, tested o active"
    },
    "enforced": {
      "type": "boolean",
      "description": "SSO es la única forma de entrar (excepto el propietario)"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Dominios de correo verificados"
    },
    "idp_sso_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "idp_entity_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "idp_cert_present": {
      "type": "boolean"
    },
    "oidc_issuer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "oidc_client_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "oidc_client_secret_present": {
      "type": "boolean"
    },
    "default_role": {
      "type": "string"
    },
    "jit_provisioning": {
      "type": "boolean"
    },
    "scim_enabled": {
      "type": "boolean"
    }
  }
}

Segmentos

POST /sites/:site_id/segments.json Guardar filtros como segmento segments_create

Permiso: content.write

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/segments.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del segmento, p. ej. \"Visitantes móviles desde anuncios\"",
      "examples": [
        "Mobile visitors from ads"
      ]
    },
    "description": {
      "type": "string",
      "description": "Nota opcional sobre para qué sirve el segmento (300 caracteres como máximo)",
      "examples": [
        "People who might buy the Pro plan"
      ]
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros, todos los cuales deben coincidir. Cada elemento es una condición [\"dimension\", \"operator\", \"value\"], o {\"any\": [conditions]} cuando basta con que coincida una de varias. Dimensiones: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (código ISO, p. ej. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (id del objetivo), event (nombre del evento personalizado) y prop:<key> (propiedad de evento personalizado). Operadores: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of y none_of (el valor es una lista), gt y lt (un número), between (una lista de dos números). También se aceptan las filas del formulario de segmentos: {\"dimension\", \"operator\", \"value\", \"property\" (para la dimensión prop), \"join\": \"and\" u \"or\" (or combina la fila con la anterior)}. Ejemplo: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]",
      "examples": [
        [
          [
            "country",
            "is",
            "US"
          ],
          [
            "device",
            "is",
            "mobile"
          ],
          {
            "any": [
              [
                "page",
                "starts_with",
                "/pricing"
              ],
              [
                "goal",
                "is",
                "goal_7Q2K9XH3AB"
              ]
            ]
          }
        ]
      ]
    },
    "shared": {
      "type": "boolean",
      "description": "Visible para todos los que tienen acceso al sitio (false: solo tú)",
      "default": true
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "filters",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del segmento, p. ej. seg_7Q2K9XH3AB"
    },
    "site_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "description": "Para qué sirve el segmento, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "filters": {
      "type": "array",
      "description": "Filtros en el formato de filtros de estadísticas: condiciones [\"dimension\", \"operator\", \"value\"] que deben coincidir todas, y grupos {\"any\": [conditions]}"
    },
    "summary": {
      "type": "string",
      "description": "Los filtros en lenguaje natural, p. ej. \"Visitantes de Estados Unidos en móvil que vieron /pricing\""
    },
    "shared": {
      "type": "boolean",
      "description": "Visible para todos los que tienen acceso al sitio"
    },
    "mine": {
      "type": "boolean",
      "description": "Creado por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/segments/:id.json Eliminar un segmento segments_delete

Permiso: content.write

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/segments/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del segmento, p. ej. seg_7Q2K9XH3AB"
    },
    "site_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "description": "Para qué sirve el segmento, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "filters": {
      "type": "array",
      "description": "Filtros en el formato de filtros de estadísticas: condiciones [\"dimension\", \"operator\", \"value\"] que deben coincidir todas, y grupos {\"any\": [conditions]}"
    },
    "summary": {
      "type": "string",
      "description": "Los filtros en lenguaje natural, p. ej. \"Visitantes de Estados Unidos en móvil que vieron /pricing\""
    },
    "shared": {
      "type": "boolean",
      "description": "Visible para todos los que tienen acceso al sitio"
    },
    "mine": {
      "type": "boolean",
      "description": "Creado por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/segments.json Listar los segmentos que puedes usar en un sitio segments_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/segments.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del segmento, p. ej. seg_7Q2K9XH3AB"
      },
      "site_id": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "description": {
        "anyOf": [
          {
            "type": "string",
            "description": "Para qué sirve el segmento, o null"
          },
          {
            "type": "null"
          }
        ]
      },
      "filters": {
        "type": "array",
        "description": "Filtros en el formato de filtros de estadísticas: condiciones [\"dimension\", \"operator\", \"value\"] que deben coincidir todas, y grupos {\"any\": [conditions]}"
      },
      "summary": {
        "type": "string",
        "description": "Los filtros en lenguaje natural, p. ej. \"Visitantes de Estados Unidos en móvil que vieron /pricing\""
      },
      "shared": {
        "type": "boolean",
        "description": "Visible para todos los que tienen acceso al sitio"
      },
      "mine": {
        "type": "boolean",
        "description": "Creado por ti"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /sites/:site_id/segments/preview.json Describir filtros en lenguaje natural y contar los visitantes que coincidieron en los últimos 30 días segments_preview

Permiso: analytics.read

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/segments/preview.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros, todos los cuales deben coincidir. Cada elemento es una condición [\"dimension\", \"operator\", \"value\"], o {\"any\": [conditions]} cuando basta con que coincida una de varias. Dimensiones: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (código ISO, p. ej. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (id del objetivo), event (nombre del evento personalizado) y prop:<key> (propiedad de evento personalizado). Operadores: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of y none_of (el valor es una lista), gt y lt (un número), between (una lista de dos números). También se aceptan las filas del formulario de segmentos: {\"dimension\", \"operator\", \"value\", \"property\" (para la dimensión prop), \"join\": \"and\" u \"or\" (or combina la fila con la anterior)}. Ejemplo: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]",
      "examples": [
        [
          [
            "country",
            "is",
            "US"
          ],
          [
            "device",
            "is",
            "mobile"
          ],
          {
            "any": [
              [
                "page",
                "starts_with",
                "/pricing"
              ],
              [
                "goal",
                "is",
                "goal_7Q2K9XH3AB"
              ]
            ]
          }
        ]
      ],
      "default": []
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/segments/:id.json Obtener un segmento segments_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/segments/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del segmento, p. ej. seg_7Q2K9XH3AB"
    },
    "site_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "description": "Para qué sirve el segmento, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "filters": {
      "type": "array",
      "description": "Filtros en el formato de filtros de estadísticas: condiciones [\"dimension\", \"operator\", \"value\"] que deben coincidir todas, y grupos {\"any\": [conditions]}"
    },
    "summary": {
      "type": "string",
      "description": "Los filtros en lenguaje natural, p. ej. \"Visitantes de Estados Unidos en móvil que vieron /pricing\""
    },
    "shared": {
      "type": "boolean",
      "description": "Visible para todos los que tienen acceso al sitio"
    },
    "mine": {
      "type": "boolean",
      "description": "Creado por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /sites/:site_id/segments/:id.json Renombrar un segmento o cambiar sus filtros o su uso compartido segments_update

Permiso: content.write

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/segments/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre del segmento"
    },
    "description": {
      "type": "string",
      "description": "Nota opcional sobre para qué sirve el segmento (300 caracteres como máximo, vacío para borrarla)"
    },
    "filters": {
      "type": "array",
      "items": {},
      "description": "Filtros de reemplazo, en el mismo formato que al crear. Filtros, todos los cuales deben coincidir. Cada elemento es una condición [\"dimension\", \"operator\", \"value\"], o {\"any\": [conditions]} cuando basta con que coincida una de varias. Dimensiones: page, entry_page, exit_page, hostname, channel, referrer, referrer_url, ref, utm_source, utm_medium, utm_campaign, utm_content, utm_term, country (código ISO, p. ej. US), language, device (desktop, mobile, tablet, tv, other), browser, browser_version, os, os_version, screen, goal (id del objetivo), event (nombre del evento personalizado) y prop:<key> (propiedad de evento personalizado). Operadores: is, is_not, contains, not_contains, starts_with, regex, not_regex, any_of y none_of (el valor es una lista), gt y lt (un número), between (una lista de dos números). También se aceptan las filas del formulario de segmentos: {\"dimension\", \"operator\", \"value\", \"property\" (para la dimensión prop), \"join\": \"and\" u \"or\" (or combina la fila con la anterior)}. Ejemplo: [[\"country\", \"is\", \"US\"], [\"device\", \"is\", \"mobile\"], {\"any\": [[\"page\", \"starts_with\", \"/pricing\"], [\"goal\", \"is\", \"goal_7Q2K9XH3AB\"]]}]",
      "examples": [
        [
          [
            "country",
            "is",
            "US"
          ],
          [
            "device",
            "is",
            "mobile"
          ],
          {
            "any": [
              [
                "page",
                "starts_with",
                "/pricing"
              ],
              [
                "goal",
                "is",
                "goal_7Q2K9XH3AB"
              ]
            ]
          }
        ]
      ]
    },
    "shared": {
      "type": "boolean",
      "description": "Visible para todos los del sitio"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "site_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del segmento, p. ej. seg_7Q2K9XH3AB"
    },
    "site_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "description": "Para qué sirve el segmento, o null"
        },
        {
          "type": "null"
        }
      ]
    },
    "filters": {
      "type": "array",
      "description": "Filtros en el formato de filtros de estadísticas: condiciones [\"dimension\", \"operator\", \"value\"] que deben coincidir todas, y grupos {\"any\": [conditions]}"
    },
    "summary": {
      "type": "string",
      "description": "Los filtros en lenguaje natural, p. ej. \"Visitantes de Estados Unidos en móvil que vieron /pricing\""
    },
    "shared": {
      "type": "boolean",
      "description": "Visible para todos los que tienen acceso al sitio"
    },
    "mine": {
      "type": "boolean",
      "description": "Creado por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Seguimiento

POST /sites/:site_id/tracking/ingest_key.json Crear o rotar la clave de ingesta del servidor (se muestra una sola vez) tracking_ingest_key_rotate

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/tracking/ingest_key.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio"
    },
    "key": {
      "type": "string",
      "description": "La clave de ingesta. Se muestra una sola vez: guárdala ahora. Envíala como token Bearer a POST /api/events"
    },
    "prefix": {
      "type": "string",
      "description": "Prefijo de la clave mostrado en los ajustes"
    }
  }
}
DELETE /sites/:site_id/tracking/ingest_key.json Revocar la clave de ingesta del servidor tracking_ingest_key_revoke

Permiso: sites.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/tracking/ingest_key.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del sitio usado en el fragmento de seguimiento"
    },
    "workspace_id": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "extra_domains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "multi_domain_mode": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "week_start": {
      "type": "integer"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "honor_dnt": {
      "type": "boolean"
    },
    "honor_gpc": {
      "type": "boolean"
    },
    "pii_scrubber": {
      "type": "boolean"
    },
    "redaction_rules": {
      "type": "array"
    },
    "allowed_params": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "path_masks": {
      "type": "array"
    },
    "retention_months": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "bot_filtering": {
      "type": "boolean"
    },
    "traffic_rule_modes": {
      "type": "object"
    },
    "vitals_sample_rate": {
      "type": "integer"
    },
    "conversion_denominator": {
      "type": "string"
    },
    "public_dashboard": {
      "type": "boolean"
    },
    "public_indexable": {
      "type": "boolean"
    },
    "ingest_key_prefix": {
      "anyOf": [
        {
          "type": "string",
          "description": "Inicio de la clave de ingesta del servidor"
        },
        {
          "type": "null"
        }
      ]
    },
    "verified_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "first_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "snippet": {
      "type": "string",
      "description": "Fragmento de seguimiento HTML"
    },
    "favorite": {
      "type": "boolean",
      "description": "Marcado con estrella por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/tracking/verify.json Comprobar que el rastreador está instalado en el sitio (etiqueta de script, id del sitio, CSP y política de referente) tracking_verify

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/tracking/verify.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Página a comprobar (por defecto https://<domain>/)"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/tracking/snippet.json Generar el fragmento de seguimiento con las opciones elegidas tracking_snippet

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/tracking/snippet.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "modules": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Módulos opcionales: auto (enlaces externos, descargas, formularios, errores 404), engage (tiempo y desplazamiento), vitals (Web Vitals), clicks",
      "default": [
        "engage"
      ]
    },
    "manual": {
      "type": "boolean",
      "description": "Desactivar la vista de página automática",
      "default": false
    },
    "spa": {
      "type": "string",
      "description": "Seguimiento de navegación en aplicaciones de una sola página",
      "enum": [
        "auto",
        "history",
        "hash",
        "off"
      ],
      "default": "auto"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Rastrear solo en estos nombres de host",
      "default": []
    },
    "exclude": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Patrones glob de rutas que no se rastrean, p. ej. /admin/*",
      "default": []
    },
    "query_params": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Parámetros de consulta adicionales a conservar, p. ej. page",
      "default": []
    },
    "mask": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Máscaras de ruta del lado del cliente, p. ej. /u/*->/u/:id",
      "default": []
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}

Sincronización con almacén de datos

POST /workspaces/:workspace_id/warehouses.json Añadir un destino de almacén de datos warehouse_destinations_create

Permiso: workspace.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/warehouses.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre visible, p. ej. Data lake"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sitios a enviar (pa_…). Vacío envía todos los sitios"
    },
    "bucket": {
      "type": "string",
      "description": "s3: nombre del bucket"
    },
    "region": {
      "type": "string",
      "description": "s3: región, p. ej. us-east-1 (auto para R2)"
    },
    "prefix": {
      "type": "string",
      "description": "s3/azure: prefijo de ruta, p. ej. privatus/events"
    },
    "endpoint": {
      "type": "string",
      "description": "s3: endpoint https para almacenamiento compatible con S3 (interoperabilidad de GCS, R2, MinIO)"
    },
    "access_key_id": {
      "type": "string",
      "description": "s3: id de clave de acceso"
    },
    "secret_access_key": {
      "type": "string",
      "description": "s3: clave de acceso secreta (solo escritura)"
    },
    "service_account_json": {
      "type": "string",
      "description": "bigquery: clave JSON de cuenta de servicio con BigQuery Data Editor (solo escritura)"
    },
    "project_id": {
      "type": "string",
      "description": "bigquery: id del proyecto (por defecto: el de la clave)"
    },
    "dataset": {
      "type": "string",
      "description": "bigquery: id del conjunto de datos"
    },
    "table": {
      "type": "string",
      "description": "bigquery/snowflake: nombre de la tabla (columnas: esquema v1)"
    },
    "account": {
      "type": "string",
      "description": "snowflake: identificador de cuenta, p. ej. xy12345.us-east-1 o myorg-myaccount"
    },
    "user": {
      "type": "string",
      "description": "snowflake: usuario con autenticación por par de claves"
    },
    "private_key": {
      "type": "string",
      "description": "snowflake: clave privada RSA en PEM (solo escritura)"
    },
    "database": {
      "type": "string",
      "description": "snowflake: base de datos"
    },
    "schema": {
      "type": "string",
      "description": "snowflake: esquema"
    },
    "warehouse": {
      "type": "string",
      "description": "snowflake: almacén virtual"
    },
    "role": {
      "type": "string",
      "description": "snowflake: rol (opcional)"
    },
    "sas_url": {
      "type": "string",
      "description": "azure: URL SAS del contenedor con permiso de creación/escritura (solo escritura)"
    },
    "kind": {
      "type": "string",
      "description": "s3 (también GCS/R2/MinIO), bigquery, snowflake o azure",
      "enum": [
        "s3",
        "bigquery",
        "snowflake",
        "azure"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "kind",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del destino, p. ej. whd_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "s3, bigquery, snowflake o azure"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Adónde van los datos: s3://bucket/prefix, project.dataset.table, account/database.schema.table o el contenedor de Azure"
    },
    "configured": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Nombres de ajustes rellenados (los valores nunca se devuelven)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sitios enviados (pa_…). Vacío significa todos los sitios"
    },
    "schedule": {
      "type": "string",
      "description": "daily: 02:00 UTC, envía el día UTC anterior"
    },
    "schema_version": {
      "type": "string",
      "description": "Esquema de fila enviado"
    },
    "last_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /warehouses/:id.json Eliminar un destino de almacén de datos warehouse_destinations_delete

Permiso: workspace.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/warehouses/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del destino, p. ej. whd_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "s3, bigquery, snowflake o azure"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Adónde van los datos: s3://bucket/prefix, project.dataset.table, account/database.schema.table o el contenedor de Azure"
    },
    "configured": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Nombres de ajustes rellenados (los valores nunca se devuelven)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sitios enviados (pa_…). Vacío significa todos los sitios"
    },
    "schedule": {
      "type": "string",
      "description": "daily: 02:00 UTC, envía el día UTC anterior"
    },
    "schema_version": {
      "type": "string",
      "description": "Esquema de fila enviado"
    },
    "last_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/warehouses.json Listar destinos de almacén de datos warehouse_destinations_list

Permiso: workspace.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/warehouses.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "Solo destinos de este tipo",
      "enum": [
        "s3",
        "bigquery",
        "snowflake",
        "azure"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del destino, p. ej. whd_7Q2K9XH3AB"
      },
      "kind": {
        "type": "string",
        "description": "s3, bigquery, snowflake o azure"
      },
      "name": {
        "type": "string"
      },
      "target": {
        "type": "string",
        "description": "Adónde van los datos: s3://bucket/prefix, project.dataset.table, account/database.schema.table o el contenedor de Azure"
      },
      "configured": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Nombres de ajustes rellenados (los valores nunca se devuelven)"
      },
      "site_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Sitios enviados (pa_…). Vacío significa todos los sitios"
      },
      "schedule": {
        "type": "string",
        "description": "daily: 02:00 UTC, envía el día UTC anterior"
      },
      "schema_version": {
        "type": "string",
        "description": "Esquema de fila enviado"
      },
      "last_run_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "next_run_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "last_error": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /warehouses/:id.json Obtener un destino de almacén de datos (sin secretos) warehouse_destinations_get

Permiso: workspace.manage

Ejemplo
curl https://privatusanalytics.com/warehouses/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del destino, p. ej. whd_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "s3, bigquery, snowflake o azure"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Adónde van los datos: s3://bucket/prefix, project.dataset.table, account/database.schema.table o el contenedor de Azure"
    },
    "configured": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Nombres de ajustes rellenados (los valores nunca se devuelven)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sitios enviados (pa_…). Vacío significa todos los sitios"
    },
    "schedule": {
      "type": "string",
      "description": "daily: 02:00 UTC, envía el día UTC anterior"
    },
    "schema_version": {
      "type": "string",
      "description": "Esquema de fila enviado"
    },
    "last_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /warehouses/:id/sync.json Poner en cola ahora una sincronización de un día warehouse_destinations_sync

Permiso: workspace.manage

Ejemplo
curl -X POST https://privatusanalytics.com/warehouses/:id/sync.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "format": "date",
      "description": "Día UTC a enviar, p. ej. 2026-09-28 (por defecto: ayer)"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del destino, p. ej. whd_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "s3, bigquery, snowflake o azure"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Adónde van los datos: s3://bucket/prefix, project.dataset.table, account/database.schema.table o el contenedor de Azure"
    },
    "configured": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Nombres de ajustes rellenados (los valores nunca se devuelven)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sitios enviados (pa_…). Vacío significa todos los sitios"
    },
    "schedule": {
      "type": "string",
      "description": "daily: 02:00 UTC, envía el día UTC anterior"
    },
    "schema_version": {
      "type": "string",
      "description": "Esquema de fila enviado"
    },
    "last_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /warehouses/:id.json Actualizar un destino de almacén de datos (los secretos en blanco se conservan) warehouse_destinations_update

Permiso: workspace.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/warehouses/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre visible, p. ej. Data lake"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sitios a enviar (pa_…). Vacío envía todos los sitios"
    },
    "bucket": {
      "type": "string",
      "description": "s3: nombre del bucket"
    },
    "region": {
      "type": "string",
      "description": "s3: región, p. ej. us-east-1 (auto para R2)"
    },
    "prefix": {
      "type": "string",
      "description": "s3/azure: prefijo de ruta, p. ej. privatus/events"
    },
    "endpoint": {
      "type": "string",
      "description": "s3: endpoint https para almacenamiento compatible con S3 (interoperabilidad de GCS, R2, MinIO)"
    },
    "access_key_id": {
      "type": "string",
      "description": "s3: id de clave de acceso"
    },
    "secret_access_key": {
      "type": "string",
      "description": "s3: clave de acceso secreta (solo escritura)"
    },
    "service_account_json": {
      "type": "string",
      "description": "bigquery: clave JSON de cuenta de servicio con BigQuery Data Editor (solo escritura)"
    },
    "project_id": {
      "type": "string",
      "description": "bigquery: id del proyecto (por defecto: el de la clave)"
    },
    "dataset": {
      "type": "string",
      "description": "bigquery: id del conjunto de datos"
    },
    "table": {
      "type": "string",
      "description": "bigquery/snowflake: nombre de la tabla (columnas: esquema v1)"
    },
    "account": {
      "type": "string",
      "description": "snowflake: identificador de cuenta, p. ej. xy12345.us-east-1 o myorg-myaccount"
    },
    "user": {
      "type": "string",
      "description": "snowflake: usuario con autenticación por par de claves"
    },
    "private_key": {
      "type": "string",
      "description": "snowflake: clave privada RSA en PEM (solo escritura)"
    },
    "database": {
      "type": "string",
      "description": "snowflake: base de datos"
    },
    "schema": {
      "type": "string",
      "description": "snowflake: esquema"
    },
    "warehouse": {
      "type": "string",
      "description": "snowflake: almacén virtual"
    },
    "role": {
      "type": "string",
      "description": "snowflake: rol (opcional)"
    },
    "sas_url": {
      "type": "string",
      "description": "azure: URL SAS del contenedor con permiso de creación/escritura (solo escritura)"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del destino, p. ej. whd_7Q2K9XH3AB"
    },
    "kind": {
      "type": "string",
      "description": "s3, bigquery, snowflake o azure"
    },
    "name": {
      "type": "string"
    },
    "target": {
      "type": "string",
      "description": "Adónde van los datos: s3://bucket/prefix, project.dataset.table, account/database.schema.table o el contenedor de Azure"
    },
    "configured": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Nombres de ajustes rellenados (los valores nunca se devuelven)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Sitios enviados (pa_…). Vacío significa todos los sitios"
    },
    "schedule": {
      "type": "string",
      "description": "daily: 02:00 UTC, envía el día UTC anterior"
    },
    "schema_version": {
      "type": "string",
      "description": "Esquema de fila enviado"
    },
    "last_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "next_run_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Sitio web

GET /changelog.json Listar las entradas del registro de cambios changelog_list

Novedades del producto publicadas, las más recientes primero. También disponible como RSS en /changelog.rss.

Permiso: public

Ejemplo
curl https://privatusanalytics.com/changelog.json
Entradas
{
  "type": "object",
  "properties": {
    "area": {
      "type": "string",
      "description": "Solo entradas de esta área del producto",
      "enum": [
        "product",
        "dashboard",
        "tracker",
        "privacy",
        "api",
        "integrations",
        "billing",
        "docs"
      ]
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id de la entrada, p. ej. chg_7Q2K9XH3AB"
      },
      "title": {
        "type": "string",
        "description": "Titular"
      },
      "area": {
        "type": "string",
        "description": "Área del producto, p. ej. dashboard, tracker, api"
      },
      "body": {
        "type": "string",
        "description": "Cuerpo en Markdown"
      },
      "published_at": {
        "type": "string",
        "format": "date-time",
        "description": "Hora de publicación"
      },
      "url": {
        "type": "string",
        "description": "Enlace permanente"
      }
    }
  }
}
GET /changelog/:id.json Obtener una entrada del registro de cambios changelog_get

Permiso: public

Ejemplo
curl https://privatusanalytics.com/changelog/:id.json
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de la entrada, p. ej. chg_7Q2K9XH3AB"
    },
    "title": {
      "type": "string",
      "description": "Titular"
    },
    "area": {
      "type": "string",
      "description": "Área del producto, p. ej. dashboard, tracker, api"
    },
    "body": {
      "type": "string",
      "description": "Cuerpo en Markdown"
    },
    "published_at": {
      "type": "string",
      "format": "date-time",
      "description": "Hora de publicación"
    },
    "url": {
      "type": "string",
      "description": "Enlace permanente"
    }
  }
}
POST /contact.json Enviar un mensaje al equipo de Privatus Analytics contact_create

Los clientes de navegador envían un token de Cloudflare Turnstile como `cf-turnstile-response`. Las solicitudes con un token de API no necesitan ninguno.

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/contact.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Tu nombre",
      "examples": [
        "Ada Lovelace"
      ]
    },
    "email": {
      "type": "string",
      "description": "Dónde debemos responder",
      "examples": [
        "[email protected]"
      ]
    },
    "company": {
      "type": "string",
      "description": "Empresa u organización (opcional)"
    },
    "topic": {
      "type": "string",
      "description": "De qué trata el mensaje",
      "enum": [
        "general",
        "sales",
        "support",
        "privacy",
        "security",
        "partnerships",
        "press"
      ],
      "default": "general"
    },
    "message": {
      "type": "string",
      "description": "Tu mensaje (de 10 a 5.000 caracteres)"
    },
    "website": {
      "type": "string",
      "description": "Déjalo vacío. Trampa de spam para bots. Los envíos rellenados se descartan"
    }
  },
  "required": [
    "name",
    "email",
    "message"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Siempre true cuando se aceptó el envío"
    },
    "message": {
      "type": "string",
      "description": "Qué ocurre a continuación"
    }
  }
}
POST /newsletter/confirm.json Confirmar una suscripción al boletín (token firmado) newsletter_confirm

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/newsletter/confirm.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token firmado del correo de confirmación"
    }
  },
  "required": [
    "token"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Siempre true cuando se aceptó el envío"
    },
    "message": {
      "type": "string",
      "description": "Qué ocurre a continuación"
    }
  }
}
POST /newsletter.json Suscribir un correo al boletín newsletter_subscribe

Los clientes de navegador envían un token de Cloudflare Turnstile como `cf-turnstile-response`. Las solicitudes con un token de API no necesitan ninguno.

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/newsletter.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Dirección de correo a suscribir. Se le envía un enlace de confirmación",
      "examples": [
        "[email protected]"
      ]
    },
    "website": {
      "type": "string",
      "description": "Déjalo vacío. Trampa de spam para bots. Los envíos rellenados se descartan"
    }
  },
  "required": [
    "email"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Siempre true cuando se aceptó el envío"
    },
    "message": {
      "type": "string",
      "description": "Qué ocurre a continuación"
    }
  }
}
POST /newsletter/unsubscribe.json Darse de baja con un token de enlace firmado newsletter_unsubscribe

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/newsletter/unsubscribe.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token firmado del enlace de baja"
    },
    "list": {
      "type": "string",
      "description": "newsletter (por defecto: la lista del enlace) o marketing (todo el correo de marketing)",
      "enum": [
        "newsletter",
        "marketing"
      ]
    }
  },
  "required": [
    "token"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Siempre true cuando se aceptó el envío"
    },
    "message": {
      "type": "string",
      "description": "Qué ocurre a continuación"
    }
  }
}
GET /pricing.json Obtener planes, precios y límites de los planes pricing_get

Los mismos datos que la página de precios: la escala de eventos, todos los límites de los planes y qué cuenta como un evento. Pasa events para obtener el nivel correspondiente.

Permiso: public

Ejemplo
curl https://privatusanalytics.com/pricing.json
Entradas
{
  "type": "object",
  "properties": {
    "events": {
      "type": "integer",
      "description": "Vistas de página más eventos personalizados esperados al mes. Devuelve el nivel correspondiente como `recommendation`",
      "examples": [
        750000
      ]
    },
    "interval": {
      "type": "string",
      "description": "Intervalo de facturación de los precios mostrados: month, o year (10 veces el precio mensual)",
      "enum": [
        "month",
        "year"
      ],
      "default": "month"
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "currency": {
      "type": "string",
      "description": "Moneda de todos los precios (USD)"
    },
    "tax_included": {
      "type": "boolean",
      "description": "Siempre true. Los precios incluyen el IVA o el impuesto sobre las ventas, así que el precio mostrado es el precio que se paga"
    },
    "interval": {
      "type": "string",
      "description": "month o year. Los precios son para este intervalo"
    },
    "annual_multiplier": {
      "type": "integer",
      "description": "Precio anual = precio mensual x esto (dos meses gratis)"
    },
    "free_events": {
      "type": "integer",
      "description": "Eventos al mes incluidos en el plan Free"
    },
    "badge_bonus": {
      "type": "integer",
      "description": "Eventos gratuitos adicionales al mes cuando se muestra la insignia opcional"
    },
    "tiers": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Escala de eventos: precios { events, pro, business } para el intervalo (pro es null donde solo se ofrece Business), más los precios mensuales"
    },
    "plans": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Planes con { id, name, from_price, limits }. Los límites null significan ilimitado"
    },
    "counted": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Qué cuenta como evento facturable"
    },
    "not_counted": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Qué nunca cuenta para el uso"
    },
    "recommendation": {
      "anyOf": [
        {
          "type": "object",
          "description": "{ events, plan, tier_events, price } para la entrada `events`, o null cuando no se indicó volumen"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
GET /status.json Obtener el estado actual del sistema status_get

Estado de la base de datos, Redis y los trabajos en segundo plano, comprobado como máximo cada 15 segundos.

Permiso: public

Ejemplo
curl https://privatusanalytics.com/status.json
Entradas
{
  "type": "object",
  "properties": {
    "fresh": {
      "type": "boolean",
      "description": "Omitir la caché de 15 segundos y comprobar de nuevo ahora",
      "default": false
    }
  },
  "required": []
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "General: operational, degraded u outage"
    },
    "checked_at": {
      "type": "string",
      "format": "date-time",
      "description": "Cuándo se ejecutaron las comprobaciones (en caché hasta 15 s)"
    },
    "components": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Por componente: { id, name, status, detail, latency_ms }, más queue_latency_s y queue_depth para las colas"
    }
  }
}
GET /tools/header-checker.json Comprobar el Referrer-Policy y la CSP de una página para analítica tools_header_check

Permiso: public

Ejemplo
curl https://privatusanalytics.com/tools/header-checker.json
Entradas
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Página pública a comprobar (http o https)",
      "examples": [
        "https://example.com"
      ]
    }
  },
  "required": [
    "url"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "URL final tras las redirecciones"
    },
    "status": {
      "type": "integer",
      "description": "Estado HTTP de la respuesta final"
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Comprobaciones: { check, value, level (ok, warn, info), note }"
    }
  }
}
GET /tools/privacy-policy-generator.json Redactar un párrafo de política de privacidad para Privatus Analytics tools_privacy_policy

Permiso: public

Ejemplo
curl https://privatusanalytics.com/tools/privacy-policy-generator.json
Entradas
{
  "type": "object",
  "properties": {
    "site_name": {
      "type": "string",
      "description": "El nombre de tu sitio web o empresa",
      "examples": [
        "Example Books"
      ]
    },
    "contact_email": {
      "type": "string",
      "description": "Contacto de privacidad a mencionar (opcional)"
    },
    "honors_gpc": {
      "type": "boolean",
      "description": "Si se respetan Do Not Track y Global Privacy Control (por defecto)",
      "default": true
    }
  },
  "required": [
    "site_name"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "site_name": {
      "type": "string",
      "description": "Entrada: nombre del sitio o de la empresa"
    },
    "paragraphs": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "El texto de la política, un párrafo por elemento"
    },
    "text": {
      "type": "string",
      "description": "Los párrafos unidos con líneas en blanco"
    }
  }
}
GET /tools/qr-code.json Generar un código QR como SVG tools_qr_code

Permiso: public

Ejemplo
curl https://privatusanalytics.com/tools/qr-code.json
Entradas
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "description": "URL o texto a codificar (hasta 1.000 caracteres)",
      "examples": [
        "https://example.com/?utm_source=poster"
      ]
    },
    "level": {
      "type": "string",
      "description": "Corrección de errores: l (7%), m (15%), q (25%), h (30%)",
      "enum": [
        "l",
        "m",
        "q",
        "h"
      ],
      "default": "m"
    }
  },
  "required": [
    "text"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "description": "El texto codificado"
    },
    "level": {
      "type": "string",
      "description": "Nivel de corrección de errores"
    },
    "size": {
      "type": "integer",
      "description": "Módulos por lado"
    },
    "svg": {
      "type": "string",
      "description": "Documento SVG independiente"
    }
  }
}
GET /tools/tracker-scanner.json Listar cookies y rastreadores conocidos de una página tools_tracker_scan

Permiso: public

Ejemplo
curl https://privatusanalytics.com/tools/tracker-scanner.json
Entradas
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Página pública a analizar (http o https)",
      "examples": [
        "https://example.com"
      ]
    }
  },
  "required": [
    "url"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "URL final tras las redirecciones"
    },
    "status": {
      "type": "integer",
      "description": "Estado HTTP de la respuesta final"
    },
    "truncated": {
      "type": "boolean",
      "description": "True cuando la página superaba 1 MB y solo se analizó el primer 1 MB"
    },
    "cookies": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Cookies establecidas por la respuesta HTTP: { name, domain, path, expires, secure, http_only, same_site }. Los valores nunca se devuelven"
    },
    "trackers": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Herramientas conocidas referenciadas por la página: { name, category, match, evidence }"
    },
    "third_party_hosts": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Otros dominios desde los que la página carga recursos"
    }
  }
}
GET /tools/utm-builder.json Crear una URL de campaña con parámetros UTM tools_utm_builder

Permiso: public

Ejemplo
curl https://privatusanalytics.com/tools/utm-builder.json
Entradas
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "URL de la página de destino",
      "examples": [
        "https://example.com/pricing"
      ]
    },
    "source": {
      "type": "string",
      "description": "utm_source: de dónde viene el tráfico",
      "examples": [
        "newsletter"
      ]
    },
    "medium": {
      "type": "string",
      "description": "utm_medium: el canal, p. ej. email, cpc, social",
      "examples": [
        "email"
      ]
    },
    "campaign": {
      "type": "string",
      "description": "utm_campaign: el nombre de la campaña",
      "examples": [
        "fall_launch"
      ]
    },
    "term": {
      "type": "string",
      "description": "utm_term: palabra clave de búsqueda de pago (opcional)"
    },
    "content": {
      "type": "string",
      "description": "utm_content: qué enlace o creatividad (opcional)"
    }
  },
  "required": [
    "url",
    "source",
    "medium",
    "campaign"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "La URL de la página de destino con parámetros UTM"
    },
    "params": {
      "type": "object",
      "description": "Los parámetros UTM que se añadieron"
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Problemas que conviene corregir (mayúsculas, espacios, datos personales)"
    }
  }
}
POST /waitlist.json Unirse a una lista de espera (alojamiento en la UE) waitlist_join

Los clientes de navegador envían un token de Cloudflare Turnstile como `cf-turnstile-response`. Las solicitudes con un token de API no necesitan ninguno.

Permiso: public · Solo HTTP (no es una herramienta MCP)

Ejemplo
curl -X POST https://privatusanalytics.com/waitlist.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Correo al que avisar",
      "examples": [
        "[email protected]"
      ]
    },
    "list": {
      "type": "string",
      "description": "A qué lista de espera unirse",
      "enum": [
        "eu_hosting"
      ],
      "default": "eu_hosting"
    },
    "website": {
      "type": "string",
      "description": "Déjalo vacío. Trampa de spam para bots. Los envíos rellenados se descartan"
    }
  },
  "required": [
    "email"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "received": {
      "type": "boolean",
      "description": "Siempre true cuando se aceptó el envío"
    },
    "message": {
      "type": "string",
      "description": "Qué ocurre a continuación"
    }
  }
}

Sitios

POST /sites/:site_id/data_reset.json Eliminar todos los eventos y visitas de un rango de fechas (se ejecuta en segundo plano, no se puede deshacer) sites_reset_data

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/data_reset.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "format": "date",
      "description": "Primer día a eliminar (zona horaria del sitio)"
    },
    "to": {
      "type": "string",
      "format": "date",
      "description": "Último día a eliminar, inclusive"
    },
    "confirm": {
      "type": "string",
      "description": "Escribe el dominio para confirmar"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "from",
    "to",
    "confirm",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/filter_stats.json Resumen del tráfico filtrado: bots, reglas de tráfico o redacciones de PII por motivo y país (solo recuentos) sites_filter_stats

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/filter_stats.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "description": "bot (bots filtrados), rule (reglas de tráfico) o redaction (depurador de PII)",
      "enum": [
        "bot",
        "rule",
        "redaction"
      ],
      "default": "bot"
    },
    "days": {
      "type": "integer",
      "description": "Días hacia atrás (1-395)",
      "default": 30
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
GET /sites/:site_id/access.json Listar los miembros y si pueden ver este sitio sites_access_list

Permiso: members.manage

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/access.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "membership_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de membresía"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "access": {
      "type": "boolean",
      "description": "Puede ver este sitio"
    },
    "locked": {
      "type": "boolean",
      "description": "Los propietarios y administradores siempre tienen acceso"
    }
  }
}
PATCH /sites/:site_id/access.json Conceder o quitar el acceso de un miembro a este sitio sites_access_update

Permiso: members.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:site_id/access.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "membership_id": {
      "type": "string",
      "description": "Id de membresía de sites_access_list"
    },
    "access": {
      "type": "boolean",
      "description": "true para conceder acceso, false para quitarlo"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "membership_id",
    "access",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "membership_id": {
      "type": "string",
      "format": "uuid",
      "description": "Id de membresía"
    },
    "email": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "access": {
      "type": "boolean",
      "description": "Puede ver este sitio"
    },
    "locked": {
      "type": "boolean",
      "description": "Los propietarios y administradores siempre tienen acceso"
    }
  }
}
POST /sites/:site_id/favorite.json Marcar un sitio con estrella (aparece primero en Todos los sitios) sites_favorite

Permiso: analytics.read

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/favorite.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del sitio usado en el fragmento de seguimiento"
    },
    "workspace_id": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "extra_domains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "multi_domain_mode": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "week_start": {
      "type": "integer"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "honor_dnt": {
      "type": "boolean"
    },
    "honor_gpc": {
      "type": "boolean"
    },
    "pii_scrubber": {
      "type": "boolean"
    },
    "redaction_rules": {
      "type": "array"
    },
    "allowed_params": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "path_masks": {
      "type": "array"
    },
    "retention_months": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "bot_filtering": {
      "type": "boolean"
    },
    "traffic_rule_modes": {
      "type": "object"
    },
    "vitals_sample_rate": {
      "type": "integer"
    },
    "conversion_denominator": {
      "type": "string"
    },
    "public_dashboard": {
      "type": "boolean"
    },
    "public_indexable": {
      "type": "boolean"
    },
    "ingest_key_prefix": {
      "anyOf": [
        {
          "type": "string",
          "description": "Inicio de la clave de ingesta del servidor"
        },
        {
          "type": "null"
        }
      ]
    },
    "verified_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "first_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "snippet": {
      "type": "string",
      "description": "Fragmento de seguimiento HTML"
    },
    "favorite": {
      "type": "boolean",
      "description": "Marcado con estrella por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/favorite.json Quitar la estrella de un sitio sites_unfavorite

Permiso: analytics.read

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/favorite.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del sitio usado en el fragmento de seguimiento"
    },
    "workspace_id": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "extra_domains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "multi_domain_mode": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "week_start": {
      "type": "integer"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "honor_dnt": {
      "type": "boolean"
    },
    "honor_gpc": {
      "type": "boolean"
    },
    "pii_scrubber": {
      "type": "boolean"
    },
    "redaction_rules": {
      "type": "array"
    },
    "allowed_params": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "path_masks": {
      "type": "array"
    },
    "retention_months": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "bot_filtering": {
      "type": "boolean"
    },
    "traffic_rule_modes": {
      "type": "object"
    },
    "vitals_sample_rate": {
      "type": "integer"
    },
    "conversion_denominator": {
      "type": "string"
    },
    "public_dashboard": {
      "type": "boolean"
    },
    "public_indexable": {
      "type": "boolean"
    },
    "ingest_key_prefix": {
      "anyOf": [
        {
          "type": "string",
          "description": "Inicio de la clave de ingesta del servidor"
        },
        {
          "type": "null"
        }
      ]
    },
    "verified_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "first_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "snippet": {
      "type": "string",
      "description": "Fragmento de seguimiento HTML"
    },
    "favorite": {
      "type": "boolean",
      "description": "Marcado con estrella por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /sites/:site_id/setup.json Estado de instalación y fragmento de un sitio sites_setup_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:site_id/setup.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object"
}
POST /transfers/:token/accept.json Aceptar la transferencia de un sitio a uno de tus espacios de trabajo site_transfers_accept

Permiso: public

Ejemplo
curl -X POST https://privatusanalytics.com/transfers/:token/accept.json \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Espacio de trabajo al que mover el sitio (ws_…)"
    },
    "token": {
      "type": "string",
      "description": "Token del recurso"
    }
  },
  "required": [
    "workspace_id",
    "token"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Sitio que se transfiere"
    },
    "site_domain": {
      "type": "string"
    },
    "from_workspace": {
      "type": "string",
      "description": "Nombre del espacio de trabajo actual"
    },
    "to_workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Espacio de trabajo receptor"
        },
        {
          "type": "null"
        }
      ]
    },
    "to_email": {
      "type": "string",
      "description": "Correo del destinatario"
    },
    "status": {
      "type": "string",
      "description": "pending, accepted o canceled"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /sites/:site_id/transfer.json Iniciar la transferencia de un sitio a otro espacio de trabajo (se envía un correo al destinatario) sites_transfer_start

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/sites/:site_id/transfer.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Correo de la persona que recibirá el sitio (elegirá uno de sus espacios de trabajo)"
    },
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "email",
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Sitio que se transfiere"
    },
    "site_domain": {
      "type": "string"
    },
    "from_workspace": {
      "type": "string",
      "description": "Nombre del espacio de trabajo actual"
    },
    "to_workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Espacio de trabajo receptor"
        },
        {
          "type": "null"
        }
      ]
    },
    "to_email": {
      "type": "string",
      "description": "Correo del destinatario"
    },
    "status": {
      "type": "string",
      "description": "pending, accepted o canceled"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:site_id/transfer.json Cancelar una transferencia de sitio pendiente sites_transfer_cancel

Permiso: sites.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:site_id/transfer.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Id del sitio, p. ej. pa_7Q2K9XH3AB"
    }
  },
  "required": [
    "site_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Sitio que se transfiere"
    },
    "site_domain": {
      "type": "string"
    },
    "from_workspace": {
      "type": "string",
      "description": "Nombre del espacio de trabajo actual"
    },
    "to_workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Espacio de trabajo receptor"
        },
        {
          "type": "null"
        }
      ]
    },
    "to_email": {
      "type": "string",
      "description": "Correo del destinatario"
    },
    "status": {
      "type": "string",
      "description": "pending, accepted o canceled"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /transfers/:token.json Obtener una transferencia pendiente a partir de su token enviado por correo site_transfers_get

Permiso: public

Ejemplo
curl https://privatusanalytics.com/transfers/:token.json
Entradas
{
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Token del recurso"
    }
  },
  "required": [
    "token"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "site_id": {
      "type": "string",
      "description": "Sitio que se transfiere"
    },
    "site_domain": {
      "type": "string"
    },
    "from_workspace": {
      "type": "string",
      "description": "Nombre del espacio de trabajo actual"
    },
    "to_workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "description": "Espacio de trabajo receptor"
        },
        {
          "type": "null"
        }
      ]
    },
    "to_email": {
      "type": "string",
      "description": "Correo del destinatario"
    },
    "status": {
      "type": "string",
      "description": "pending, accepted o canceled"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /workspaces/:workspace_id/sites.json Añadir un sitio sites_create

Permiso: sites.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/sites.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "description": "Dominio principal, p. ej. example.com",
      "examples": [
        "example.com"
      ]
    },
    "name": {
      "type": "string",
      "description": "Nombre visible (por defecto el dominio)"
    },
    "timezone": {
      "type": "string",
      "description": "Zona horaria de los informes"
    },
    "currency": {
      "type": "string",
      "description": "Moneda de los ingresos (ISO 4217)"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "domain",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del sitio usado en el fragmento de seguimiento"
    },
    "workspace_id": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "extra_domains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "multi_domain_mode": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "week_start": {
      "type": "integer"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "honor_dnt": {
      "type": "boolean"
    },
    "honor_gpc": {
      "type": "boolean"
    },
    "pii_scrubber": {
      "type": "boolean"
    },
    "redaction_rules": {
      "type": "array"
    },
    "allowed_params": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "path_masks": {
      "type": "array"
    },
    "retention_months": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "bot_filtering": {
      "type": "boolean"
    },
    "traffic_rule_modes": {
      "type": "object"
    },
    "vitals_sample_rate": {
      "type": "integer"
    },
    "conversion_denominator": {
      "type": "string"
    },
    "public_dashboard": {
      "type": "boolean"
    },
    "public_indexable": {
      "type": "boolean"
    },
    "ingest_key_prefix": {
      "anyOf": [
        {
          "type": "string",
          "description": "Inicio de la clave de ingesta del servidor"
        },
        {
          "type": "null"
        }
      ]
    },
    "verified_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "first_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "snippet": {
      "type": "string",
      "description": "Fragmento de seguimiento HTML"
    },
    "favorite": {
      "type": "boolean",
      "description": "Marcado con estrella por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /sites/:id.json Eliminar un sitio (se purga tras 7 días) sites_delete

Permiso: sites.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/sites/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "confirm": {
      "type": "string",
      "description": "Escribe el dominio para confirmar"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "confirm",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del sitio usado en el fragmento de seguimiento"
    },
    "workspace_id": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "extra_domains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "multi_domain_mode": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "week_start": {
      "type": "integer"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "honor_dnt": {
      "type": "boolean"
    },
    "honor_gpc": {
      "type": "boolean"
    },
    "pii_scrubber": {
      "type": "boolean"
    },
    "redaction_rules": {
      "type": "array"
    },
    "allowed_params": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "path_masks": {
      "type": "array"
    },
    "retention_months": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "bot_filtering": {
      "type": "boolean"
    },
    "traffic_rule_modes": {
      "type": "object"
    },
    "vitals_sample_rate": {
      "type": "integer"
    },
    "conversion_denominator": {
      "type": "string"
    },
    "public_dashboard": {
      "type": "boolean"
    },
    "public_indexable": {
      "type": "boolean"
    },
    "ingest_key_prefix": {
      "anyOf": [
        {
          "type": "string",
          "description": "Inicio de la clave de ingesta del servidor"
        },
        {
          "type": "null"
        }
      ]
    },
    "verified_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "first_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "snippet": {
      "type": "string",
      "description": "Fragmento de seguimiento HTML"
    },
    "favorite": {
      "type": "boolean",
      "description": "Marcado con estrella por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/sites.json Listar los sitios de un espacio de trabajo sites_list

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/sites.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Filtrar por dominio o nombre"
    },
    "label": {
      "type": "string",
      "description": "Solo sitios con esta etiqueta"
    },
    "sort": {
      "type": "string",
      "description": "position (tu orden), name, o visitors en los últimos 30 días (los más visitados primero)",
      "enum": [
        "position",
        "name",
        "visitors"
      ],
      "default": "position"
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del sitio usado en el fragmento de seguimiento"
      },
      "workspace_id": {
        "type": "string"
      },
      "domain": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "extra_domains": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "multi_domain_mode": {
        "type": "string"
      },
      "timezone": {
        "type": "string"
      },
      "currency": {
        "type": "string"
      },
      "week_start": {
        "type": "integer"
      },
      "labels": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "honor_dnt": {
        "type": "boolean"
      },
      "honor_gpc": {
        "type": "boolean"
      },
      "pii_scrubber": {
        "type": "boolean"
      },
      "redaction_rules": {
        "type": "array"
      },
      "allowed_params": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "path_masks": {
        "type": "array"
      },
      "retention_months": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "bot_filtering": {
        "type": "boolean"
      },
      "traffic_rule_modes": {
        "type": "object"
      },
      "vitals_sample_rate": {
        "type": "integer"
      },
      "conversion_denominator": {
        "type": "string"
      },
      "public_dashboard": {
        "type": "boolean"
      },
      "public_indexable": {
        "type": "boolean"
      },
      "ingest_key_prefix": {
        "anyOf": [
          {
            "type": "string",
            "description": "Inicio de la clave de ingesta del servidor"
          },
          {
            "type": "null"
          }
        ]
      },
      "verified_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "first_event_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "last_event_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "snippet": {
        "type": "string",
        "description": "Fragmento de seguimiento HTML"
      },
      "favorite": {
        "type": "boolean",
        "description": "Marcado con estrella por ti"
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /sites/:id.json Obtener un sitio y todos sus ajustes sites_get

Permiso: analytics.read

Ejemplo
curl https://privatusanalytics.com/sites/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del sitio usado en el fragmento de seguimiento"
    },
    "workspace_id": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "extra_domains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "multi_domain_mode": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "week_start": {
      "type": "integer"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "honor_dnt": {
      "type": "boolean"
    },
    "honor_gpc": {
      "type": "boolean"
    },
    "pii_scrubber": {
      "type": "boolean"
    },
    "redaction_rules": {
      "type": "array"
    },
    "allowed_params": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "path_masks": {
      "type": "array"
    },
    "retention_months": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "bot_filtering": {
      "type": "boolean"
    },
    "traffic_rule_modes": {
      "type": "object"
    },
    "vitals_sample_rate": {
      "type": "integer"
    },
    "conversion_denominator": {
      "type": "string"
    },
    "public_dashboard": {
      "type": "boolean"
    },
    "public_indexable": {
      "type": "boolean"
    },
    "ingest_key_prefix": {
      "anyOf": [
        {
          "type": "string",
          "description": "Inicio de la clave de ingesta del servidor"
        },
        {
          "type": "null"
        }
      ]
    },
    "verified_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "first_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "snippet": {
      "type": "string",
      "description": "Fragmento de seguimiento HTML"
    },
    "favorite": {
      "type": "boolean",
      "description": "Marcado con estrella por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /sites/:id.json Actualizar los ajustes del sitio sites_update

Permiso: sites.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/sites/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nombre visible"
    },
    "domain": {
      "type": "string",
      "description": "Dominio principal"
    },
    "extra_domains": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Nombres de host adicionales"
    },
    "multi_domain_mode": {
      "type": "string",
      "description": "combined: un visitante en todos los dominios",
      "enum": [
        "combined",
        "separate"
      ]
    },
    "timezone": {
      "type": "string",
      "description": "Zona horaria de los informes"
    },
    "currency": {
      "type": "string",
      "description": "Moneda de los ingresos (ISO 4217)"
    },
    "week_start": {
      "type": "integer",
      "description": "0 = domingo, 1 = lunes"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Etiquetas para agrupar sitios"
    },
    "honor_dnt": {
      "type": "boolean",
      "description": "Omitir visitantes que envían DNT"
    },
    "honor_gpc": {
      "type": "boolean",
      "description": "Omitir visitantes que envían GPC"
    },
    "pii_scrubber": {
      "type": "boolean",
      "description": "Redactar correos, tokens e ids"
    },
    "redaction_rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "pattern": {
            "type": "string"
          }
        }
      },
      "description": "Expresiones regulares de redacción personalizadas"
    },
    "allowed_params": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Parámetros de consulta a conservar en las rutas"
    },
    "path_masks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "pattern": {
            "type": "string"
          },
          "replacement": {
            "type": "string"
          }
        }
      },
      "description": "Reglas de enmascaramiento de rutas, p. ej. /u/* -> /u/:id"
    },
    "retention_months": {
      "type": "integer",
      "description": "Eliminar datos anteriores a este periodo"
    },
    "bot_filtering": {
      "type": "boolean",
      "description": "Filtrar el tráfico de bots"
    },
    "traffic_rule_modes": {
      "type": "object",
      "additionalProperties": true,
      "description": "block o allow por lista de reglas de tráfico"
    },
    "vitals_sample_rate": {
      "type": "integer",
      "description": "% de muestreo de Web Vitals"
    },
    "conversion_denominator": {
      "type": "string",
      "description": "Tasa de conversión sobre visitas o visitantes",
      "enum": [
        "visits",
        "visitors"
      ]
    },
    "public_dashboard": {
      "type": "boolean",
      "description": "Cualquiera con el enlace puede ver las estadísticas"
    },
    "public_indexable": {
      "type": "boolean",
      "description": "Permitir que los buscadores indexen la página pública"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del sitio usado en el fragmento de seguimiento"
    },
    "workspace_id": {
      "type": "string"
    },
    "domain": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "extra_domains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "multi_domain_mode": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "week_start": {
      "type": "integer"
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "honor_dnt": {
      "type": "boolean"
    },
    "honor_gpc": {
      "type": "boolean"
    },
    "pii_scrubber": {
      "type": "boolean"
    },
    "redaction_rules": {
      "type": "array"
    },
    "allowed_params": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "path_masks": {
      "type": "array"
    },
    "retention_months": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "bot_filtering": {
      "type": "boolean"
    },
    "traffic_rule_modes": {
      "type": "object"
    },
    "vitals_sample_rate": {
      "type": "integer"
    },
    "conversion_denominator": {
      "type": "string"
    },
    "public_dashboard": {
      "type": "boolean"
    },
    "public_indexable": {
      "type": "boolean"
    },
    "ingest_key_prefix": {
      "anyOf": [
        {
          "type": "string",
          "description": "Inicio de la clave de ingesta del servidor"
        },
        {
          "type": "null"
        }
      ]
    },
    "verified_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "first_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_event_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "snippet": {
      "type": "string",
      "description": "Fragmento de seguimiento HTML"
    },
    "favorite": {
      "type": "boolean",
      "description": "Marcado con estrella por ti"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}

Tokens de API

POST /workspaces/:workspace_id/api_tokens.json Crear un token de API (el token se devuelve una sola vez) api_tokens_create

Permiso: member

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/api_tokens.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Un nombre para reconocer el token",
      "examples": [
        "CI deploys"
      ]
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "analytics.read",
          "analytics.export",
          "content.write",
          "sites.manage",
          "uptime.manage",
          "members.manage",
          "tokens.manage",
          "billing.manage",
          "workspace.manage"
        ]
      },
      "description": "Permisos (omítelo para todos los tuyos, una lista vacía se rechaza)"
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Restringir a estos ids de sitio (pa_…). Vacío = todos",
      "default": []
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Fecha de caducidad (ISO 8601). Vacío = nunca"
    },
    "allowed_ips": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Aceptar solo solicitudes de estas IP/CIDR",
      "default": []
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "name",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "token": {
      "anyOf": [
        {
          "type": "string",
          "description": "El token en sí: solo se devuelve al crearlo"
        },
        {
          "type": "null"
        }
      ]
    },
    "token_prefix": {
      "type": "string",
      "description": "Primeros caracteres, para reconocer el token"
    },
    "owner": {
      "type": "string",
      "description": "Correo del miembro al que pertenece"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Restringido a estos sitios (vacío = todos)"
    },
    "allowed_ips": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "oauth_client": {
      "anyOf": [
        {
          "type": "string",
          "description": "Cliente MCP que lo recibió"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "active, expired o revoked"
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "revoked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /workspaces/:workspace_id/api_tokens/:id.json Revocar un token de API api_tokens_delete

Permiso: member

Ejemplo
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/api_tokens/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "token": {
      "anyOf": [
        {
          "type": "string",
          "description": "El token en sí: solo se devuelve al crearlo"
        },
        {
          "type": "null"
        }
      ]
    },
    "token_prefix": {
      "type": "string",
      "description": "Primeros caracteres, para reconocer el token"
    },
    "owner": {
      "type": "string",
      "description": "Correo del miembro al que pertenece"
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "site_ids": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Restringido a estos sitios (vacío = todos)"
    },
    "allowed_ips": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "oauth_client": {
      "anyOf": [
        {
          "type": "string",
          "description": "Cliente MCP que lo recibió"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "description": "active, expired o revoked"
    },
    "expires_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "revoked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/api_tokens.json Listar tokens de API api_tokens_list

Permiso: member

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/api_tokens.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "include_revoked": {
      "type": "boolean",
      "description": "Listar también tokens revocados y caducados",
      "default": false
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "name": {
        "type": "string"
      },
      "token": {
        "anyOf": [
          {
            "type": "string",
            "description": "El token en sí: solo se devuelve al crearlo"
          },
          {
            "type": "null"
          }
        ]
      },
      "token_prefix": {
        "type": "string",
        "description": "Primeros caracteres, para reconocer el token"
      },
      "owner": {
        "type": "string",
        "description": "Correo del miembro al que pertenece"
      },
      "permissions": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "site_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Restringido a estos sitios (vacío = todos)"
      },
      "allowed_ips": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "oauth_client": {
        "anyOf": [
          {
            "type": "string",
            "description": "Cliente MCP que lo recibió"
          },
          {
            "type": "null"
          }
        ]
      },
      "status": {
        "type": "string",
        "description": "active, expired o revoked"
      },
      "expires_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "last_used_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "revoked_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}

Webhooks

GET /workspaces/:workspace_id/webhooks/:webhook_id/deliveries.json Listar los envíos de un webhook webhook_deliveries_list

Permiso: workspace.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:webhook_id/deliveries.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Solo envíos correctos o fallidos",
      "enum": [
        "succeeded",
        "failed"
      ]
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "webhook_id": {
      "type": "string",
      "description": "Webhook del recurso"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id",
    "webhook_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del envío, p. ej. whd_123"
      },
      "event": {
        "type": "string"
      },
      "status": {
        "type": "string",
        "description": "pending, succeeded o failed"
      },
      "status_code": {
        "anyOf": [
          {
            "type": "integer",
            "description": "Estado HTTP del último intento"
          },
          {
            "type": "null"
          }
        ]
      },
      "error": {
        "anyOf": [
          {
            "type": "string",
            "description": "Error de conexión del último intento"
          },
          {
            "type": "null"
          }
        ]
      },
      "attempt": {
        "type": "integer"
      },
      "duration_ms": {
        "anyOf": [
          {
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "payload": {
        "type": "object"
      },
      "response_body": {
        "anyOf": [
          {
            "type": "string",
            "description": "Primeros 2.000 caracteres"
          },
          {
            "type": "null"
          }
        ]
      },
      "delivered_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
POST /workspaces/:workspace_id/webhooks/:webhook_id/deliveries/:id/redeliver.json Volver a enviar un envío webhook_deliveries_redeliver

Permiso: workspace.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:webhook_id/deliveries/:id/redeliver.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "webhook_id": {
      "type": "string",
      "description": "Webhook del recurso"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "webhook_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del envío, p. ej. whd_123"
    },
    "event": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "description": "pending, succeeded o failed"
    },
    "status_code": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Estado HTTP del último intento"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Error de conexión del último intento"
        },
        {
          "type": "null"
        }
      ]
    },
    "attempt": {
      "type": "integer"
    },
    "duration_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "payload": {
      "type": "object"
    },
    "response_body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Primeros 2.000 caracteres"
        },
        {
          "type": "null"
        }
      ]
    },
    "delivered_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /workspaces/:workspace_id/webhooks.json Añadir un endpoint de webhook webhooks_create

Permiso: workspace.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Endpoint HTTPS que recibe JSON por POST",
      "examples": [
        "https://example.com/hooks/privatus"
      ]
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "alert.triggered",
          "alert.resolved",
          "goal.completed_threshold",
          "uptime.down",
          "uptime.up",
          "export.ready",
          "import.completed",
          "import.failed",
          "site.created",
          "site.deleted",
          "member.added",
          "usage.threshold"
        ]
      },
      "description": "Eventos a enviar"
    },
    "enabled": {
      "type": "boolean",
      "description": "Enviar entregas",
      "default": true
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    }
  },
  "required": [
    "url",
    "events",
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del webhook, p. ej. wh_7Q2K9XH3AB"
    },
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "description": "active, failing o disabled"
    },
    "secret": {
      "type": "string",
      "description": "Secreto de firma para Privatus-Signature"
    },
    "consecutive_failures": {
      "type": "integer"
    },
    "last_success_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_failure_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
DELETE /workspaces/:workspace_id/webhooks/:id.json Eliminar un webhook webhooks_delete

Permiso: workspace.manage

Ejemplo
curl -X DELETE https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del webhook, p. ej. wh_7Q2K9XH3AB"
    },
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "description": "active, failing o disabled"
    },
    "secret": {
      "type": "string",
      "description": "Secreto de firma para Privatus-Signature"
    },
    "consecutive_failures": {
      "type": "integer"
    },
    "last_success_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_failure_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
GET /workspaces/:workspace_id/webhooks.json Listar webhooks webhooks_list

Permiso: workspace.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "page": {
      "type": "integer",
      "description": "Página (desde 1)"
    },
    "per_page": {
      "type": "integer",
      "description": "Resultados por página (máx. 100)"
    }
  },
  "required": [
    "workspace_id"
  ]
}
Datos de respuesta
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Id del webhook, p. ej. wh_7Q2K9XH3AB"
      },
      "url": {
        "type": "string"
      },
      "events": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "enabled": {
        "type": "boolean"
      },
      "status": {
        "type": "string",
        "description": "active, failing o disabled"
      },
      "secret": {
        "type": "string",
        "description": "Secreto de firma para Privatus-Signature"
      },
      "consecutive_failures": {
        "type": "integer"
      },
      "last_success_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "last_failure_at": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ]
      },
      "created_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  }
}
GET /workspaces/:workspace_id/webhooks/:id.json Obtener un webhook webhooks_get

Permiso: workspace.manage

Ejemplo
curl https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN"
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del webhook, p. ej. wh_7Q2K9XH3AB"
    },
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "description": "active, failing o disabled"
    },
    "secret": {
      "type": "string",
      "description": "Secreto de firma para Privatus-Signature"
    },
    "consecutive_failures": {
      "type": "integer"
    },
    "last_success_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_failure_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
POST /workspaces/:workspace_id/webhooks/:id/test.json Enviar un envío de prueba webhooks_test

Permiso: workspace.manage

Ejemplo
curl -X POST https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id/test.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del envío, p. ej. whd_123"
    },
    "event": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "description": "pending, succeeded o failed"
    },
    "status_code": {
      "anyOf": [
        {
          "type": "integer",
          "description": "Estado HTTP del último intento"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string",
          "description": "Error de conexión del último intento"
        },
        {
          "type": "null"
        }
      ]
    },
    "attempt": {
      "type": "integer"
    },
    "duration_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "payload": {
      "type": "object"
    },
    "response_body": {
      "anyOf": [
        {
          "type": "string",
          "description": "Primeros 2.000 caracteres"
        },
        {
          "type": "null"
        }
      ]
    },
    "delivered_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
PATCH /workspaces/:workspace_id/webhooks/:id.json Actualizar un webhook (eventos, URL, activado, rotar secreto) webhooks_update

Permiso: workspace.manage

Ejemplo
curl -X PATCH https://privatusanalytics.com/workspaces/:workspace_id/webhooks/:id.json \
  -H "Authorization: Bearer $PRIVATUS_TOKEN" \
  -H "Content-Type: application/json" -d '{…}'
Entradas
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Endpoint HTTPS"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "alert.triggered",
          "alert.resolved",
          "goal.completed_threshold",
          "uptime.down",
          "uptime.up",
          "export.ready",
          "import.completed",
          "import.failed",
          "site.created",
          "site.deleted",
          "member.added",
          "usage.threshold"
        ]
      },
      "description": "Eventos a enviar"
    },
    "enabled": {
      "type": "boolean",
      "description": "Enviar entregas"
    },
    "rotate_secret": {
      "type": "boolean",
      "description": "Reemplazar el secreto de firma",
      "default": false
    },
    "workspace_id": {
      "type": "string",
      "description": "Id del espacio de trabajo, p. ej. ws_7Q2K9XH3AB"
    },
    "id": {
      "type": "string",
      "description": "Id del recurso"
    }
  },
  "required": [
    "workspace_id",
    "id"
  ]
}
Datos de respuesta
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id del webhook, p. ej. wh_7Q2K9XH3AB"
    },
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "description": "active, failing o disabled"
    },
    "secret": {
      "type": "string",
      "description": "Secreto de firma para Privatus-Signature"
    },
    "consecutive_failures": {
      "type": "integer"
    },
    "last_success_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "last_failure_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}