ClocknextHelp
DocumentationAPI ReferenceMCP Tools
Dashboard

Get started

OverviewQuickstart

Good to know

Response formatHandling errorsPaginating resultsSending data reliablyYour own customer idsWebhooks

API reference

Record credit POSTRecord outcome POSTComplete outcome POSTRecord wallet POSTRecord unit POSTComplete composite POST
List customers GETCreate a customer POSTGet a customer GETUpdate a customer PATCHDelete a customer DELETEGet a customer's balances GETGet a customer's wallet ledger GETSet a customer's low-balance alert PUTGet a customer's current plan GETChange a recurring grant PUTList Customer Usage Log GETLook Up Usage Logs by ID GET
Manage a customer's credit balance POSTManage a customer's outcome balance POSTManage a customer's unit balance POSTManage a customer's composite balance POSTManage a customer's wallet balance POST
List a customer's members GETAdd a member POSTUpdate a member PATCHRemove a member DELETE
PlansCreditsOutcomesUnitsComposites
List taxes GETCreate a tax POSTGet a tax GETUpdate a tax PATCH
List purchases GETCreate a purchase POSTGet a purchase GETUpdate a purchase's auto-payment setting PATCHCancel a purchase POST
List invoices GETGet an invoice GETMint a hosted pay link GET
List payments GETGet a payment GET
wallet.balance.update POSTwallet.balance.drop POST
Mint a customer-portal access token POST
Customers

List Customer Usage Log

One customer's usage history — credit, outcome, unit, wallet and completed composite occurrences — merged into one feed sorted by time. Cursor-paginated: pass limit/cursor and read nextCursor back; null means the last page. Narrow by date with from/to.

GET
/signal/usage-log

Authorization

apiKey
AuthorizationBearer <token>

Organisation-scoped key from Settings → API Keys.

In: header

Query Parameters

customerId*string

Customer id.

limit?integer

Maximum rows to return. Must be a positive number; clamped to 1–200.

Range1 <= value <= 200
Default50
cursor?string

Opaque token from a previous response's nextCursor. Omit for the first page.

from?string

First day to include, YYYY-MM-DD (UTC). The whole day is included. Omit for no lower bound. Keep sending the same value while paging with cursor.

Formatdate
to?string

Last day to include, YYYY-MM-DD (UTC). The whole day is included. Omit for no upper bound. Must not be before from.

Formatdate

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/signal/usage-log?customerId=cus_abc123&limit=25&cursor=eyJ0cyI6IjIwMjYtMDktMjJUMTM6MDA6NTIuNzU0WiIsImlkIjoibG9nXzhtM241cCJ9&from=2026-10-01&to=2026-10-07"
{  "statusCode": 200,  "statusDetail": {    "status": "SUCCESS",    "message": "OK"  },  "result": {    "usageLogs": [      {        "id": "log_8m3n5p",        "createdAt": "2026-09-22T13:00:52.754Z",        "type": "composite",        "status": "SUCCESS",        "typeName": "Voice AI call",        "member": null,        "model": null,        "usage": {          "inputTokens": 0,          "outputTokens": 0,          "cacheTokens": 0,          "cacheWriteTokens": 0        },        "cost": {          "providedCost": "$0.00",          "customerCost": "$3.00"        },        "credit": null,        "outcome": null,        "unit": null,        "composite": {          "amount": "$3.00"        },        "outcomeCompletion": null,        "coveredByComposite": null,        "custom": null      },      {        "id": "log_9n4o6q",        "createdAt": "2026-09-22T13:00:51.023Z",        "type": "credit",        "status": "SUCCESS",        "typeName": "Deep Research",        "member": null,        "model": {          "name": "gpt-4o",          "provider": "OpenAI"        },        "usage": {          "inputTokens": 100,          "outputTokens": 50,          "cacheTokens": 0,          "cacheWriteTokens": 0        },        "cost": {          "providedCost": "$0.00075",          "customerCost": "$0.0009"        },        "credit": {          "amount": "0.075",          "appliedRules": []        },        "outcome": null,        "unit": null,        "composite": null,        "outcomeCompletion": null,        "coveredByComposite": null,        "custom": {          "plan": "pro",          "feature": "research"        }      }    ],    "nextCursor": null  }}
{  "statusCode": 400,  "statusDetail": {    "status": "ERROR",    "message": "Request body must be valid JSON."  },  "result": {}}
{  "statusCode": 401,  "statusDetail": {    "status": "ERROR",    "message": "Invalid API key."  },  "result": {}}
{  "statusCode": 404,  "statusDetail": {    "status": "ERROR",    "message": "No customer with id \"cus_abc123\"."  },  "result": {}}
{  "statusCode": 500,  "statusDetail": {    "status": "ERROR",    "message": "Could not complete the request."  },  "result": {}}

Change a recurring grant PUT

Previous Page

Look Up Usage Logs by ID GET

Up to 10 usage-log rows by id, in one call — for example the `usageLogId` of each `USAGE_LOG` row in a customer's wallet ledger. Scoped to your organization, not to one customer: every row has its own `customerId`. Rows come back in the order of `ids`; duplicate ids are removed. Ids that match nothing in your organization are listed in `notFound`. The row format is not the same as `GET /signal/usage-log`: see `UsageLogLookupEntry`.