Skip to content
TipPage Docs
Esc
↑↓navigate↵open⌘Jpreview

Set a counter

Sets an absolute value, creating the counter if it doesn’t exist yet. Overlay labels bound to it update live and counter.updated fires. Requires counters:manage.

PUT/counters/{name}
Authorization
AuthorizationBearer token (tp_live_... or tpat_...) · headerrequired

A TipPage API key (tp_live_..., created in Dashboard → Settings → Developer) or an OAuth 2.0 access token (tpat_..., see the OAuth guide). Both carry the same scopes and are accepted on every endpoint.

Path parameters
namestringrequired

The counter's name.

matches ^[a-z0-9_-]{1,64}$
Request body
requiredapplication/json
valueintegerrequired

New absolute value.

Responses
200

The counter after the write.

counterCounter
Show properties
namestring

The counter's name - its key on every surface (chat tokens, labels, this API).

valueinteger
created_atstring<date-time>
updated_atstring<date-time>
400

Invalid name or value.

errorstringrequired

Human-readable message.

codestring

Machine-readable code (e.g. missing_scope, not_in_queue).

401

Missing or invalid credential (missing_api_key / invalid_api_key, or invalid_token for an expired/revoked OAuth access token).

errorstringrequired

Human-readable message.

codestring

Machine-readable code (e.g. missing_scope, not_in_queue).

403

The key lacks the required scope (missing_scope).

errorstringrequired

Human-readable message.

codestring

Machine-readable code (e.g. missing_scope, not_in_queue).

required_scopestring
429

Rate limit exceeded - check the RateLimit-* headers.

errorstring
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT 'https://api.tippage.com/v1/counters/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "value": 0
}'
Response
{
  "counter": {
    "name": "deaths",
    "value": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}