Skip to main content
POST https://app.vern.so/api/v1/sources/{source}/pin
By default the managed agent reuses a source’s most-recent working recipe as the starting point for each new generate run, adapting only what the customer’s upload changed. Because every successful generate writes a fresh recipe, that “latest” naturally drifts. Pinning fixes the starting point to one known-good run’s recipe. Pinned runs read it read-only — they don’t promote their adapted recipe back to “latest” — so one customer’s run can’t move the baseline other runs build on. See Reuse and pinning. {source} is the source name (URL-encode it if it contains spaces).

Authentication

Requires an x-api-key header. See Authentication.

Request body

run_id
string (uuid) | null
required
The run whose recipe to pin as this source’s reuse recipe. The run must belong to your account and have produced a usable recipe (a generate or update run that reached a preview or executed). Pass null to unpin and return to “latest working recipe” drift.

Response

200 OK
{
  "source": "Salesforce",
  "pinned_recipe_run_id": "d4c3b2a1-9f8e-47d6-b5a4-c3d2e1f0a9b8"
}
When you unpin, pinned_recipe_run_id comes back null.

Errors

StatusMeaning
400Malformed body.
401API key missing or invalid.
404The source name isn’t in your account, or run_id isn’t a run in your account.
409The source name is ambiguous (two sources share it — rename one), or the run never produced a usable recipe to pin.
429Rate limit hit — back off and retry.
500Server error.

Example

# Pin a known-good run's recipe as the source's baseline
curl -X POST https://app.vern.so/api/v1/sources/Salesforce/pin \
  -H "x-api-key: $VERN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "run_id": "d4c3b2a1-9f8e-47d6-b5a4-c3d2e1f0a9b8" }'

# Unpin — back to latest-working-recipe drift
curl -X POST https://app.vern.so/api/v1/sources/Salesforce/pin \
  -H "x-api-key: $VERN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "run_id": null }'

Next