---
title: "Submit Build Diff"
method: POST
path: "/coord/builds/{ref}/diff"
tags: ["coord"]
---

# Submit Build Diff

`POST /coord/builds/{ref}/diff`

## Request

- Base URL: `https://app.tascan.io/api/v1`
- URL: `https://app.tascan.io/api/v1/coord/builds/{ref}/diff`
- Auth: HTTP bearer

Store an already-computed diff for one file of a build bundle against a base commit (protocol v0.2 item 6, POST /coord/builds/:build_ref/diff — the parser has no GET for this path; a deployed function ships no git object database, so tascan-agent/deployer.js computes the diff text with its own persistent worktree and this route only validates + stores it via coord_set_artifact_diff). build_sha256 must equal the artifact's own stored sha256 or the call is refused; storing a diff replaces that file's stored full content with the diff going forward. There is currently no REST route that reads a stored diff back (GET /builds/:build_ref and /builds/:build_ref/file do not surface it) — this tool only writes one. Requires agent:dispatch.

## Path parameters

- `ref` string, required

## Request body

- object
  - `build_ref` string, required: sha256:<64 hex> (or the bare 64 hex) of the build the diff is about.
  - `path` string, required: Repo-relative path from the build manifest (tascan_get_build).
  - `base_ref` string, required: The commit-ish the diff was computed against (1-200 chars).
  - `text` string, required: The already-computed diff text (up to 262144 characters). This tool never computes a diff itself.
  - `build_sha256` string, required: 64-hex sha256 of the file at build_ref/path — must match the stored artifact's own sha256.
  - `base_sha256` string: Optional 64-hex sha256 of the file at base_ref.
  - `truncated` boolean: True if text is itself a truncated diff.

## Response `200`

Success. JSON body: { data: ... } or an error object { error, message }.

## Other responses

- `4XX`: Client error (validation, auth, scope, rate limit).

---

[API](https://skmtc.dev/tascan/apis/tascan-api.md) · [All operations](https://skmtc.dev/tascan/apis/tascan-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tascan/apis/tascan-api/revisions/56fcd2861498?raw)
