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

    List announcements

    Retrieves a list of announcements.


    HTTP request

    GET https://api-{application_id}.sendbird.com/v3/announcements
    

    Parameters

    The following table lists the parameters that this action supports.

    Optional
    Parameter nameTypeDescription

    token

    string

    Specifies a token that indicates the starting index of results to retrieve. If not specified, the index is set as 0.

    limit

    int

    Specifies the number of results to retrieve per page. Acceptable values are 1 to 100, inclusive. (Default: 10)

    order

    string

    Specifies the method to sort a list of results. Acceptable values are the following:
    - created_at (default): sorts by the time of announcement creation in reverse chronological order. The most recently created announcement appears first.
    - scheduled_at: sorts by the time the announcement is scheduled to begin in reverse chronological order. The most immediate announcement appears first.

    status

    string

    Specifies the announcement status to retrieve. If not specified, all announcements are returned, regardless of their status.

    announcement_group

    string

    Specifies the name of an announcement group to retrieve. If not specified, all announcements are returned, regardless of their announcement group.

    ?limit=20&token=Z3UYLAYLAAoaTxgADAwNQD8~
    

    Response

    If successful, this action returns a list of announcement resources in the response body.

    {
        "announcements": [
            {
                "unique_id": "marketing_announcement_20200211",
                "announcement_group": "insurance",
                "message": {
                    "type": "MESG",
                    "custom_type": "campaign",
                    "user_id": "insurance_bot",
                    "content": "Smart ways to save your insurance premiums!",
                    "data": ""
                },
                "enable_push": true,
                "target_at": "sender_all_channels",
                "target_user_count": -1,
                "target_channel_count": -1,
                "status": "scheduled",
                "scheduled_at": 1542756099266,
                "cease_at": "2100",
                "resume_at": "0900",
                "completed_at": 0,
                "sent_user_count": 0,
                "open_count": 0,
                "open_rate": 0
            },
            ... # More announcements
        ],
        "next": "ansYQFFRQ1AIEUBXX1RcE2d0FUZSUlkJFVQRHB86AkAgNn8eABABBBNFX..."
    }
    

    List of response properties

    Property nameTypeDescription

    next

    string

    The value that can be used in the token parameter to retrieve the next page in the result set.

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