Skip to content

Scout's page only: save the Generate PDF form's details to the header file

POST
/api/pdf-header/save
curl --request POST \
--url http://127.0.0.1:8765/api/pdf-header/save \
--header 'Content-Type: application/json' \
--data '{ "links": [], "location": "Springfield, IL", "name": "Jane Example", "work_authorization": "" }'

Scout’s own page only: write the Generate PDF form’s details to the person’s header file, on their click. NOT for agents: it answers only Scout’s own browser page (a request carrying this server’s own Origin); any other caller gets 403 forbidden_origin, the body is not read and nothing is written. It is the form’s “Save these details to ~/Documents/GigAI/header.json” button: one write per click of what is in the form, to the file POST /api/pdf-header reads (mode 0600, written to a temporary file in the same folder and put in place in one step). The values go into that file and nowhere else: not the store, the journal, a log, a record, a suggestion, a brief, the resumes folder or a model prompt, and this answer holds none of them. state is saved, exists (a file is already there and was not changed; the form asks “Replace the existing header.json?” and sends replace: true) or not_writable (the folder is missing or cannot be written; message says what to check). The folder ~/Documents/GigAI is created when it is missing; no other folder is. The values follow the file’s rules (422 invalid_value names the field and the rule, never a value). The file gets the shorthand: github and linkedin as the id, website as the site address, links only for other links; a field left empty is left out of the file (work_authorization excepted).

Media typeapplication/json
object
email

Optional.

string
github

Optional: the GitHub id alone; a profile address is saved as the id.

string
linkedin

Optional: the LinkedIn id alone; a profile address is saved as the id.

string
links

Optional: at most 6 other links, each {label, url}. One that is a GitHub or LinkedIn profile is saved as that id.

array
location

Optional.

string
name

Optional; one line of at most 200 characters, like every text field here.

string
phone

Optional.

string
replace

True: write over the file that is there. Sent only after the person answered the form’s question.

boolean
website

Optional: a site address.

string
work_authorization

Optional; empty means no line (always written).

string
Example
{
"links": [],
"location": "Springfield, IL",
"name": "Jane Example",
"work_authorization": ""
}

Success.

Media typeapplication/json
object
schema_version
required
Allowed value: scout-pdf-header-save:1
key
additional properties
any
Example
{
"message": "Saved your details to ~/Documents/GigAI/header.json. GigAI keeps no other copy.",
"schema_version": "scout-pdf-header-save:1",
"shown": "~/Documents/GigAI/header.json",
"state": "saved"
}

Forbidden_origin

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

Target_unavailable

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "target_unavailable",
"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

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": "..."
}
}