CountTogether Public API Help

PATCH /v2/counters/{counterId}

Partially updates a counter. At least one field must be provided. Fields that do not apply to the counter type are rejected with 400.

curl -X PATCH -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "Updated Name"}' \ "https://developers.counttogether.app/v2/counters/018f5b54-9b11-7c33-b347-a2b4e2a6a111?timezone=Europe/Berlin"

Query Parameters

Parameter

Required

Description

timezone

No

IANA timezone name used to resolve value in the response. Falls back to the user's account timezone.

Request Body

{ "name": "Updated Name", "value": 100, "startDate": "2025-06-01", "endDate": "2025-12-31" }

All fields are optional, but at least one must be set. Fields are type-gated:

Field

Applicable Counter Types

name

All

value

UpDown only

startDate

FromDate only

endDate

ToDate only

Sending an inapplicable field (e.g. startDate for an UpDown counter) returns 400.

Successful Response (200)

Returns the updated flat counter object (same shape as GET /v2/counters/{id}):

{ "id": "018f5b54-9b11-7c33-b347-a2b4e2a6a111", "name": "Updated Name", "type": "UpDown", "value": 100, "created": "2025-01-01T00:00:00Z" }

Possible Errors

HTTP

Reason

400

No fields provided, or a field does not apply to the counter type

401

Missing or invalid token

403

User lacks permission

404

Counter not found

21 April 2026