GetRetentionAnalytics

POST/analytics/v1/retention

Request Body

required
application/json
{
  "$ref": "#/components/schemas/analytics.v1.GetRetentionRequest",
  "$ref-value": {
    "type": "object",
    "properties": {
      "period": {
        "type": "string",
        "examples": [
          "30d"
        ],
        "title": "period"
      },
      "range": {
        "allOf": [
          {
            "$ref": "#/components/schemas/analytics.v1.DateRange",
            "$ref-value": {
              "type": "object",
              "properties": {
                "start": {
                  "type": "string",
                  "examples": [
                    "2026-01-15T10:30:00Z"
                  ],
                  "title": "start"
                },
                "end": {
                  "type": "string",
                  "examples": [
                    "2026-01-15T10:30:00Z"
                  ],
                  "title": "end"
                }
              },
              "title": "DateRange",
              "additionalProperties": false
            }
          }
        ],
        "title": "range"
      }
    },
    "title": "GetRetentionRequest",
    "additionalProperties": false
  }
}

Response Body

200application/json

Success

type: unknown

{
  "$ref": "#/components/schemas/analytics.v1.RetentionAnalytics",
  "$ref-value": {
    "type": "object",
    "properties": {
      "period": {
        "type": "string",
        "examples": [
          "30d"
        ],
        "title": "period"
      },
      "cohorts": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/analytics.v1.RetentionCohort",
          "$ref-value": {
            "type": "object",
            "properties": {
              "cohort_date": {
                "type": "string",
                "title": "cohort_date"
              },
              "cohort_size": {
                "type": "integer",
                "examples": [
                  "1250"
                ],
                "title": "cohort_size",
                "format": "int32"
              },
              "retention_data": {
                "type": "array",
                "examples": [
                  "0.85"
                ],
                "items": {
                  "type": "number",
                  "examples": [
                    "0.85"
                  ],
                  "format": "double"
                },
                "title": "retention_data"
              }
            },
            "title": "RetentionCohort",
            "additionalProperties": false
          }
        },
        "title": "cohorts"
      }
    },
    "title": "RetentionAnalytics",
    "additionalProperties": false
  }
}
curl -X POST "https://api.rixl.com/analytics/v1/retention" \
  -H "Content-Type: application/json" \
  -d '{}'

Success

application/json

{
  "$ref": "#/components/schemas/analytics.v1.RetentionAnalytics",
  "$ref-value": {
    "type": "object",
    "properties": {
      "period": {
        "type": "string",
        "examples": [
          "30d"
        ],
        "title": "period"
      },
      "cohorts": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/analytics.v1.RetentionCohort",
          "$ref-value": {
            "type": "object",
            "properties": {
              "cohort_date": {
                "type": "string",
                "title": "cohort_date"
              },
              "cohort_size": {
                "type": "integer",
                "examples": [
                  "1250"
                ],
                "title": "cohort_size",
                "format": "int32"
              },
              "retention_data": {
                "type": "array",
                "examples": [
                  "0.85"
                ],
                "items": {
                  "type": "number",
                  "examples": [
                    "0.85"
                  ],
                  "format": "double"
                },
                "title": "retention_data"
              }
            },
            "title": "RetentionCohort",
            "additionalProperties": false
          }
        },
        "title": "cohorts"
      }
    },
    "title": "RetentionAnalytics",
    "additionalProperties": false
  }
}