Platform API reference
Create Project Link
Link one of your platform’s projects to an OpenTrain job. externalProjectId must be unique per install; emits project_link.created.
POST
Creates a project link mapping one of your projects to an OpenTrain job. Contract lifecycle events are emitted only for linked jobs, so this is the routing step of the integration. Emits a
project_link.created event.
Requirements: project-links:write scope.
Request
Your project’s identifier (max 200 chars). Unique per install — reusing one returns
409.Human-readable project name (max 300 chars).
Deep link to the project in your platform (max 2048 chars).
The OpenTrain job to link. Must be a job owned by the installing employer — anything else returns
404. A link without a job receives no contract events until it points at one.PARTNER_WEBHOOK (you provision workspace members from webhook events — recommended) or MANAGED_ADAPTER (the OpenTrain managed-credential path). See provisioning modes.Response
The created link:
{id, jobId, externalProjectId, externalProjectName, externalProjectUrl, provisioningMode, createdAt}.Errors
| Status | code | Meaning |
|---|---|---|
400 | BAD_REQUEST | Body not valid JSON, externalProjectId missing, or a field exceeds its length limit |
401 | UNAUTHORIZED | Missing, invalid, or revoked token |
403 | FORBIDDEN | Token lacks project-links:write |
404 | NOT_FOUND | jobId does not reference a job owned by the installing employer |
409 | CONFLICT | Duplicate externalProjectId for this install, or the install’s link limit is reached |