For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update Element

Update element with specified id.

Update Element

PATCH https://environment.lvis.io/api/v2/elements/:element_id

Path Parameters

Name
Type
Description

element_id

string

Element ID.

Headers

Name
Type
Description

Authorization

string

Bearer JmsmU5gZb6xNVUgQGoKcQLvQjRhKAUSb

Content-Type

string

application/vnd.api+json

Request Body

Name
Type
Description

duration

integer

Element duration in seconds. Required for elements with duration.

start_mode

string

Start mode. Possible values: "manual", "timecode".

offset

integer

Element offset from event start in seconds. Required only for the "timecode" start mode.

action

string

Set to perform an action on element. Possible actions: "stop" - stop an active element; "reveal_answer" - reveal the answer of a quiz-element; "reveal_results" - reveal results of an element; "revoke" - revoke an element; "publish" - publish an element.

question

object

Question (with options) for poll-like elements.

correct_option

integer

Number of correct option. Available only for prediction and trivia.

reveal_results_mode

string

Set when the results will be revealed to the client. Only for poll-like elements. Possible values: "vote", "close", "event_end", "never", "manual".

require_verified_user

boolean

Sets mode when only verified user can vote.

include_in_latest_results_feed

boolean

Include element results in latest results feed.

certification

boolean

Enables votes certification for poll-like elements.

max_votes_per_user

string

Maximum number of votes per user.

max_votes_per_option

integer

Maximum number of votes a user can cast per option.

min_options_per_vote

integer

Minimum options count allowed to vote.

max_options_per_vote

integer

Maximum options count allowed to vote.

reveal_answer_mode

string

Reveal answer mode for quiz elements. Possible values: "auto", "manual".

reveal_answer_in

integer

Answer reveal delay in seconds in auto mode for quiz elements.

fade

integer

A number of seconds between user's vote and when this vote will be faded out.

custom_fields

array

List of an element's custom fields. Each field is updated separately and if present its content is rewritten completely.

reveal_answer_on_vote

boolean

Enables reveal answer on vote for quiz elements.

Example

Update attributes for an element

In current example we change the question and options texts.

Publish an element

Element published via passing "publish" for action attribute.

Reveal answer

Reveal an answer for elements with manual reveal answer mode is possible via passing "reveal_answer" like the "action" attribute.

Validation error message about invalid custom_fields

When we are trying to update a field that doesn't exist in the element spec.

Last updated