elements
Create Element in list
Create Element in list
Required security scopes:
- api:update
post/lists/{list_id}/elements
Request
- The document declares no server URL.
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
list_idstring required
The ID of the list to apply the operation on. Can be a to z (both upper/lower case), 0 to 9 or one of these characters _-.
Query parameters
rangeinteger
Return this number of elements above and below the current element in neighbors field.
Request body
Example request
{
"id": 100,
"payload": {
"country": "dk",
"name": "Mark Anthony"
},
"score": 100,
"tie_breaker": 2000
}Response
OK
Example response
{
"from_bottom": 4000,
"from_top": 50,
"id": 100,
"list_id": "highscore-list",
"local_from_bottom": 4000,
"local_from_top": 50,
"neighbors": {
"above": [
{
"from_bottom": 4000,
"from_top": 50,
"id": 100,
"list_id": "highscore-list",
"payload": {
"country": "dk",
"name": "Mark Anthony"
},
"score": 100,
"tie_breaker": 2000,
"updated_at": "1996-11-22T14:02:34Z"
},
{
"from_bottom": 4000,
"from_top": 50,
"id": 100,
"list_id": "highscore-list",
"payload": {
"country": "dk",
"name": "Mark Anthony"
},
"score": 100,
"tie_breaker": 2000,
"updated_at": "1996-11-22T14:02:34Z"
}
],
"below": [
{
"from_bottom": 4000,
"from_top": 50,
"id": 100,
"list_id": "highscore-list",
"payload": {
"country": "dk",
"name": "Mark Anthony"
},
"score": 100,
"tie_breaker": 2000,
"updated_at": "1996-11-22T14:02:34Z"
},
{
"from_bottom": 4000,
"from_top": 50,
"id": 100,
"list_id": "highscore-list",
"payload": {
"country": "dk",
"name": "Mark Anthony"
},
"score": 100,
"tie_breaker": 2000,
"updated_at": "1996-11-22T14:02:34Z"
},
{
"from_bottom": 4000,
"from_top": 50,
"id": 100,
"list_id": "highscore-list",
"payload": {
"country": "dk",
"name": "Mark Anthony"
},
"score": 100,
"tie_breaker": 2000,
"updated_at": "1996-11-22T14:02:34Z"
}
]
},
"payload": {
"country": "dk",
"name": "Mark Anthony"
},
"score": 100,
"tie_breaker": 2000,
"updated_at": "2011-03-06T07:38:11Z"
}Changes
No recorded changes to this operation across all 1 revision of this API.