Import master.md from the resumes folder
const url = 'http://127.0.0.1:8765/api/master/sync';const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8765/api/master/sync \ --header 'Content-Type: application/json' \ --data '{}'Import master.md from the resumes folder as the master’s next revision (or write the file when it is missing). The explicit import of the user’s own edits. GigAI writes the master into the resumes folder as master.md after every change and never reads it back by itself; this route (the Master page’s Import the file, gigai scout resume master sync) stores that file as the next revision. status: imported (written true: added, changed and retired list the lines by id with their text; ids counts the ids kept, newly assigned, and restored for a line whose id comment was deleted while its text stayed), unchanged (the file says what the master holds), or written (master.md was missing or held an earlier revision untouched: it was written, nothing was imported). A line the file no longer holds is retired and can be restored (PUT /api/master/lines {id, use: “restore”}). Nothing is imported, and the file is left as it is, when: it does not read as a master (422 master_markdown_invalid names the line, never its text); it holds a name line, an email, a phone number, a link or an address (422 personal_info_refused, by line number and kind: GigAI stores no contact details; a link in an entry’s heading or title line is not refused: the link goes, the heading keeps its words, and contact_removed.headings lists it as {kind: link, line, heading, where, message}, never the address; a heading that is only a link is 422 master_markdown_invalid); the master changed since GigAI wrote the file (409 revision_conflict with error.current: importing would retire what was added since; send revision = the current revision to import the file as it is); or GigAI never wrote this master.md (422 revision_required with error.current: the same revision imports it). After an import master.md is written again with every id, unless it was saved again meanwhile. profiles is what the write did to the profiles’ selections, as for every write of the master. Local only: no model call.
Request Body
Section titled “Request Body”object
Who writes: recorded as written_by. Also the X-GigAI-Actor header. Without either, a write from the Scout UI (a browser page of this server) is the operator’s and any other loopback write is the agent’s.
Only to import a file the master has moved on from: the revision of the master you read (error.current.revision of the 409, or GET /api/master).
Example
{}Responses
Section titled “Responses”Success.
object
Example
{ "action": "sync", "added": [ { "entry_id": "r-hex", "id": "b-9fe325", "section": "experience", "text": "Wrote the paging policy for 3 regions.", "what": "line" } ], "changed": [ { "entry_id": "r-hex", "id": "b-hex-03", "section": "experience", "text": "Led the migration of 42 services to Helm charts released through ArgoCD.", "what": "line" } ], "changes": { "added": 1, "changed": 1, "removed": 1 }, "contact_removed": null, "file": { "beside": null, "name": "master.md", "not_imported": false, "path": "~/Documents/GigAI/resumes/master.md", "revision": 4, "state": "current", "written": true, "wrote": "master.md" }, "ids": { "assigned": 1, "kept": 3, "restored": 0 }, "master": { "content_sha256": "sha256:...", "counts": { "by_kind": { "bullet": 1, "other": 0, "skills": 1, "summary": 1 }, "by_strength": { "backed": 0, "quantified": 1, "stated": 2 }, "entries": 1, "ids": 4, "items": 3, "skills": 3 }, "entries": [ { "bullets": [ "b-hex-03" ], "end": 2023, "heading": "Hexa Cloud", "id": "r-hex", "note": null, "ongoing": false, "order": 3, "section": "experience", "source": null, "start": 2019, "sublines": [ "Staff Software Engineer | Jun 2019 - Jan 2023" ], "written_by": null } ], "format": 1, "items": [ { "backed": [], "entry_id": "r-hex", "id": "b-hex-03", "kind": "bullet", "mark": "5d0c2a4b9e1f7a36", "note": "agentic roles: lead with this", "order": 4, "section": "experience", "source": "from the user's chat on 3 Oct", "strength": "quantified", "tags": [ "delivery" ], "text": "Led the migration of 40 services to Helm charts released through ArgoCD.", "written_by": "agent" } ], "parent_revision": "revision_7c1d7b9a-0d58-4f0b-8f27-91f4f6f6a2c3", "record_id": "record_...", "revision": 4, "revision_id": "revision_0b6f2f0e-5a0e-4c58-9a57-2d1b6a0c1e11", "revisions": 4, "sections": [ "summary", "experience", "skills" ], "updated_at": "2026-10-04T10:05:00.000000Z", "written_by": "operator" }, "profiles": { "offers": [], "synced": [] }, "retired": [ { "entry_id": "r-hex", "id": "b-hex-09", "section": "experience", "text": "Ran the on-call rotation for 4 teams.", "what": "line" } ], "schema_version": "scout-master:1", "status": "imported", "written": true}Forbidden / forbidden_origin: loopback peer and Host 127.0.0.1:<port> or localhost:<port> only (Origin too on writes).
object
object
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Master_not_found, target_unavailable
object
object
Example
{ "error": { "code": "master_not_found", "message": "..." }}Master_file_changed, revision_conflict
object
object
Example
{ "error": { "code": "master_file_changed", "message": "..." }}Unsupported_media_type: writes need Content-Type: application/json.
object
object
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Unknown_key, wrong_type, invalid_value, personal_info_refused, master_markdown_invalid, revision_required, master_file_unreadable
object
object
Example
{ "error": { "code": "unknown_key", "message": "..." }}