---
search:
  tags:
    - Counters
    - PUT
seo:
  description: >-
    Sets an absolute value, creating the counter if it doesn't exist yet.
    Overlay… Reference for the PUT /counters/{name} endpoint in the TipPage
    Developer API.
sidebar:
  label: Set a counter
  badge: PUT
title: Set a counter
type: openapi-operation
---
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}`

**Request body** (`application/json`, required)

- `value` (integer, required) — New absolute value.

Request body example:

```json
{
  "value": 0
}
```

**Responses**

- `200` — The counter after the write.
- `400` — Invalid name or value.
- `401` — Missing or invalid credential (\`missing\_api\_key\` / \`invalid\_api\_key\`, or \`invalid\_token\` for an expired/revoked OAuth access token).
- `403` — The key lacks the required scope (\`missing\_scope\`).
- `429` — Rate limit exceeded - check the \`RateLimit-\*\` headers.

Response example, 200:

```json
{
  "counter": {
    "name": "deaths",
    "value": 0,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
```
