Skip to main content
GET
/
api
/
partner
/
v1
/
contracts
curl -sS "https://app.opentrain.ai/api/partner/v1/contracts?status=active&limit=50" \
  -H "Authorization: Bearer $OT_PARTNER_TOKEN"
{
  "contracts": [
    {
      "id": "<CONTRACT_ID>",
      "status": "active",
      "jobId": "<OPENTRAIN_JOB_ID>",
      "title": "Traffic signs batch 3 — annotation",
      "startDate": "2026-06-12T10:00:00.000Z",
      "endDate": null,
      "createdAt": "2026-06-12T10:00:00.000Z",
      "projectLinkIds": ["<LINK_ID>"]
    }
  ]
}
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.

Request

Restrict to contracts on the job linked by this project link. Returns 404 if no link with this ID exists on the install.
status
string
Filter by contract status: active or ended.
limit
integer
default:"50"
Maximum number of contracts to return (1–200).

Response

contracts
object[]
Array of contracts, newest first.

Errors

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
curl -sS "https://app.opentrain.ai/api/partner/v1/contracts?status=active&limit=50" \
  -H "Authorization: Bearer $OT_PARTNER_TOKEN"
{
  "contracts": [
    {
      "id": "<CONTRACT_ID>",
      "status": "active",
      "jobId": "<OPENTRAIN_JOB_ID>",
      "title": "Traffic signs batch 3 — annotation",
      "startDate": "2026-06-12T10:00:00.000Z",
      "endDate": null,
      "createdAt": "2026-06-12T10:00:00.000Z",
      "projectLinkIds": ["<LINK_ID>"]
    }
  ]
}