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

Parameters: adjust_points
NameTypeDescription
username string required string Viewer username, as on the leaderboard.
amount integer required integer Points to add. Negative removes points.

Request

cURL
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}'
Python
result = client.call("streamelements", "adjust_points", {"username":"mika_r","amount":500})
Node.js
const result = await cotlet.call('streamelements', 'adjust_points', {"username":"mika_r","amount":500});
CLI
cotlet call streamelements adjust_points --data '{"username":"mika_r","amount":500}'

Example response

JSON

{
  "username": "mika_r",
  "added": 500,
  "points": 2340
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.