Skip to main content
Create a counter

Authorizations

token
string
query
required

Standard authorization for most API calls. This token identifies the logged-in user and their permissions. It is obtained either as a temporary token after a successful login or as a long-term API key.

Query Parameters

name
string
required

Name the counter will be addressed by. A name that is already taken is not rejected - the existing counter is replaced.

Minimum string length: 1
Example:

"invoice_number"

pattern
string
required

Template the generated values are built from. Alongside static text it takes time segments ({year}, {month}, {day}, {hour}, {minute}, {second}) and incrementing segments — digits as {#} padded with leading zeroes or {$} left unpadded, letters as {@} padded with leading as or {%} left unpadded. Repeating the character widens the segment, so {###} counts up to 999 and then carries over into the segment on its left; once the leftmost one overflows, the counter is exhausted and refuses to generate further values.

Example:

"ID-{year}-{@@}-{###}"

timeResetColumn
enum<string>

Time segment whose change restarts the incrementing segments from their initial value — year starts a fresh series every year. The segment has to appear in the pattern, and every coarser one should too, otherwise values from two periods collide. Left empty, the sequence keeps incrementing until it is exhausted.

Available options:
year,
month,
day,
hour,
minute,
second,
null
Example:

"year"

Response

The counter was created.

status
string

Outcome of the operation, reported as a status type constant.

Example:

"SUCCESS"