{"openapi":"3.1.0","info":{"title":"Aideify Speaker & Authorship Attribution API","version":"1.0.0","description":"Use an existing records:write key to upload and review; records:read permits reads and exports. Existing account sign-in supports the browser tool with same-origin writes. Labels: Subject, Other contributors (human or AI), Context, Uncertain. A confirmed Subject speaker mapping or one manually labelled Subject passage enables optional assistance; no additional samples are required. Assisted processing requires explicit allowRemote:true; it proposes up to 30 unreviewed passages per pass, never overwrites confirmed labels, and makes no automatic payment or credit debit. Initial limits: 10 assisted starts/account/UTC day, 5,000 mutations/document, 10 documents and 20 MiB original bytes/account, 3 MiB/file, 80,000 text characters, 1,200 initial lines. Native PDF (20 pages), DOCX, TXT, Markdown. Originals remain private until deletion. Offsets use UTF-16 code units; the original extracted text is immutable. Mutation requests require expectedRevision and UUID Idempotency-Key. Interrupted processing is never auto-replayed. Exported Subject material includes reviewed passages only."},"servers":[{"url":"https://aideify.com/api/v1/attribution"}],"paths":{"/jobs":{"get":{"operationId":"listAttributions","summary":"List your saved attribution documents.","security":[{"CustomerKey":[]}],"parameters":[],"responses":{"200":{"description":"Owner-scoped result"},"401":{"description":"Sign in or supply a scoped customer key"},"403":{"description":"Wrong scope/origin"},"404":{"description":"Not owned or not found"},"409":{"description":"Stale revision, busy or interrupted operation"},"422":{"description":"Invalid action or missing initial sample"},"429":{"description":"Processing limit"}}},"post":{"operationId":"uploadAttribution","summary":"Upload and parse a private original without rewriting it.","security":[{"CustomerKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Private parsed document, candidate speakers, exact text offsets and revision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"413":{"description":"File or storage limit"}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"subjectName":{"type":"string","maxLength":100}}}}}}}},"/jobs/{id}":{"get":{"operationId":"readAttribution","summary":"Read original extracted text, labels and review state.","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Owner-scoped result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"401":{"description":"Sign in or supply a scoped customer key"},"403":{"description":"Wrong scope/origin"},"404":{"description":"Not owned or not found"},"409":{"description":"Stale revision, busy or interrupted operation"},"422":{"description":"Invalid action or missing initial sample"},"429":{"description":"Processing limit"}}},"delete":{"operationId":"deleteAttribution","summary":"Delete this document, its original and operation receipts.","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Owner-scoped result"},"401":{"description":"Sign in or supply a scoped customer key"},"403":{"description":"Wrong scope/origin"},"404":{"description":"Not owned or not found"},"409":{"description":"Stale revision, busy or interrupted operation"},"422":{"description":"Invalid action or missing initial sample"},"429":{"description":"Processing limit"}}}},"/jobs/{id}/original":{"get":{"operationId":"downloadAttributionOriginal","summary":"Download the unchanged uploaded original through authentication.","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Owner-scoped result"},"401":{"description":"Sign in or supply a scoped customer key"},"403":{"description":"Wrong scope/origin"},"404":{"description":"Not owned or not found"},"409":{"description":"Stale revision, busy or interrupted operation"},"422":{"description":"Invalid action or missing initial sample"},"429":{"description":"Processing limit"}}}},"/jobs/{id}/export":{"get":{"operationId":"exportAttribution","summary":"Export labelled JSON or reviewed Subject-only text.","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"mode","in":"query","schema":{"enum":["all","subject"]}},{"name":"format","in":"query","schema":{"enum":["json","text"]}}],"responses":{"200":{"description":"Owner-scoped result"},"401":{"description":"Sign in or supply a scoped customer key"},"403":{"description":"Wrong scope/origin"},"404":{"description":"Not owned or not found"},"409":{"description":"Stale revision, busy or interrupted operation"},"422":{"description":"Invalid action or missing initial sample"},"429":{"description":"Processing limit"}}}},"/jobs/{id}/actions":{"post":{"operationId":"reviewAttribution","summary":"Confirm speaker mappings, review sample labels, split a passage or request classifier suggestions.","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action","expectedRevision"],"additionalProperties":false,"properties":{"action":{"enum":["map","review","split","classify","identify","describe"]},"expectedRevision":{"type":"integer","minimum":0},"subjectSpeakerId":{"type":"string"},"documentType":{"enum":["essay","chat_history","interview_transcript","email_chain","questionnaire","unknown"]},"mappings":{"type":"array","maxItems":30,"items":{"type":"object","required":["id","label"],"properties":{"id":{"type":"string"},"label":{"type":"string","enum":["subject","other_contributors","context","uncertain"]},"kind":{"enum":["human","ai","unknown"]}}}},"edits":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"object","required":["id","label"],"properties":{"id":{"type":"string"},"label":{"type":"string","enum":["subject","other_contributors","context","uncertain"]}}}},"passage":{"type":"string"},"offset":{"type":"integer"},"mode":{"enum":["remaining","reconsider"]},"allowRemote":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Owner-scoped result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"401":{"description":"Sign in or supply a scoped customer key"},"403":{"description":"Wrong scope/origin"},"404":{"description":"Not owned or not found"},"409":{"description":"Stale revision, busy or interrupted operation"},"422":{"description":"Invalid action or missing initial sample"},"429":{"description":"Processing limit"}}}}},"components":{"securitySchemes":{"CustomerKey":{"type":"http","scheme":"bearer"}},"schemas":{"Label":{"type":"string","enum":["subject","other_contributors","context","uncertain"]},"Speaker":{"type":"object","required":["id","name","label","kind","confirmed"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string","enum":["subject","other_contributors","context","uncertain"]},"kind":{"enum":["human","ai","unknown"]},"confirmed":{"type":"boolean"}}},"Proposal":{"type":["object","null"],"properties":{"label":{"type":"string","enum":["subject","other_contributors","context","uncertain"]},"candidate":{"type":"string","enum":["subject","other_contributors","context","uncertain"]},"confidence":{"type":"number","minimum":0,"maximum":1},"reason":{"type":"string"}}},"Passage":{"description":"The label applies to contentStart..end. The prefix start..contentStart holds structural speaker/time metadata and is Context. Original offsets use UTF-16 code units.","type":"object","required":["id","start","end","contentStart","speaker","label","origin","reviewed","proposal"],"properties":{"id":{"type":"string"},"start":{"type":"integer","minimum":0},"end":{"type":"integer","minimum":0},"contentStart":{"type":"integer","minimum":0},"speaker":{"type":["string","null"]},"label":{"type":"string","enum":["subject","other_contributors","context","uncertain"]},"origin":{"enum":["unassigned","structure","mapping","manual"]},"reviewed":{"type":"boolean"},"reviewOrder":{"type":"integer"},"proposal":{"$ref":"#/components/schemas/Proposal"}}},"Assessment":{"type":"object","required":["version","method","documentType","parties","partyCount","candidateIds","needsIdentity"],"properties":{"version":{"const":1},"method":{"const":"structural_rules"},"documentType":{"type":"object","properties":{"type":{"enum":["essay","chat_history","interview_transcript","email_chain","questionnaire","unknown"]},"confidence":{"type":"number","minimum":0,"maximum":1},"evidence":{"type":"string"}}},"source":{"type":["string","null"]},"partyCount":{"type":"integer"},"parties":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Speaker"},{"type":"object","properties":{"example":{"type":"string","maxLength":250},"inferred":{"type":"boolean"}}}]}},"candidateIds":{"type":"array","items":{"type":"string"}},"suggestedSubjectId":{"type":["string","null"]},"description":{"type":"string"},"needsIdentity":{"type":"boolean"},"clarification":{"type":"string"}}},"Job":{"type":"object","required":["id","name","subjectName","revision","text","speakers","passages","rounds","createdAt"],"properties":{"assessment":{"$ref":"#/components/schemas/Assessment"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"subjectName":{"type":"string"},"revision":{"type":"integer","minimum":0},"text":{"type":"string","maxLength":80000},"speakers":{"type":"array","items":{"$ref":"#/components/schemas/Speaker"}},"passages":{"type":"array","items":{"$ref":"#/components/schemas/Passage"}},"rounds":{"type":"array","items":{"type":"object"}},"createdAt":{"type":"string"},"processing":{"type":"boolean"},"interrupted":{"type":"boolean"}}},"JobResponse":{"type":"object","required":["job"],"properties":{"job":{"$ref":"#/components/schemas/Job"},"replayed":{"type":"boolean"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"requestId":{"type":"string"},"job":{"$ref":"#/components/schemas/Job"}}}}}}