Edit a story
const url = 'http://127.0.0.1:8765/api/stories/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"actor":"agent","period":"2022-2023","revision":1,"tags":["ci","delivery","kubernetes"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://127.0.0.1:8765/api/stories/example \ --header 'Content-Type: application/json' \ --data '{ "actor": "agent", "period": "2022-2023", "revision": 1, "tags": [ "ci", "delivery", "kubernetes" ] }'Edit a story: only the given fields change. At least one field. A given field replaces the stored one whole (narrative, tags, answers_questions and sources are not merged). Every write bumps revision and updated_at and records written_by. 409 revision_conflict carries the current story in the error. 0.1.10.7: the write also queues the background pipeline (tailored resume, assessment against it, Scout ATS score, Scout label) for every job of an active profile whose stored assessment left open a question this answers; at most pipeline.auto_jobs_per_trigger (10) jobs run, the rest wait for an approval (GET /api/pipeline/approvals). The pipeline’s tailoring replaces only a tailored resume the pipeline itself made: one tailored on demand (POST /api/tailored-resumes) or with a line chosen or edited (PUT /api/tailored-resumes/lines) is kept as it is, its updated_at unchanged, and the assessment, the Scout ATS score and the Scout label are made against it. Read what was queued with GET /api/pipeline.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A story’s id (e.g. story:60_acme_ci_cut_time). Percent-encode it in the path.
Request Bodyrequired
Section titled “Request Bodyrequired”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.
The interview questions this story answers (at most 12).
Where it happened.
{situation, task, action, result}: loosely STAR, every part an optional string.
object
When; rough is fine.
The user’s own words, kept as said (at most 16000 characters).
The revision of the story you read; when it changed since, the reply is 409.
The role held.
[{question_id, job_identity}]: the job question that triggered the story.
Tags (lowercase, at most 12).
The title.
Example
{ "actor": "agent", "period": "2022-2023", "revision": 1, "tags": [ "ci", "delivery", "kubernetes" ]}Responses
Section titled “Responses”Success.
object
Example
{ "schema_version": "scout-stories-response:1", "story": { "answers_questions": [ "Tell me about a time you improved a slow process" ], "company": "Acme", "created_at": "2026-10-02T15:00:00.000000Z", "history": [ { "action": "added", "at": "2026-10-02T15:00:00.000000Z", "by": "agent" } ], "jobs": [], "narrative": { "action": "Moved the runners to Kubernetes and cached the image layers.", "result": "Build time fell 60 percent.", "situation": "Builds took forty minutes and blocked every merge.", "task": "Make the pipeline fast enough to merge several times a day." }, "period": "2023", "raw": "Our builds took forty minutes, so I moved the runners to Kubernetes and cached the layers. It came down to sixteen.", "revision": 1, "role": "Staff Engineer", "sources": [ { "job_identity": "https://boards.greenhouse.io/acme/jobs/101", "question_id": "tooling:kubernetes" } ], "story_id": "story:60_acme_ci_cut_time", "tags": [ "ci", "delivery" ], "title": "Cut CI time 60% at Acme", "updated_at": "2026-10-02T15:00:00.000000Z", "written_by": "agent" }}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" }}Not_found, target_unavailable
object
object
Example
{ "error": { "code": "not_found", "message": "..." }}Revision_conflict
object
object
Example
{ "error": { "code": "revision_conflict", "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
object
object
Example
{ "error": { "code": "unknown_key", "message": "..." }}