Composites
Credits, outcomes and units billed together as one thing. Nothing is deleted — archive instead.
Base URL https://payments.clocknext.com/api/v1
Lists your composites. Pass active=true for active ones only.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
active?booleantrue returns only active composites.
Composites.
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 composites.
curl -X GET 'https://payments.clocknext.com/api/v1/composites?active=true'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Request processed successfully." }, "result": { "composites": [ { "id": "cmvgvfh1e000i08l2oi7oozop", "name": "Research Report", "refId": "research_report", "description": "One finished market-research report", "price": 12, "isActive": true, "createdAt": "2026-10-20T16:01:51.362Z", "updatedAt": "2026-10-20T16:01:51.362Z", "entitlements": { "credits": [ { "id": "cmvgvfdfz000608l2wsff83hq", "name": "Deep Research", "agentKey": "deep_research" } ], "outcomes": [ { "id": "cmvgvffxr000c08l28wch48fa", "name": "Contract Review", "agentKey": "contract_review" } ], "units": [ { "id": "cmvgv92mk000n08l5jjjxnnul", "name": "PDF Export", "agentKey": "pdf_export" } ] } }, { "id": "cmvgvfgqe000f08l219wzyt7v", "name": "Voice AI Call", "refId": "voice_call", "description": "Updated 2026-10-20 — composite description", "price": 1.75, "isActive": true, "createdAt": "2026-10-20T16:01:50.966Z", "updatedAt": "2026-10-20T16:05:14.182Z", "entitlements": { "credits": [ { "id": "cmvgvfd63000508l2oexbgpzs", "name": "Chat Message", "agentKey": "chat_message" } ], "outcomes": [], "units": [ { "id": "cmvgv92vf000o08l5qnqm39eo", "name": "Voice Minute", "agentKey": "voice_minute" } ] } } ] }}Base URL https://payments.clocknext.com/api/v1
Creates a composite. It bills only once a plan sells it.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
application/json- body
A new composite. Keys use letters, digits, ., _ and - (at most 80) and match exactly. A signal sends { "<refId>": "<your id>" }. price is charged only when a plan sells it.
name*stringThe composite's name. Must be unique in the workspace (409 if taken).
1 <= length <= 80refId*stringThe key your signals send in their composite block. Unique among your composites (409 if taken).
^[A-Za-z0-9._-]+$1 <= length <= 80description?|Optional note about the composite.
length <= 400price*numberPrice in USD for each completed occurrence. You set it. It is not calculated from the wrapped items.
0 <= value <= 10000000entitlements*At least one id.
Composite 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 composite.
curl -X POST 'https://payments.clocknext.com/api/v1/composites' \ -H 'Content-Type: application/json' \ -d '{ "name": "Research Report", "refId": "research_report", "description": "One finished market-research report", "price": 12, "entitlements": { "creditIds": [ "cmvgvfdfz000608l2wsff83hq" ], "outcomeIds": [ "cmvgvffxr000c08l28wch48fa" ], "unitIds": [ "cmvgv92mk000n08l5jjjxnnul" ] }}'{ "statusCode": 201, "statusDetail": { "status": "SUCCESS", "message": "Composite created." }, "result": { "created": true, "composite": { "id": "cmvgvfh1e000i08l2oi7oozop", "name": "Research Report", "refId": "research_report", "description": "One finished market-research report", "price": 12, "isActive": true, "createdAt": "2026-10-20T16:01:51.362Z", "updatedAt": "2026-10-20T16:01:51.362Z", "entitlements": { "credits": [ { "id": "cmvgvfdfz000608l2wsff83hq", "name": "Deep Research", "agentKey": "deep_research" } ], "outcomes": [ { "id": "cmvgvffxr000c08l28wch48fa", "name": "Contract Review", "agentKey": "contract_review" } ], "units": [ { "id": "cmvgv92mk000n08l5jjjxnnul", "name": "PDF Export", "agentKey": "pdf_export" } ] } } }}Base URL https://payments.clocknext.com/api/v1
Updates only the fields you send.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringComposite id.
application/json- body
Only the fields you send change. A new refId applies to signals at once, so update your callers first. With entitlements, a list left out counts as empty.
name?stringA new name. Must be unique in the workspace (409 if taken).
1 <= length <= 80refId?stringA new key for the composite block. Signals must use the new key at once.
^[A-Za-z0-9._-]+$1 <= length <= 80description?|A new note. Send null to clear it.
length <= 400price?numberA new price in USD for each completed occurrence. Plans already bought keep the price they were bought at.
0 <= value <= 10000000entitlements?At least one id.
Composite 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 composite.
curl -X PATCH 'https://payments.clocknext.com/api/v1/composites/cmp_7d1x9' \ -H 'Content-Type: application/json' \ -d '{ "price": 1.75, "entitlements": { "creditIds": [ "cmvgvfd63000508l2oexbgpzs" ], "unitIds": [ "cmvgv92vf000o08l5qnqm39eo" ] }}'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Composite updated." }, "result": { "updated": true, "composite": { "id": "cmvgvfgqe000f08l219wzyt7v", "name": "Voice AI Call", "refId": "voice_call", "description": "Updated 2026-10-20 — composite description", "price": 1.75, "isActive": true, "createdAt": "2026-10-20T16:01:50.966Z", "updatedAt": "2026-10-20T16:05:14.182Z", "entitlements": { "credits": [ { "id": "cmvgvfd63000508l2oexbgpzs", "name": "Chat Message", "agentKey": "chat_message" } ], "outcomes": [], "units": [ { "id": "cmvgv92vf000o08l5qnqm39eo", "name": "Voice Minute", "agentKey": "voice_minute" } ] } } }}Base URL https://payments.clocknext.com/api/v1
Gets one composite.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringComposite id.
The composite.
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 composite with this id, in composite.
curl -X GET 'https://payments.clocknext.com/api/v1/composites/cmp_7d1x9'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Request processed successfully." }, "result": { "composite": { "id": "cmvgvfgqe000f08l219wzyt7v", "name": "Voice AI Call", "refId": "voice_call", "description": "One inbound support call handled by the voice agent", "price": 1.5, "isActive": true, "createdAt": "2026-10-20T16:01:50.966Z", "updatedAt": "2026-10-20T16:01:50.966Z", "entitlements": { "credits": [ { "id": "cmvgvfd63000508l2oexbgpzs", "name": "Chat Message", "agentKey": "chat_message" } ], "outcomes": [], "units": [ { "id": "cmvgv92vf000o08l5qnqm39eo", "name": "Voice Minute", "agentKey": "voice_minute" } ] } } }}Base URL https://payments.clocknext.com/api/v1
Archives a composite. Nothing is deleted.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringComposite id.
Composite 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 composite.
curl -X POST 'https://payments.clocknext.com/api/v1/composites/cmp_7d1x9/archive'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Composite archived." }, "result": { "archived": true, "composite": { "id": "cmvgvfgqe000f08l219wzyt7v", "name": "Voice AI Call", "refId": "voice_call", "description": "Updated 2026-10-20 — composite description", "price": 1.5, "isActive": false, "createdAt": "2026-10-20T16:01:50.966Z", "updatedAt": "2026-10-20T16:05:00.840Z", "entitlements": { "credits": [ { "id": "cmvgvfd63000508l2oexbgpzs", "name": "Chat Message", "agentKey": "chat_message" } ], "outcomes": [], "units": [ { "id": "cmvgv92vf000o08l5qnqm39eo", "name": "Voice Minute", "agentKey": "voice_minute" } ] } } }}Base URL https://payments.clocknext.com/api/v1
Restores an archived composite.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringComposite id.
Composite 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 composite.
curl -X POST 'https://payments.clocknext.com/api/v1/composites/cmp_7d1x9/unarchive'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Composite restored." }, "result": { "unarchived": true, "composite": { "id": "cmvgvfgqe000f08l219wzyt7v", "name": "Voice AI Call", "refId": "voice_call", "description": "Updated 2026-10-20 — composite description", "price": 1.5, "isActive": true, "createdAt": "2026-10-20T16:01:50.966Z", "updatedAt": "2026-10-20T16:05:01.667Z", "entitlements": { "credits": [ { "id": "cmvgvfd63000508l2oexbgpzs", "name": "Chat Message", "agentKey": "chat_message" } ], "outcomes": [], "units": [ { "id": "cmvgv92vf000o08l5qnqm39eo", "name": "Voice Minute", "agentKey": "voice_minute" } ] } } }}Types
Every object type on this page, with its fields.
Composite
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The composite's id. |
name | string | yes | The composite's name. Unique in the workspace. |
refId | string | yes | Tag your signals send. |
description | string | null | yes | Optional note about the composite. null when not set. |
price | number | yes | USD per completed occurrence. |
isActive | boolean | yes | false once archived; it can't go on a new plan or tag new signals. Read-only: use archive and unarchive. |
createdAt | string | yes | When the composite was created. |
updatedAt | string | yes | When the composite was last changed. |
entitlements | CompositeEntitlements | yes | What the composite wraps. |
CompositeEntitlements
What a composite wraps: the credits, outcomes and units whose signals it charges for. Each list holds the wrapped items with their names and keys.
| Field | Type | Required | Description |
|---|---|---|---|
credits | CompositeItem[] | yes | The credits this composite wraps. |
outcomes | CompositeItem[] | yes | The outcomes this composite wraps. |
units | CompositeItem[] | yes | The units this composite wraps. |
CompositeItem
One credit, outcome or unit that a composite wraps.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The id of the credit, outcome or unit. |
name | string | yes | The name of the credit, outcome or unit. |
agentKey | string | yes | The key a signal for this item names. |
CreateCompositeInput
A new composite. Keys use letters, digits, ., _ and - (at most 80) and match exactly. A signal sends { "<refId>": "<your id>" }. price is charged only when a plan sells it.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The composite's name. Must be unique in the workspace (409 if taken). |
refId | string | yes | The key your signals send in their composite block. Unique among your composites (409 if taken). |
description | string | null | no | Optional note about the composite. |
price | number | yes | Price in USD for each completed occurrence. You set it. It is not calculated from the wrapped items. |
entitlements | object | yes | At least one id. |
CreateCompositeInput.entitlements
At least one id.
| Field | Type | Required | Description |
|---|---|---|---|
creditIds | string[] | no | Ids of the credits to wrap. Each must be in your workspace and active. Up to 500. |
outcomeIds | string[] | no | Ids of the outcomes to wrap. Each must be in your workspace and active. Up to 500. |
unitIds | string[] | no | Ids of the units to wrap. Each must be in your workspace, active and FLAT-priced. Up to 500. |
UpdateCompositeInput
Only the fields you send change. A new refId applies to signals at once, so update your callers first. With entitlements, a list left out counts as empty.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | A new name. Must be unique in the workspace (409 if taken). |
refId | string | no | A new key for the composite block. Signals must use the new key at once. |
description | string | null | no | A new note. Send null to clear it. |
price | number | no | A new price in USD for each completed occurrence. Plans already bought keep the price they were bought at. |
entitlements | object | no | At least one id. |
UpdateCompositeInput.entitlements
At least one id.
| Field | Type | Required | Description |
|---|---|---|---|
creditIds | string[] | no | The complete new list of credit ids. A new credit must be active. |
outcomeIds | string[] | no | The complete new list of outcome ids. A new outcome must be active. |
unitIds | string[] | no | The complete new list of unit ids. A new unit must be active and FLAT-priced. |