Skip to main content
POST
Reports work done on your platform against an OpenTrain contract. Entries are cumulative per-worker, per-day totals: each entry replaces the stored totals for its (worker, workDate), so re-POSTing the same report — or a corrected one — is idempotent and never double counts. Fields omitted from an entry keep their previously stored values. The response includes the recomputed budget. Crossing the 80% / 100% consumption thresholds emits milestone.budget_low / milestone.budget_depleted webhooks. Requirements: usage:write scope, and the contract’s job must be referenced by a project link on the calling token’s install.

Request

contractId
string
required
The OpenTrain contract to attribute usage to.
entries
object[]
required
1–100 usage entries. One entry per (worker, day).

Response

contractId
string
The contract the usage was recorded against.
accepted
integer
Number of entries upserted.
budget
object
The recomputed budget — same shape as GET /contracts/{contractId}/budget.

Errors