Skip to content

Add a line to the master

POST
/api/master/lines
curl --request POST \
--url http://127.0.0.1:8765/api/master/lines \
--header 'Content-Type: application/json' \
--data '{ "actor": "agent", "entry_id": "r-hex", "revision": 3, "text": "Cut the deploy time of 40 services from 50 to 12 minutes." }'

Add a line to the master: under a role, or to Summary, Skills or Other. Answers 201 when the line was written. The line gets its id (id) and goes last under its entry or in its section. A line the master already has in other words is ASKED about, not added: the reply is 200 with status: near_duplicate, written: false and near_duplicates (up to 5 lines of the same kind it looks like, the closest first: {id, text, entry_id, similarity, same_numbers}; same_numbers false means one of the two is out of date). Edit that line (PUT) if it is the same fact, or send the request again with force: true to keep both. The same text in the same place is 409 master_line_exists, forced or not. A Skills line lists only the skills the master does not list yet (skills.added, skills.already_listed). Only the user’s facts: every number comes from the user. One new revision of the master. Send the revision you read: when the master changed since, the reply is 409 revision_conflict with error.current (the revision it is at now): read it again, then send the change on top of that. A text that looks like contact data (email, phone, link, address, a name line) answers 422 personal_info_refused and nothing is written. These are the rules of gigai scout resume master add | edit | remove (one implementation), so a refusal carries that command’s code. The reply carries the whole master after the write, status (revised, or unchanged when it already said this) with written, the id the change was about, retired (what the write took out, each with the revision that still holds it), and profiles: what the write did to the profiles’ selections (synced: a profile that shows an edited or retired line had its resume printed again; offers: new lines are offered, never added by themselves). Every tailoring made from the master is out of date after a write and is made again when the pipeline next looks at its profile. file says where the revision went in the resumes folder (null when nothing was written): wrote is master.md, or the file beside it (master-2.md) when master.md holds changes the user has not imported, which GigAI never replaces. Local only: no model call.

Media typeapplication/json
object
actor

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.

string
Allowed values: operator agent
backed

Optional evidence: story:<id> or answer:<question_id> (at most 12). A backed line’s strength is backed.

array
entry_id

The role, project or school the line goes under (an entry’s id). Either this or section.

string
force

True: add the line although the master has one that says nearly the same (see near_duplicates).

boolean
revision
required

The revision of the master you read; when it changed since, the reply is 409.

integer
section

For a line outside an entry.

string
Allowed values: summary skills other
tags

Optional tags: words of letters, digits and + # . - _ (at most 12).

array
text
required

The line: one line, at most 400 characters (a summary or a Skills line: 1000), without a bullet marker. A Skills line reads Label: skill, skill.

string
Example
{
"actor": "agent",
"entry_id": "r-hex",
"revision": 3,
"text": "Cut the deploy time of 40 services from 50 to 12 minutes."
}

Success.

Media typeapplication/json
object
schema_version
required
Allowed value: scout-master:1
key
additional properties
any
Example
{
"action": "add",
"changes": {
"added": 1,
"changed": 0,
"removed": 0
},
"file": {
"beside": null,
"name": "master.md",
"not_imported": false,
"path": "~/Documents/GigAI/resumes/master.md",
"revision": 3,
"state": "current",
"written": true,
"wrote": "master.md"
},
"id": "b-4f0c1a",
"ids": [
"b-4f0c1a"
],
"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": 3,
"revision_id": "revision_0b6f2f0e-5a0e-4c58-9a57-2d1b6a0c1e11",
"revisions": 3,
"sections": [
"summary",
"experience",
"skills"
],
"updated_at": "2026-10-04T10:05:00.000000Z",
"written_by": "operator"
},
"near_duplicates": [],
"profiles": {
"offers": [
{
"label": "Staff Engineer",
"new_lines": [
"b-4f0c1a"
],
"offer": "1 new master line: refresh?",
"profile_id": "prof_1"
}
],
"synced": []
},
"retired": [],
"schema_version": "scout-master:1",
"skills": {
"added": [],
"already_listed": [],
"line": null,
"removed": []
},
"status": "revised",
"warnings": [],
"written": true
}

Forbidden / forbidden_origin: loopback peer and Host 127.0.0.1:<port> or localhost:<port> only (Origin too on writes).

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{
"error": {
"allowed_keys": [
"example"
],
"code": "example",
"message": "example"
}
}

Master_not_found, target_unavailable, master_entry_not_found

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "master_not_found",
"message": "..."
}
}

Revision_conflict, master_line_exists

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "revision_conflict",
"message": "..."
}
}

Unsupported_media_type: writes need Content-Type: application/json.

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{
"error": {
"allowed_keys": [
"example"
],
"code": "example",
"message": "example"
}
}

Unknown_key, wrong_type, invalid_value, personal_info_refused, master_text_invalid, master_markdown_invalid, master_place_invalid, master_tag_invalid, master_backed_invalid

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "unknown_key",
"message": "..."
}
}