{"uid":"cap_-cFQQbr9aiCcT1y4YPSGV","slug":"named-counter-increment-api-6b870f50","name":"Named Counter Increment API","description":"Atomic counter: increment-and-return a named counter (collision-free running totals & IDs across agent runs). Send { name, token, by? }.","url":"https://x402-services-production.up.railway.app/api/counter?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["name","token"],"properties":{"by":{"type":"number","description":"Increment amount, default 1"},"name":{"type":"string","description":"Counter name (1-128 chars)"},"token":{"type":"string","description":"Your secret token (claims the counter)"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PCtWFkHFQNeU0Qt84v2-6","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Increments a named counter by a specified amount, authenticated by a secret token, and returns the updated count","exampleAgentPrompt":"Increment the counter named 'page-views' by 1 using my token 'abc123secret'.","exampleUseCases":[{"title":"Tracking API call volume","prompt":"Increment my counter called 'api-calls-today' by 1 using token 'mytoken42' — I want to keep track of how many requests my bot has made."},{"title":"Batch event counting","prompt":"Add 5 to the counter named 'orders-processed' using secret token 'shoptoken99' — I just handled a batch of 5 orders."},{"title":"Session hit counter","prompt":"Bump my counter 'active-sessions' by 1 with token 'sesstoken7' to record a new user session starting."}],"resultDescription":"Returns the updated counter value after the increment is applied. The response reflects the new running total for the named counter associated with the provided token.","failureModes":["Missing or invalid token — counter not claimed or unauthorized, returns error","Counter name out of range (empty or >128 chars) — validation error","Invalid increment amount (non-numeric) — returns 400-style error","Counter not found or token mismatch — unauthorized response","Service unavailable — Railway hosting downtime"],"whenToPreferThis":"Use this endpoint when you need a simple, persistent, named counter that can be incremented on demand without setting up a database or state management system. It is ideal for lightweight event tracking, call counting, or any scenario where a shared counter identified by name and claimed by a secret token suffices.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T00:54:42.122Z","isFirstParty":false,"canonicalSlug":"named-counter-increment-api-6b870f50"}