Record unit
Records quantity (default 1) discrete units against agentKey.
Authorization
apiKey Organisation-scoped key from Settings → API Keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
No usage block — a unit carries no model and no tokens. One call is one report covering quantity units, defaulting to 1.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/signal/unit" \ -H "Content-Type: application/json" \ -d '{ "customerId": "cus_abc123", "agentKey": "seats", "member": "dana@acme.com" }'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "OK" }, "result": { "unitUsage": { "id": "string", "customerId": "string", "unit": "string", "agentKey": "string", "billingMode": "ADVANCE", "remaining": 0, "customerCost": 0, "member": "string", "createdAt": "2019-08-24T14:15:22Z" }, "rawId": "raw_4k8w2r" }}{ "statusCode": 202, "statusDetail": { "status": "SUCCESS", "message": "Signal accepted for processing." }, "result": { "queued": true, "messageId": "msg_2f4a1b8c", "rawId": "raw_4k8w2r" }}{ "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": 409, "statusDetail": { "status": "ERROR", "message": "Customer \"cus_abc123\" is archived." }, "result": {}}{ "statusCode": 422, "statusDetail": { "status": "ERROR", "message": "No credit with agent key \"summarize\" exists in this workspace." }, "result": {}}{ "statusCode": 500, "statusDetail": { "status": "ERROR", "message": "Could not complete the request." }, "result": {}}Record wallet POST
Debits the customer's wallet at the model's provider cost. No `agentKey` — this meters money, not a named entitlement — and no `composite`. The wallet may go negative; a signal is never refused for lack of funds. If the model has both cache-read and cache-write rates, `cacheTokens` carries the cache-**read** tokens only (billed at the cache-read rate); send cache-write tokens separately as `cacheWriteTokens`.
Complete composite POST
Closes and bills ONE occurrence of a composite (a distinct tag value). Required even for outcome-tagged occurrences. Gated on every credit/outcome/unit the composite is restricted to having reported under the same value. Calling early isn't an error: it answers `422` but parks and completes itself once the rest lands.