---
title: "Submit source credentials"
method: POST
path: "/migrations/{migration_id}/runs/{run_id}/credentials"
tags: ["Runs"]
---

# Submit source credentials

`POST /migrations/{migration_id}/runs/{run_id}/credentials`

## Request

- Base URL: `https://app.vern.so/api/v1`
- URL: `https://app.vern.so/api/v1/migrations/{migration_id}/runs/{run_id}/credentials`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/vern-so/apis/vern-api/docs/migrations/:migration_id/runs/:run_id/credentials/post.ts> (a function with typed inputs; its response is checked against the schema)

Resume a run paused at `blocked` with `blocked_reason: "credentials"`. The secrets are stored in a secured vault and never enter the agent thread, the run row, or logs. The target connection is taken from the run's own `credential_request` — a key can only fill the connection the agent asked about. Re-submitting overwrites the stored secret so a rejected credential can be re-entered.

## Request body

- object
  - `credentials` object, required: Secret values keyed to the request's schema. Must be a non-empty object.
  - `connection_id` string, uuid: Optional guard — if sent, must match the run's credential_request.connection_id.

## Response `200`

Credentials stored; the run resumed and is running again.

- object
  - `run_id` string, uuid
  - `status` string

## Other responses

- `400`: Malformed request.
- `401`: API key missing, malformed, or revoked.
- `404`: The referenced resource isn't in your account.
- `409`: The run isn't awaiting credentials (not blocked, or blocked on a question), connection_id doesn't match, or there's no active credential request yet — retry shortly.
- `429`: Rate limit hit. Counted per account, not per API key. Creating a migration and starting a `generate` run are limited to 30/hour each; answering a run is limited to 30/hour; reads allow 30/minute and writes 30/minute. `Retry-After` gives the seconds until the window resets, alongside `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`.

## Changes

- **2026-06-25** `aaaced6a1cac`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vern-so/apis/vern-api/changes/migrations/:migration_id/runs/:run_id/credentials/post.md)

---

[API](https://skmtc.dev/vern-so/apis/vern-api.md) - [All operations](https://skmtc.dev/vern-so/apis/vern-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vern-so/apis/vern-api/revisions/6ae61af2db81?raw)
