/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    List scheduled messages

    Copy link

    This action retrieves a list of scheduled messages. A user can only see the list of their own scheduled messages.


    HTTP request

    Copy link
    GET https://api-{application_id}.sendbird.com/v3/scheduled_messages
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Optional
    Parameter nameTypeDescription

    channel_type

    string

    Specifies the type of the channel.

    channel_url

    string

    Specifies the URL of the channel.

    sender_id

    string

    Specifies the user ID of the sender.

    token

    string

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

    limit

    int

    Specifies the number of data exports to return 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 scheduled message creation in reverse chronological order. The most recently created scheduled message appears first.
    - scheduled_at: sorts by the time the scheduled message is scheduled to begin in reverse chronological order. The most immediate scheduled message appears first.

    reverse

    boolean

    Determines whether the sort order is reversed.

    status[]

    array of objects

    Specifies the scheduled message status to retrieve. If not specified, all scheduled messages are returned, regardless of their status.

    message_type

    string

    Specifies a message type to retrieve. Acceptable values are MESG, FILE, and ADMM. If not specified, all scheduled messages are returned regardless of their message type.


    Response

    Copy link

    If successful, this action returns a list of scheduled messages resource in the response body.

    {
        "scheduled_messages" : [
            {
                "scheduled_message_id": 123,
                "type": "MESG",
                "scheduled_status": "pending",
                "scheduled_at": 1231231231231,
                "created_at": 1231231231231,
                "channel_url": "channel url",
                "mark_as_read": true,
                "apple_critical_alert_options": {},
                "push_option": "default",
                "req_id": "",
                "target_langs": [],
                "mentioned_message_template": null,
                "mention_type": "users",
                "custom_type": "",
                "data": "",
                "send_push": true,
                "sorted_metaarray": [],
                "dedup_id": "",
                "apns_bundle_id": "",
                "silent": false,
                "message": "hello",
                "user": {
                    "user_id": "user id",
                    "profile_url": "",
                    "require_auth_for_profile_image": false,
                    "nickname": "nickname",
                    "metadata": {},
                    "role": "operator",
                    "is_blocked_by_me": false,
                    "is_active": true
                }
            }
        ],
        "next" : "token for next page"
    }
    

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