contract.started / contract.ended for jobs you have linked, and GET /contracts only surfaces contracts on linked jobs.
Creating a Link
Requiresproject-links:write. The customer supplies (or your integration settings store) the OpenTrain jobId; you supply your own project’s identity:
externalProjectIdis required (max 200 characters) and unique per install — creating a second link with the same ID returns409.jobIdmust be a job owned by the installing employer — anything else returns404. (jobIdis optional at creation; a link without a job receives no contract events until it points at one.)provisioningModedefaults toPARTNER_WEBHOOK— you provision workspace members from webhook events.MANAGED_ADAPTERselects the OpenTrain managed-credential path instead.- A successful create emits a
project_link.createdevent.
Reading Links
Deleting a Link
project_link.removed event both carry a final snapshot of the link, which is the last time you will see its data. After deletion, contract events for that job stop (unless another link on your install references the same job).
Re-Linking
There is no update operation on links. To point one of your projects at a different OpenTrain job — or fix a wrongexternalProjectId — delete the old link and create a new one. Expect a project_link.removed followed by a project_link.created event.