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

    Update a poll

    Copy link

    This action updates information of a poll. To change the content of a poll option, see the update a poll option page.


    HTTP request

    Copy link
    PUT https://api-{application_id}.sendbird.com/v3/polls/{poll_id}
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Required
    Parameter nameTypeDescription

    poll_id

    integer

    Specifies the unique ID of the poll.


    Request body

    Copy link

    The following table lists the properties that this action supports.

    Optional
    Property nameTypeDescription

    title

    string

    Specifies the title of a poll. The length is limited to 2,000 characters.

    allow_user_suggestion

    boolean

    Determines whether to allow users other than the creator of the poll to add new options to the poll. (Default: false)

    allow_multiple_votes

    boolean

    Determines whether to allow users to vote for multiple options. (Default: false)

    close_at

    long

    Specifies when the poll closes and no longer accepts votes in Unix seconds. If the value of this property is -1, the poll is open indefinitely.

    created_by

    string

    Specifies the unique ID of the user who creates the poll.

    data

    object

    Specifies a JSON object of one or more key-value items to store additional poll information.


    Response

    Copy link

    If successful, this action returns an updated poll resource in the response body.

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