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

    Add a poll option

    This action adds a new option to a poll.


    HTTP request

    POST https://api-{application_id}.sendbird.com/v3/polls/{poll_id}/options
    

    Parameters

    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

    The following table lists the properties that this action supports.

    Properties
    RequiredTypeDescription

    text

    string

    Specifies the description of a new option. The maximum length is 2,000 characters.

    OptionalTypeDescription

    created_by

    string

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


    Response

    If successful, this action returns a 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.