## Create a poll `client.RealtimeKit.ActiveSession.NewPoll(ctx, appID, meetingID, params) (*ActiveSessionNewPollResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/poll` Creates a new poll in an active session for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `params ActiveSessionNewPollParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Options param.Field[[]string]` Body param: Different options for the question - `Question param.Field[string]` Body param: Question of the poll - `Anonymous param.Field[bool]` Body param: if voters on a poll are anonymous - `HideVotes param.Field[bool]` Body param: if votes on an option are visible before a person votes ### Returns - `type ActiveSessionNewPollResponse struct{…}` - `Data ActiveSessionNewPollResponseData` - `Action string` - `Poll ActiveSessionNewPollResponseDataPoll` - `ID string` ID of the poll - `Options []ActiveSessionNewPollResponseDataPollOption` Answer options - `Count float64` - `Text string` Text of the answer option - `Votes []ActiveSessionNewPollResponseDataPollOptionsVote` - `ID string` - `Name string` - `Question string` Question asked by the poll - `Anonymous bool` - `CreatedBy string` - `HideVotes bool` - `Voted []string` - `Success bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.RealtimeKit.ActiveSession.NewPoll( context.TODO(), "app_id", "meeting_id", realtime_kit.ActiveSessionNewPollParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Options: cloudflare.F([]string{"string"}), Question: cloudflare.F("question"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "action": "action", "poll": { "id": "id", "options": [ { "count": 0, "text": "text", "votes": [ { "id": "id", "name": "name" } ] } ], "question": "question", "anonymous": true, "created_by": "created_by", "hide_votes": true, "voted": [ "string" ] } }, "success": true } ```