ReelPlusReelPlus Help
API ReferenceWidget Analytics

Widget Analytics

Retrieve per-widget performance metrics with pagination, sorting, and type filtering. Get analytics for all widgets or a specific widget by ID.


GET
/api/v1/analytics/widgets

Authorization

BearerAuth
AuthorizationBearer <token>

API key with rp_ prefix. Generate from Settings > API Access in your ReelPlus dashboard.

Format: rp_{64 hex characters}

Example: rp_your_api_key_here

In: header

Query Parameters

start_date?string

Start of the date range (ISO 8601). Defaults to 30 days ago.

Formatdate
end_date?string

End of the date range (ISO 8601). Defaults to now.

Formatdate
page?integer

Page number (1-indexed).

Default1
Range1 <= value
limit?integer

Results per page (max 100).

Default10
Range1 <= value <= 100
sort_by?string

Field to sort results by.

Default"views"
Value in"views" | "clicks" | "impressions" | "add_to_cart" | "orders" | "revenue" | "title" | "created_at"
sort_order?string

Sort direction.

Default"desc"
Value in"asc" | "desc"
widget_type?string

Filter by widget type.

Value in"carousel" | "story" | "floating" | "productpage"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://production.reelplus.app/api/v1/analytics/widgets"
{
  "success": true,
  "data": [
    {
      "id": "widget-xyz789",
      "title": "Home Carousel",
      "type": "carousel",
      "status": "active",
      "video_count": 8,
      "metrics": {
        "impressions": 5600,
        "views": 1450,
        "clicks": 195,
        "add_to_cart": 42,
        "orders": 12,
        "revenue": 967.8
      }
    }
  ],
  "meta": {
    "start_date": "2025-01-01T00:00:00.000Z",
    "end_date": "2025-01-31T23:59:59.999Z"
  },
  "pagination": {
    "page": 1,
    "limit": 10,
    "total_count": 42,
    "total_pages": 5
  }
}
{
  "success": false,
  "error": {
    "code": "INVALID_DATE",
    "message": "Invalid date format. Use ISO 8601: YYYY-MM-DD"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Missing or invalid Authorization header. Use: Authorization: Bearer rp_xxx"
  }
}
{
  "success": false,
  "error": {
    "code": "INVALID_API_KEY",
    "message": "Invalid or revoked API key"
  }
}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please retry after 42 seconds."
  }
}
GET
/api/v1/analytics/widget/{widgetId}

Authorization

BearerAuth
AuthorizationBearer <token>

API key with rp_ prefix. Generate from Settings > API Access in your ReelPlus dashboard.

Format: rp_{64 hex characters}

Example: rp_your_api_key_here

In: header

Path Parameters

widgetId*string

The unique widget identifier.

Query Parameters

start_date?string

Start of the date range (ISO 8601). Defaults to 30 days ago.

Formatdate
end_date?string

End of the date range (ISO 8601). Defaults to now.

Formatdate

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://production.reelplus.app/api/v1/analytics/widget/widget-xyz789"
{
  "success": true,
  "data": {
    "id": "widget-xyz789",
    "title": "Home Carousel",
    "type": "carousel",
    "status": "active",
    "video_count": 8,
    "metrics": {
      "impressions": 5600,
      "views": 1450,
      "clicks": 195,
      "add_to_cart": 42,
      "orders": 12,
      "revenue": 967.8
    }
  },
  "meta": {
    "start_date": "2025-01-01T00:00:00.000Z",
    "end_date": "2025-01-31T23:59:59.999Z"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Missing or invalid Authorization header. Use: Authorization: Bearer rp_xxx"
  }
}
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  }
}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Too many requests. Please retry after 42 seconds."
  }
}