Adjust points
Add loyalty points to a viewer, or take points away with a negative amount.
POST https://cotlet.dev/api/v1/streamelements/points/adjust
write Confirm
Adds the amount to the viewer's current balance, like Give Points on the Leaderboard tab, and returns the new balance. A negative amount removes points. A viewer can hold at most 2,147,483,647 points. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| username string required | string | Viewer username, as on the leaderboard. |
| amount integer required | integer | Points to add. Negative removes points. |
Request
curl -X POST https://cotlet.dev/api/v1/streamelements/points/adjust \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username":"mika_r","amount":500}' result = client.call("streamelements", "adjust_points", {"username":"mika_r","amount":500}) const result = await cotlet.call('streamelements', 'adjust_points', {"username":"mika_r","amount":500}); cotlet call streamelements adjust_points --data '{"username":"mika_r","amount":500}' Example response
{
"username": "mika_r",
"added": 500,
"points": 2340
}