Skip to Content

GetRetentionAnalytics

POST
/analytics/v1/retention

Authorization

headerX-API-Key<token>

API key for protected endpoints, supplied in the X-API-Key header.

Request Body

required
application/json
{
  "$ref": "#/components/schemas/analytics.v1.GetRetentionRequest",
  "$ref-value": {
    "type": "object",
    "properties": {
      "period": {
        "type": "string",
        "examples": [
          "30d"
        ],
        "title": "period"
      },
      "range": {
        "title": "range",
        "$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": "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
  }
}
default
curl -X POST 'https://api.rixl.com/analytics/v1/retention'

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
  }
}