Resolve selected Draft files
Resolves conflicts on the Draft's head_sha: keep yours or generated, or supply final content as text or, for binary files, base64. Choosing generated for a customized path replaces it with the generated file, or deletes a Draft-only file.
Conflict decisions are saved together and can be replaced until applied. Choosing generated for customized paths commits those changes together on the Draft branch. Returns the Draft. When every conflict has a decision, conflicts.decided equals conflicts.total and Typeship continues the Draft and runs checks. Paths that already match the Draft change nothing.
Authorization
apiKey Organization API key from the console (ak_...), or an OAuth access token with user:org:read, the organization selected during consent, and the capability required by the operation.
In: header
Path Parameters
Unique identifier for a Draft.
^drf_[a-z0-9]{16}$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/drafts/drf_3q7m1v8k2p5d9h4c/resolve" \ -H "Content-Type: application/json" \ -d '{ "expected_head_sha": "0123456789abcdef0123456789abcdef01234567", "resolutions": [ { "path": "src/index.ts", "keep": "content", "mode": "100644", "content": "export { ParcelClient } from \\"./client.js\\";\\nexport type { Shipment, Label } from \\"./types.js\\";\\nexport { createParcelClient } from \\"./helper.js\\";\\n" } ] }'{ "id": "drf_3q7m1v8k2p5d9h4c", "object": "draft", "target_id": "tgt_5m8q2v7k1p9d4h6c", "project_id": "prj_4k8m2v7q1p9d5h6c", "status": "working", "version_next": "1.1.0", "version_source": "automatic", "readiness": null, "checks": [], "changes": { "changelog": "Add shipment tracking.", "breaking_count": 0, "version_previous": "1.0.0" }, "head_sha": "0123456789abcdef0123456789abcdef01234567", "pull_request": { "url": "https://github.com/parcel-example/parcel-client/pull/12", "number": 12 }, "generation_id": "gen_7h2p5d9c3m8w1k6q", "release_id": null, "conflicts": { "total": 1, "decided": 1 }, "customized_files": 2, "history_recovery": null, "created_at": "2026-09-23T08:00:00Z", "updated_at": "2026-09-23T08:45:00Z", "request_id": "req_3k8m1v6q9p2d7h4c"}List customized and conflicted files on a Draft GET
Lists the Draft's files that differ from the last merged package or need a conflict decision, ordered by path, without file content. Each conflict names its kind, the saved decision, and the sides you can read with getFile. With `filter=history`, lists files affected by a default-branch history rewrite; the list is empty when none is pending. Returns `409 resource_changed` while Typeship is carrying the Draft's latest commit forward (status working), or when the Draft changes between pages.
Approve recovery from rewritten default-branch history POST
When the Draft has status `action_required` and reason `history_rewritten`, review affected files with `listDraftFiles` and `filter=history`, then approve with the Draft's `history_recovery` revisions. Approval saves the recovery without changing Git and returns the Draft; the next generation rebuilds it from the rewritten default branch. The previous Draft branch stays available, and overlapping code comes back as conflicts to resolve. A rewritten Draft branch alone needs no approval.