Skip to content
OpenTrain AIOpenTrain AIOpenTrain AIDocs

Ask OpenTrain

Answers from the documentation, with sources.

What would you like to do with OpenTrain?

AI answers can be mistaken. Check the linked sources. Don’t include private account information.

Open app

DEVELOPER DOCUMENTATION

List Contracts

List contracts on jobs linked by this install, newest first. Filter by project link or status.

GET/api/partner/v1/contracts

Returns contracts whose job is referenced by at least one project link on the calling token’s install, newest first. This is the pull-side complement to the contract.started / contract.ended webhooks — poll it to reconcile state after downtime, since events are never replayed.

Requirements: contracts:read scope.

statusstringquery

Filter by contract status: active or ended.

limitintegerquery
Default: 50

Maximum number of contracts to return (1–200).

contractsobject[]

Array of contracts, newest first.

Contract fields
idstring

Contract ID. Use it with GET /contracts/{contractId}/participants.

statusstring

active or ended.

jobIdstring

The OpenTrain job the contract belongs to.

titlestring | null

Contract title.

startDatestring | null

ISO 8601 start timestamp.

endDatestring | null

ISO 8601 end timestamp — null while the contract is active.

createdAtstring

ISO 8601 creation timestamp.

StatuscodeMeaning
400BAD_REQUESTInvalid status value or limit out of range
401UNAUTHORIZEDMissing, invalid, or revoked token
403FORBIDDENToken lacks contracts:read
404NOT_FOUNDprojectLinkId does not match a link on this install