Chat / Platform API
Current version: v3
    Chat Platform API v3
    Chat Platform API
    Chat
    Platform API
    Home
    /
    Chat
    /
    Platform API

    View announcement statistics

    Retrieves daily, weekly, or monthly statistics of all announcements or a specific group of announcements.


    HTTP request

    dailyweeklymonthly
    GET https://api-{application_id}.sendbird.com/v3/announcement_stats/daily
    

    Parameters

    The following table lists the parameters that this action supports.

    Parameters
    RequiredTypeDescription

    start_date

    string

    Specifies the start date of the statistics' time range in YYYY-MM-DD format. This string is effective when using the endpoint /announcement_stats/daily. (Default maximum range: 31 days)

    end_date

    string

    Specifies the end date of the statistics' time range in YYYY-MM-DD format. This string is effective when using the endpoint /announcement_stats/daily. (Default maximum range: 31 days)

    start_week

    string

    Specifies the start week of the statistics' time range in YYYY-W# format. This string is effective when using the endpoint /announcement_stats/weekly. (Default maximum range: 5 weeks)

    end_week

    string

    Specifies the end week of the statistics' time range in YYYY-W# format. This string is effective when using the endpoint /announcement_stats/weekly. (Default maximum range: 5 weeks)

    start_month

    string

    Specifies the start month of the statistics' time range in YYYY-MM format. This string is effective when using the endpoint /announcement_stats/monthly. (Default maximum range: 1 month)

    end_month

    string

    Specifies the end month of the statistics' time range in YYYY-MM format. This string is effective when using the endpoint /announcement_stats/monthly. (Default maximum range: 1 month)

    OptionalTypeDescription

    announcement_group

    string

    Restricts the search scope to only retrieve announcements in a specified announcement group.

    Note: If you want to increase the default maximum range, contact our sales team.

    dailyweeklymonthly
    // Query string example
    ?start_date=2020-01-01&end_date=2020-01-15
    

    Response

    If successful, this action returns the statistics resources of all announcements or a specific group of announcements within a specified time range in the response body.

    dailyweeklymonthly
    # Status: 200 OK
    {
        "statistics": [
            {
                "date": "2020-01-01",
                "canceled_announcement_count": 1,
                "stopped_announcement_count": 1,
                "completed_announcement_count": 2,
                "total_announcement_count": 4,
                "target_channel_count": 175,
                "target_user_count": 500,
                "sent_channel_count": 175,
                "sent_user_count": 500,
                "open_rate": 0.71,
                "open_count": 355
            },
            ... # More statistics
        ],
        "days": 15
    }
    

    In the case of an error, an error object is returned. A detailed list of error codes is available here.