Units
Fixed-price events, priced FLAT, SLAB or VOLUME. Nothing is deleted — archive instead.
Base URL https://payments.clocknext.com/api/v1
Lists your units. Pass active=true for active ones only.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
active?booleantrue returns only active units.
Units.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The workspace's units.
curl -X GET 'https://payments.clocknext.com/api/v1/units?active=true'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Request processed successfully." }, "result": { "units": [ { "id": "cmvgv92mk000n08l5jjjxnnul", "name": "PDF Export", "agentKey": "pdf_export", "description": "One exported PDF report", "pricingType": "FLAT", "flatPrice": 0.25, "tiers": [], "isActive": true, "createdAt": "2026-10-20T15:56:52.748Z", "updatedAt": "2026-10-20T15:56:52.748Z" }, { "id": "cmvgv92vf000o08l5qnqm39eo", "name": "Voice Minute", "agentKey": "voice_minute", "description": "One minute of voice-agent call time", "pricingType": "FLAT", "flatPrice": 0.06, "tiers": [], "isActive": true, "createdAt": "2026-10-20T15:56:53.067Z", "updatedAt": "2026-10-20T16:05:17.414Z" }, { "id": "cmvgv9342000p08l59sk1lk51", "name": "Web Scrape", "agentKey": "web_scrape", "description": "Updated 2026-10-20 — unit description", "pricingType": "SLAB", "flatPrice": 0, "tiers": [ { "id": "cmvgv9346000q08l5m2bwxenu", "upTo": 1000, "price": 0.012, "order": 0 }, { "id": "cmvgv9346000r08l51j8eism0", "upTo": 5000, "price": 0.009, "order": 1 }, { "id": "cmvgv9346000s08l501x42the", "upTo": null, "price": 0.006, "order": 2 } ], "isActive": true, "createdAt": "2026-10-20T15:56:53.378Z", "updatedAt": "2026-10-20T16:05:13.120Z" }, { "id": "cmvgv93fx000007iiew8xnjd8", "name": "Seat", "agentKey": "seat", "description": "One active workspace seat", "pricingType": "VOLUME", "flatPrice": 0, "tiers": [ { "id": "cmvgv93g1000107ii3qewqa3l", "upTo": 10, "price": 12, "order": 0 }, { "id": "cmvgv93g2000207iij83us6ox", "upTo": 50, "price": 10, "order": 1 }, { "id": "cmvgv93g2000307iiu4njc6lk", "upTo": null, "price": 8, "order": 2 } ], "isActive": true, "createdAt": "2026-10-20T15:56:53.805Z", "updatedAt": "2026-10-20T15:56:53.805Z" } ] }}Base URL https://payments.clocknext.com/api/v1
Creates a unit. The last tier must have upTo: null.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
application/json- body
SLAB and VOLUME need tiers. FLAT: flatPrice per unit. SLAB: each band of tiers prices its units. VOLUME: the band the total is in prices all units. Worked example, 3000 units (0.01 to 1000, then 0.008): SLAB 26, VOLUME 24.
name*stringThe unit's name. Must be unique in the workspace, ignoring case (409 if taken).
1 <= length <= 80agentKey*stringThe key a unit signal names. Unique among your units (409 if taken).
^[A-Za-z0-9._-]+$1 <= length <= 80description?|Optional note about the unit. An empty string is saved as null.
length <= 400pricingType*stringHow units are priced. FLAT uses flatPrice. SLAB and VOLUME use tiers.
"FLAT""SLAB""VOLUME"flatPrice?numberFLAT only.
0 <= valuetiers?array<>SLAB / VOLUME only. Last tier has upTo: null.
items <= 50Unit created.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The new unit.
curl -X POST 'https://payments.clocknext.com/api/v1/units' \ -H 'Content-Type: application/json' \ -d '{ "name": "PDF Export", "agentKey": "pdf_export", "description": "One exported PDF report", "pricingType": "FLAT", "flatPrice": 0.25}'{ "statusCode": 201, "statusDetail": { "status": "SUCCESS", "message": "Unit created." }, "result": { "created": true, "unit": { "id": "cmvgv92mk000n08l5jjjxnnul", "name": "PDF Export", "agentKey": "pdf_export", "description": "One exported PDF report", "pricingType": "FLAT", "flatPrice": 0.25, "tiers": [], "isActive": true, "createdAt": "2026-10-20T15:56:52.748Z", "updatedAt": "2026-10-20T15:56:52.748Z" } }}Base URL https://payments.clocknext.com/api/v1
Updates only the fields you send. tiers, when sent, is the complete new list. A tier keeps its id: matched by id, else by position. Only a new tier gets a new id; a saved tier left out is removed. An unknown or repeated tier id is a 400.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringUnit id.
application/json- body
Only sent fields change. FLAT: flatPrice per unit. SLAB: each band of tiers prices its units. VOLUME: the band the total is in prices all units. Worked example, 3000 units (0.01 to 1000, then 0.008): SLAB 26, VOLUME 24.
name?stringA new name. Must be unique in the workspace, ignoring case (409 if taken).
1 <= length <= 80agentKey?stringA new key for unit signals. Unique among your units (409 if taken).
^[A-Za-z0-9._-]+$1 <= length <= 80description?|A new note. Send null to clear it.
length <= 400pricingType?stringA new pricing type. A change to FLAT removes all tiers.
"FLAT""SLAB""VOLUME"flatPrice?numberA new price in USD for each unit. FLAT only.
0 <= valuetiers?array<>The complete new tier list, for SLAB or VOLUME only. Saved tiers that you leave out are removed.
items <= 50Unit updated.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The updated unit.
curl -X PATCH 'https://payments.clocknext.com/api/v1/units/un_5q9w4' \ -H 'Content-Type: application/json' \ -d '{ "tiers": [ { "upTo": 1000, "price": 0.012 }, { "upTo": 5000, "price": 0.009 }, { "upTo": null, "price": 0.006 } ]}'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Unit updated." }, "result": { "updated": true, "unit": { "id": "cmvgv9342000p08l59sk1lk51", "name": "Web Scrape", "agentKey": "web_scrape", "description": "Updated 2026-10-20 — unit description", "pricingType": "SLAB", "flatPrice": 0, "tiers": [ { "id": "cmvgv9346000q08l5m2bwxenu", "upTo": 1000, "price": 0.012, "order": 0 }, { "id": "cmvgv9346000r08l51j8eism0", "upTo": 5000, "price": 0.009, "order": 1 }, { "id": "cmvgv9346000s08l501x42the", "upTo": null, "price": 0.006, "order": 2 } ], "isActive": true, "createdAt": "2026-10-20T15:56:53.378Z", "updatedAt": "2026-10-20T16:05:13.120Z" } }}Base URL https://payments.clocknext.com/api/v1
Gets one unit.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringUnit id.
The unit.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The unit with this id, in unit.
curl -X GET 'https://payments.clocknext.com/api/v1/units/un_5q9w4'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Request processed successfully." }, "result": { "unit": { "id": "cmvgv9342000p08l59sk1lk51", "name": "Web Scrape", "agentKey": "web_scrape", "description": "Updated 2026-10-20 — unit description", "pricingType": "SLAB", "flatPrice": 0, "tiers": [ { "id": "cmvgv9346000q08l5m2bwxenu", "upTo": 1000, "price": 0.01, "order": 0 }, { "id": "cmvgv9346000r08l51j8eism0", "upTo": 5000, "price": 0.008, "order": 1 }, { "id": "cmvgv9346000s08l501x42the", "upTo": null, "price": 0.005, "order": 2 } ], "isActive": true, "createdAt": "2026-10-20T15:56:53.378Z", "updatedAt": "2026-10-20T16:04:56.741Z" } }}Base URL https://payments.clocknext.com/api/v1
Archives a unit. Nothing is deleted.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringUnit id.
Unit archived.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The archived unit.
curl -X POST 'https://payments.clocknext.com/api/v1/units/un_5q9w4/archive'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Unit archived." }, "result": { "archived": true, "unit": { "id": "cmvgv9342000p08l59sk1lk51", "name": "Web Scrape", "agentKey": "web_scrape", "description": "Updated 2026-10-20 — unit description", "pricingType": "SLAB", "flatPrice": 0, "tiers": [ { "id": "cmvgv9346000q08l5m2bwxenu", "upTo": 1000, "price": 0.01, "order": 0 }, { "id": "cmvgv9346000r08l51j8eism0", "upTo": 5000, "price": 0.008, "order": 1 }, { "id": "cmvgv9346000s08l501x42the", "upTo": null, "price": 0.005, "order": 2 } ], "isActive": false, "createdAt": "2026-10-20T15:56:53.378Z", "updatedAt": "2026-10-20T16:04:55.760Z" } }}Base URL https://payments.clocknext.com/api/v1
Restores an archived unit.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringUnit id.
Unit unarchived.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The restored unit.
curl -X POST 'https://payments.clocknext.com/api/v1/units/un_5q9w4/unarchive'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Unit restored." }, "result": { "unarchived": true, "unit": { "id": "cmvgv9342000p08l59sk1lk51", "name": "Web Scrape", "agentKey": "web_scrape", "description": "Updated 2026-10-20 — unit description", "pricingType": "SLAB", "flatPrice": 0, "tiers": [ { "id": "cmvgv9346000q08l5m2bwxenu", "upTo": 1000, "price": 0.01, "order": 0 }, { "id": "cmvgv9346000r08l51j8eism0", "upTo": 5000, "price": 0.008, "order": 1 }, { "id": "cmvgv9346000s08l501x42the", "upTo": null, "price": 0.005, "order": 2 } ], "isActive": true, "createdAt": "2026-10-20T15:56:53.378Z", "updatedAt": "2026-10-20T16:04:56.420Z" } }}Types
Every object type on this page, with its fields.
Unit
FLAT: flatPrice per unit. SLAB: each band of tiers prices its units. VOLUME: the band the total is in prices all units. Worked example, 3000 units (0.01 to 1000, then 0.008): SLAB 26, VOLUME 24.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The unit's id. |
name | string | yes | The unit's name. Unique in the workspace, ignoring case. |
agentKey | string | yes | Unique key a unit signal names. |
description | string | null | yes | Optional note about the unit. null when not set. |
pricingType | "FLAT" | "SLAB" | "VOLUME" | yes | FLAT uses flatPrice; SLAB and VOLUME use tiers. See the Unit type for the rule. |
flatPrice | number | yes | FLAT only. |
tiers | UnitTier[] | yes | SLAB / VOLUME only. |
isActive | boolean | yes | false once archived; it can't go on a new plan. Read-only: use archive and unarchive. |
createdAt | string | yes | When the unit was created. |
updatedAt | string | yes | When the unit was last changed. |
UnitTier
One price band of a SLAB or VOLUME unit. Tiers are in order, and each upTo is larger than the one before.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Stays the same when the unit is updated, until this tier is removed. |
upTo | integer | null | yes | The last unit this tier covers; the limit is included. null on the last tier: every unit above. |
price | number | yes | Price per unit. |
order | integer | yes | The tier's position in the list, from 0. Tiers are applied in this order. |
CreateUnitInput
SLAB and VOLUME need tiers. FLAT: flatPrice per unit. SLAB: each band of tiers prices its units. VOLUME: the band the total is in prices all units. Worked example, 3000 units (0.01 to 1000, then 0.008): SLAB 26, VOLUME 24.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The unit's name. Must be unique in the workspace, ignoring case (409 if taken). |
agentKey | string | yes | The key a unit signal names. Unique among your units (409 if taken). |
description | string | null | no | Optional note about the unit. An empty string is saved as null. |
pricingType | "FLAT" | "SLAB" | "VOLUME" | yes | How units are priced. FLAT uses flatPrice. SLAB and VOLUME use tiers. |
flatPrice | number | no | FLAT only. |
tiers | object[] | no | SLAB / VOLUME only. Last tier has upTo: null. |
CreateUnitInput.tiers
| Field | Type | Required | Description |
|---|---|---|---|
upTo | integer | null | yes | The last unit this tier covers, included. Larger than the one before. null on the last tier only. |
price | number | yes | Price in USD for each unit in this band. |
UpdateUnitInput
Only sent fields change. FLAT: flatPrice per unit. SLAB: each band of tiers prices its units. VOLUME: the band the total is in prices all units. Worked example, 3000 units (0.01 to 1000, then 0.008): SLAB 26, VOLUME 24.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | A new name. Must be unique in the workspace, ignoring case (409 if taken). |
agentKey | string | no | A new key for unit signals. Unique among your units (409 if taken). |
description | string | null | no | A new note. Send null to clear it. |
pricingType | "FLAT" | "SLAB" | "VOLUME" | no | A new pricing type. A change to FLAT removes all tiers. |
flatPrice | number | no | A new price in USD for each unit. FLAT only. |
tiers | object[] | no | The complete new tier list, for SLAB or VOLUME only. Saved tiers that you leave out are removed. |
UpdateUnitInput.tiers
| Field | Type | Required | Description |
|---|---|---|---|
id | string | no | The id of a saved tier, to update it. Leave it out to match the tier at the same position. |
upTo | integer | null | yes | The last unit this tier covers, included. Larger than the one before. null on the last tier only. |
price | number | yes | Price in USD for each unit in this band. |