{"openapi":"3.1.0","info":{"title":"Promptly Resume Tailor API","version":"1.0.0","description":"Tailor a resume to a job posting: a recruiter-style plan for the target role, then rewrites of job titles, experience bullets, skills, summary, and projects with the posting's keywords, built as a PDF (LaTeX resumes keep their own template). Authenticate with your Promptly license key from trypromptly.app/account as a Bearer token. A tailoring costs 1 resume credit; revising, editing, shortening, and building it are free for 24 hours. Rewrites can contain invented specifics (numbers, scopes) — each change lists them under `invented` so the candidate can confirm or correct them. The same operations are available as MCP tools at /mcp (Streamable HTTP)."},"servers":[{"url":"https://trypromptly.app"}],"security":[{"license":[]}],"components":{"securitySchemes":{"license":{"type":"http","scheme":"bearer","description":"Your Promptly license key (plk_…)."}},"schemas":{"ResumeInput":{"type":"object","description":"Exactly one of text, latex, or file.","properties":{"text":{"type":"string","description":"The resume as plain text."},"latex":{"type":"string","description":"LaTeX source; rewrites are spliced in and the template is kept byte-for-byte elsewhere."},"file":{"type":"object","required":["name","base64"],"properties":{"name":{"type":"string","description":"File name with extension: .pdf, .docx, .tex, .txt, or .md."},"base64":{"type":"string","description":"File contents, base64 (max 10 MB)."}}},"helper_files":{"type":"object","additionalProperties":{"type":"string"},"description":"LaTeX only: custom .cls/.sty files, {\"resume.cls\": \"…\"}."}}},"Item":{"type":"object","properties":{"id":{"type":"string","description":"x0.t = role 1 title, x0.b1 = role 1 bullet 2, p0.t/p0.k/p0.b0 = project title/stack/bullet, s0 / s0.c = skills line / its heading, sum = summary"},"section":{"type":"string","enum":["titles","bullets","skills","summary","projects"]},"kind":{"type":"string"},"context":{"type":"string"},"text":{"type":"string"},"editable":{"type":"boolean"}}},"Resume":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["latex","text"]},"file_name":{"type":"string"},"name":{"type":"string"},"contact":{"type":"array","items":{"type":"string"}},"base_pages":{"type":["integer","null"]},"sections":{"type":"object","additionalProperties":{"type":"integer"},"description":"Editable items per section."},"items":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"warnings":{"type":"array","items":{"type":"string"}},"expires_at":{"type":"string","format":"date-time"}}},"Change":{"type":"object","properties":{"id":{"type":"string"},"section":{"type":"string","enum":["titles","bullets","skills","summary","projects"]},"kind":{"type":"string"},"context":{"type":"string"},"before":{"type":"string"},"after":{"type":"string","description":"**double asterisks** mark bold."},"invented":{"type":"array","items":{"type":"string"},"description":"Substrings of `after` the model made up — confirm or correct before use."},"status":{"type":"string","enum":["accepted","rejected"]}}},"File":{"type":"object","properties":{"url":{"type":"string","description":"Download link, no auth needed; valid 24 h."},"name":{"type":"string"},"bytes":{"type":"integer"},"pages":{"type":["integer","null"]},"content":{"type":"string","description":"LaTeX source (format tex only)."},"expires_at":{"type":"string","format":"date-time"}}},"Build":{"type":"object","properties":{"format":{"type":"string","enum":["pdf","tex"]},"pdf":{"$ref":"#/components/schemas/File"},"tex":{"$ref":"#/components/schemas/File"},"base_pages":{"type":["integer","null"],"description":"The original resume's page count."},"fits_original_length":{"type":["boolean","null"]},"shortened":{"type":"integer","description":"Rewrites shortened to fit the original page count."},"note":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}}},"Credits":{"type":"object","properties":{"available":{"type":"integer"},"plan":{"type":"object","properties":{"kind":{"type":"string","enum":["monthly","trial"]},"allowance":{"type":"integer"},"used":{"type":"integer"},"left":{"type":"integer"},"resets_at":{"type":["string","null"],"format":"date-time"}}},"purchased":{"type":"integer"}}},"Tailoring":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["running","ready","failed"]},"resume_id":{"type":"string"},"job_title":{"type":"string"},"sections":{"type":"array","items":{"type":"string","enum":["titles","bullets","skills","summary","projects"]}},"target":{"type":"object","properties":{"title":{"type":"string"},"field":{"type":"string"},"career_switch":{"type":"boolean"},"title_ladder":{"type":"array","items":{"type":"string"}},"summary_angle":{"type":"string"}}},"keywords":{"type":"array","items":{"type":"string"}},"changes":{"type":"array","items":{"$ref":"#/components/schemas/Change"}},"left_out_lines":{"type":"array","items":{"type":"string"},"description":"Non-LaTeX resumes: lines dropped from other sections as irrelevant (keep_all_lines keeps them)."},"not_rewritten":{"type":"array","items":{"type":"string"}},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"credit_refunded":{"type":"boolean"},"credits":{"$ref":"#/components/schemas/Credits"},"build":{"$ref":"#/components/schemas/Build"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":true}}}}},"paths":{"/v1/tailor/credits":{"get":{"operationId":"getCredits","summary":"Resume credits left on this license","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tier":{"type":"string"},"resume_tailor":{"type":"boolean"},"credits":{"$ref":"#/components/schemas/Credits"}}}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tailor/resumes":{"post":{"operationId":"importResume","summary":"Parse a resume into rewritable items (free, 20 a day)","description":"Returns a resume_id to tailor the same resume to several jobs. Kept 24 h after last use.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeInput"}}}},"responses":{"201":{"description":"Imported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resume"}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listResumes","summary":"Resumes stored on this license","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tailor/resumes/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"resume id (res_…)","schema":{"type":"string"}}],"get":{"operationId":"getResume","summary":"A stored resume and its items","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Resume"}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteResume","summary":"Delete a resume, its tailorings, and their files now","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tailor/tailorings":{"post":{"operationId":"tailorResume","summary":"Tailor a resume to a job (1 credit)","description":"Takes 30-90 s. With wait: false it answers 202 at once — poll GET /v1/tailor/tailorings/{id}?wait=30. A failed tailoring refunds its credit unless the plan and rewrite both completed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["job_title","job_description"],"properties":{"resume_id":{"type":"string","description":"From importResume; or send resume instead."},"resume":{"$ref":"#/components/schemas/ResumeInput"},"job_title":{"type":"string"},"job_description":{"type":"string","description":"The full posting (80+ characters)."},"sections":{"type":"array","items":{"type":"string","enum":["titles","bullets","skills","summary","projects"]},"description":"Default: all five."},"wait":{"type":"boolean","default":true},"build":{"type":"string","enum":["pdf","tex","none"],"default":"none","description":"Also build the result (wait mode only)."}}}}}},"responses":{"201":{"description":"Tailored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tailoring"}}}},"202":{"description":"Running (wait: false)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tailoring"}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listTailorings","summary":"Tailorings from the last 24 h","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tailor/tailorings/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"tailoring id (tlr_…)","schema":{"type":"string"}}],"get":{"operationId":"getTailoring","summary":"Status and every change of a tailoring","parameters":[{"name":"wait","in":"query","required":false,"description":"Seconds (max 60) to wait for a running tailoring.","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tailoring"}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tailor/tailorings/{id}/revise":{"parameters":[{"name":"id","in":"path","required":true,"description":"tailoring id (tlr_…)","schema":{"type":"string"}}],"post":{"operationId":"reviseItem","summary":"Rewrite one item again, optionally following an instruction","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["item_id"],"properties":{"item_id":{"type":"string"},"instruction":{"type":"string","description":"e.g. \"mention Python\", \"shorter\", \"less salesy\""}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"change":{"$ref":"#/components/schemas/Change"}}}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tailor/tailorings/{id}/edit":{"parameters":[{"name":"id","in":"path","required":true,"description":"tailoring id (tlr_…)","schema":{"type":"string"}}],"post":{"operationId":"editItems","summary":"Set exact wording, or reject / re-accept rewrites","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"set":{"type":"object","additionalProperties":{"type":"string"},"description":"item id -> text (accepted)."},"reject":{"type":"array","items":{"type":"string"},"description":"Keep these items' original text."},"accept":{"type":"array","items":{"type":"string"},"description":"Use these rewrites again."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tailoring"}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tailor/tailorings/{id}/shorten":{"parameters":[{"name":"id","in":"path","required":true,"description":"tailoring id (tlr_…)","schema":{"type":"string"}}],"post":{"operationId":"shortenTailoring","summary":"Shorten every accepted rewrite","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ratio":{"type":"number","minimum":0.5,"maximum":0.95,"default":0.82}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"shortened":{"type":"integer"},"changes":{"type":"array","items":{"$ref":"#/components/schemas/Change"}}}}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tailor/tailorings/{id}/build":{"parameters":[{"name":"id","in":"path","required":true,"description":"tailoring id (tlr_…)","schema":{"type":"string"}}],"post":{"operationId":"buildResume","summary":"Build the tailored resume as PDF or LaTeX","description":"Uses the accepted changes. PDFs that outgrow the original's page count are shortened once automatically (fit_pages).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","enum":["pdf","tex"],"default":"pdf"},"fit_pages":{"type":"boolean","default":true},"keep_all_lines":{"type":"boolean","default":false,"description":"Non-LaTeX resumes: keep lines the plan left out."},"helper_files":{"type":"object","additionalProperties":{"type":"string"},"description":"LaTeX: add missing .cls/.sty files."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Build"}}}},"default":{"description":"Error (see error.code)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tailor/files/{token}/{name}":{"parameters":[{"name":"token","in":"path","required":true,"description":"from a build","schema":{"type":"string"}},{"name":"name","in":"path","required":true,"description":"file name","schema":{"type":"string"}}],"get":{"operationId":"downloadFile","summary":"Download a built file (no auth; link valid 24 h)","security":[],"responses":{"200":{"description":"The file","content":{"application/pdf":{},"application/x-tex":{}}},"404":{"description":"Expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}