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

Create Webhook Endpoint

Register an HTTPS endpoint for platform lifecycle events. The HMAC signing secret is returned once, only in this response.

POST/api/partner/v1/webhook-endpoints

Registers a webhook endpoint to receive lifecycle events. The response includes the HMAC signing secret once — store it immediately; no later call returns it. If you lose it, delete the endpoint and create a new one.

Delivery starts with events created after the endpoint is registered — there is no backfill of earlier events. Link projects and subscribe before contracts you care about begin.

Requirements: webhooks:manage scope.

urlstringbodyrequired

Delivery URL. Must be HTTPS (http is allowed for localhost only). Redirects are not followed.

eventTypesstring[]bodyrequired

At least one of: contract.started, contract.ended, project_link.created, project_link.removed, install.revoked, milestone.funded, milestone.budget_low, milestone.budget_depleted.

webhookEndpointobject

The created endpoint: {id, url, eventTypes, status, createdAt, consecutiveFailures, disabledAt, disabledReason} — same shape as GET /webhook-endpoints/{endpointId}.

secretstring

HMAC-SHA256 signing secret for verifying deliveries. Shown only in this response.

messagestring

Reminder that the secret will not be shown again.

StatuscodeMeaning
400BAD_REQUESTBody not valid JSON, url missing/not HTTPS, or eventTypes empty/contains an unknown type
401UNAUTHORIZEDMissing, invalid, or revoked token
403FORBIDDENToken lacks webhooks:manage
409CONFLICTEndpoint limit reached for this install