Chat / Platform API
    Chat Platform API v3
    Chat Platform API
    Chat
    Platform API
    Version 3
    Home
    /
    Chat
    /
    Platform API
    /
    Message

    List scheduled messages

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


    HTTP request

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

    Parameters

    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

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

    {
        "scheduled_messages" : [
            {
                "scheduled_message_id" : 1,
                "message_type" : "MESG",
                "message" : "hi",
            }
        ],
        "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.