{"tags":[{"name":"Form workflow","description":"Create a job, upload documents, analyse, review answers and download the PDF."},{"name":"Saved jobs","description":"Find and delete existing jobs."},{"name":"Credits and payments","description":"Check credits, quote a task and manage purchases."},{"name":"Account connection","description":"Optional agent authorization and API key management. For manual setup, create your key in My account."}],"openapi":"3.1.0","info":{"title":"Aideify Form Filler API","version":"0.2.0","description":"Create a job, upload your target form and source documents, analyse, review answers and download the completed PDF.\n\nUse an Aideify bearer API key from [My account](/account#api). Test Request runs here without a Scalar account. See the [API guide](/developers/form-filler/) for a complete example.\n\nAPI activation uses one existing credit once. Generating a completed PDF uses one credit; corrections and repeat downloads for the same job and target reuse that completion within processing limits."},"servers":[{"url":"https://aideify.com/api/v1/form-filler"}],"components":{"securitySchemes":{"CustomerKey":{"type":"http","scheme":"bearer","description":"Customer-scoped key; never an owner reporting credential."}}},"paths":{"/jobs":{"post":{"operationId":"create","summary":"Create a form job","security":[{"CustomerKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":100}}],"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["inputs","processing","review","failed"]},"revision":{"type":"integer"},"packageRevision":{"type":"integer"},"sample":{"type":"boolean"},"hasTarget":{"type":"boolean"},"outputReady":{"type":"boolean"},"outputRevision":{"type":["integer","null"]},"fields":{"type":"array","items":{"type":"object","required":["id","label","value"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"},"status":{"type":"string"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"decision":{"type":"string"},"origin":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"documentId":{"type":"string"},"excerpt":{"type":"string"},"value":{"type":"string"},"locator":{"type":["string","object","null"]}}}},"locator":{"type":["object","null"]},"placement":{"type":["object","null"],"properties":{"page":{"type":"integer","minimum":1},"rect":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.02,"maximum":1},"height":{"type":"number","minimum":0.008,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false}}},"pending":{"type":["object","boolean","null"]}}}},"documents":{"type":"array","items":{"type":"object","required":["id","name","state"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"},"bytes":{"type":"integer"},"note":{"type":["string","null"]}}}},"error":{"type":["string","null"]},"completionPriceCents":{"type":"integer"},"creditsRemaining":{"type":"integer"},"links":{"type":"object","properties":{"job":{"type":"string"},"review":{"type":"string"},"download":{"type":"string"}},"required":["job","review","download"],"additionalProperties":false}},"required":["id","state","revision","packageRevision","sample","hasTarget","outputReady","outputRevision","fields","documents","error","completionPriceCents","creditsRemaining","links"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"tags":["Form workflow"]},"get":{"operationId":"list","summary":"List saved jobs","security":[{"CustomerKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["jobs"],"properties":{"jobs":{"type":"array","items":{"type":"object","required":["id","stage","targetFilename"]}}}}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"tags":["Saved jobs"]}},"/jobs/{id}/uploads":{"post":{"operationId":"uploads","summary":"Upload target and sources","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["inputs","processing","review","failed"]},"revision":{"type":"integer"},"packageRevision":{"type":"integer"},"sample":{"type":"boolean"},"hasTarget":{"type":"boolean"},"outputReady":{"type":"boolean"},"outputRevision":{"type":["integer","null"]},"fields":{"type":"array","items":{"type":"object","required":["id","label","value"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"},"status":{"type":"string"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"decision":{"type":"string"},"origin":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"documentId":{"type":"string"},"excerpt":{"type":"string"},"value":{"type":"string"},"locator":{"type":["string","object","null"]}}}},"locator":{"type":["object","null"]},"placement":{"type":["object","null"],"properties":{"page":{"type":"integer","minimum":1},"rect":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.02,"maximum":1},"height":{"type":"number","minimum":0.008,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false}}},"pending":{"type":["object","boolean","null"]}}}},"documents":{"type":"array","items":{"type":"object","required":["id","name","state"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"},"bytes":{"type":"integer"},"note":{"type":["string","null"]}}}},"error":{"type":["string","null"]},"completionPriceCents":{"type":"integer"},"creditsRemaining":{"type":"integer"},"links":{"type":"object","properties":{"job":{"type":"string"},"review":{"type":"string"},"download":{"type":"string"}},"required":["job","review","download"],"additionalProperties":false}},"required":["id","state","revision","packageRevision","sample","hasTarget","outputReady","outputRevision","fields","documents","error","completionPriceCents","creditsRemaining","links"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["revision","packageRevision"],"properties":{"revision":{"type":"integer"},"packageRevision":{"type":"integer"},"target":{"type":"string","format":"binary"},"sources":{"type":"array","items":{"type":"string","format":"binary"}},"allowRemote":{"type":"boolean"},"allowDrafting":{"type":"boolean","default":false,"description":"Opt in to AI drafts for unanswered narrative fields; approval is required for export."}}}}}},"tags":["Form workflow"],"description":"Upload one target and multiple sources; up to three requests per job"}},"/jobs/{id}/sample":{"post":{"operationId":"sample","summary":"Load sample documents","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["inputs","processing","review","failed"]},"revision":{"type":"integer"},"packageRevision":{"type":"integer"},"sample":{"type":"boolean"},"hasTarget":{"type":"boolean"},"outputReady":{"type":"boolean"},"outputRevision":{"type":["integer","null"]},"fields":{"type":"array","items":{"type":"object","required":["id","label","value"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"},"status":{"type":"string"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"decision":{"type":"string"},"origin":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"documentId":{"type":"string"},"excerpt":{"type":"string"},"value":{"type":"string"},"locator":{"type":["string","object","null"]}}}},"locator":{"type":["object","null"]},"placement":{"type":["object","null"],"properties":{"page":{"type":"integer","minimum":1},"rect":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.02,"maximum":1},"height":{"type":"number","minimum":0.008,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false}}},"pending":{"type":["object","boolean","null"]}}}},"documents":{"type":"array","items":{"type":"object","required":["id","name","state"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"},"bytes":{"type":"integer"},"note":{"type":["string","null"]}}}},"error":{"type":["string","null"]},"completionPriceCents":{"type":"integer"},"creditsRemaining":{"type":"integer"},"links":{"type":"object","properties":{"job":{"type":"string"},"review":{"type":"string"},"download":{"type":"string"}},"required":["job","review","download"],"additionalProperties":false}},"required":["id","state","revision","packageRevision","sample","hasTarget","outputReady","outputRevision","fields","documents","error","completionPriceCents","creditsRemaining","links"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"tags":["Form workflow"]}},"/jobs/{id}/process":{"post":{"operationId":"process","summary":"Analyse documents","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["inputs","processing","review","failed"]},"revision":{"type":"integer"},"packageRevision":{"type":"integer"},"sample":{"type":"boolean"},"hasTarget":{"type":"boolean"},"outputReady":{"type":"boolean"},"outputRevision":{"type":["integer","null"]},"fields":{"type":"array","items":{"type":"object","required":["id","label","value"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"},"status":{"type":"string"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"decision":{"type":"string"},"origin":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"documentId":{"type":"string"},"excerpt":{"type":"string"},"value":{"type":"string"},"locator":{"type":["string","object","null"]}}}},"locator":{"type":["object","null"]},"placement":{"type":["object","null"],"properties":{"page":{"type":"integer","minimum":1},"rect":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.02,"maximum":1},"height":{"type":"number","minimum":0.008,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false}}},"pending":{"type":["object","boolean","null"]}}}},"documents":{"type":"array","items":{"type":"object","required":["id","name","state"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"},"bytes":{"type":"integer"},"note":{"type":["string","null"]}}}},"error":{"type":["string","null"]},"completionPriceCents":{"type":"integer"},"creditsRemaining":{"type":"integer"},"links":{"type":"object","properties":{"job":{"type":"string"},"review":{"type":"string"},"download":{"type":"string"}},"required":["job","review","download"],"additionalProperties":false}},"required":["id","state","revision","packageRevision","sample","hasTarget","outputReady","outputRevision","fields","documents","error","completionPriceCents","creditsRemaining","links"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":0},"packageRevision":{"type":"integer","minimum":0},"allowRemote":{"type":"boolean"},"allowDrafting":{"type":"boolean","default":false,"description":"Opt in to AI drafts for unanswered narrative fields; approval is required for export."},"allowManual":{"type":"boolean"}},"required":["revision","packageRevision"],"additionalProperties":false}}}},"tags":["Form workflow"],"description":"Start asynchronous analysis (202); up to three attempts per job"}},"/jobs/{id}/progress":{"get":{"operationId":"progress","summary":"Get analysis progress","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"null"},{"type":"object","required":["runId","status","steps"],"properties":{"runId":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"integer"},"updatedAt":{"type":"integer"},"busy":{"type":"boolean"},"steps":{"type":"array","items":{"type":"object","required":["id","label","status"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"status":{"type":"string"},"detail":{"type":"string"},"startedAt":{"type":["integer","null"]},"finishedAt":{"type":["integer","null"]},"counts":{"type":"object","additionalProperties":{"type":"integer"}}}}}}}]}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"tags":["Form workflow"]}},"/jobs/{id}":{"get":{"operationId":"job","summary":"Get answers and job state","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["inputs","processing","review","failed"]},"revision":{"type":"integer"},"packageRevision":{"type":"integer"},"sample":{"type":"boolean"},"hasTarget":{"type":"boolean"},"outputReady":{"type":"boolean"},"outputRevision":{"type":["integer","null"]},"fields":{"type":"array","items":{"type":"object","required":["id","label","value"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"},"status":{"type":"string"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"decision":{"type":"string"},"origin":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"documentId":{"type":"string"},"excerpt":{"type":"string"},"value":{"type":"string"},"locator":{"type":["string","object","null"]}}}},"locator":{"type":["object","null"]},"placement":{"type":["object","null"],"properties":{"page":{"type":"integer","minimum":1},"rect":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.02,"maximum":1},"height":{"type":"number","minimum":0.008,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false}}},"pending":{"type":["object","boolean","null"]}}}},"documents":{"type":"array","items":{"type":"object","required":["id","name","state"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"},"bytes":{"type":"integer"},"note":{"type":["string","null"]}}}},"error":{"type":["string","null"]},"completionPriceCents":{"type":"integer"},"creditsRemaining":{"type":"integer"},"links":{"type":"object","properties":{"job":{"type":"string"},"review":{"type":"string"},"download":{"type":"string"}},"required":["job","review","download"],"additionalProperties":false}},"required":["id","state","revision","packageRevision","sample","hasTarget","outputReady","outputRevision","fields","documents","error","completionPriceCents","creditsRemaining","links"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"tags":["Form workflow"]},"delete":{"operationId":"delete","summary":"Delete a job","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful response"},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"tags":["Saved jobs"]}},"/jobs/{id}/review":{"patch":{"operationId":"review","summary":"Edit or approve an answer","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string","enum":["inputs","processing","review","failed"]},"revision":{"type":"integer"},"packageRevision":{"type":"integer"},"sample":{"type":"boolean"},"hasTarget":{"type":"boolean"},"outputReady":{"type":"boolean"},"outputRevision":{"type":["integer","null"]},"fields":{"type":"array","items":{"type":"object","required":["id","label","value"],"properties":{"id":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"},"status":{"type":"string"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1},"decision":{"type":"string"},"origin":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"memberId":{"type":"string"},"documentId":{"type":"string"},"excerpt":{"type":"string"},"value":{"type":"string"},"locator":{"type":["string","object","null"]}}}},"locator":{"type":["object","null"]},"placement":{"type":["object","null"],"properties":{"page":{"type":"integer","minimum":1},"rect":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.02,"maximum":1},"height":{"type":"number","minimum":0.008,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false}}},"pending":{"type":["object","boolean","null"]}}}},"documents":{"type":"array","items":{"type":"object","required":["id","name","state"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"state":{"type":"string"},"bytes":{"type":"integer"},"note":{"type":["string","null"]}}}},"error":{"type":["string","null"]},"completionPriceCents":{"type":"integer"},"creditsRemaining":{"type":"integer"},"links":{"type":"object","properties":{"job":{"type":"string"},"review":{"type":"string"},"download":{"type":"string"}},"required":["job","review","download"],"additionalProperties":false}},"required":["id","state","revision","packageRevision","sample","hasTarget","outputReady","outputRevision","fields","documents","error","completionPriceCents","creditsRemaining","links"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"revision":{"type":"integer","minimum":0},"packageRevision":{"type":"integer","minimum":0},"fieldId":{"type":"string","minLength":1,"maxLength":100},"action":{"const":"edit"},"value":{"type":"string","maxLength":2000}},"required":["revision","packageRevision","fieldId","action","value"],"additionalProperties":false},{"type":"object","properties":{"revision":{"type":"integer","minimum":0},"packageRevision":{"type":"integer","minimum":0},"fieldId":{"type":"string","minLength":1,"maxLength":100},"action":{"const":"placement"},"value":{"type":"object","properties":{"page":{"type":"integer","minimum":1},"rect":{"type":"object","properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"width":{"type":"number","minimum":0.02,"maximum":1},"height":{"type":"number","minimum":0.008,"maximum":1}},"required":["x","y","width","height"],"additionalProperties":false}},"required":["page","rect"],"additionalProperties":false}},"required":["revision","packageRevision","fieldId","action","value"],"additionalProperties":false},{"type":"object","properties":{"revision":{"type":"integer","minimum":0},"packageRevision":{"type":"integer","minimum":0},"fieldId":{"type":"string","minLength":1,"maxLength":100},"action":{"enum":["approve","omit","unapprove","keep","suggestion","acknowledge"]}},"required":["revision","packageRevision","fieldId","action"],"additionalProperties":false}]}}}},"tags":["Form workflow"]}},"/jobs/{id}/exports":{"post":{"operationId":"export","summary":"Generate the completed PDF","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer"},"packageRevision":{"type":"integer"},"omitted":{"type":"array","items":{"type":"string"}},"creditsRemaining":{"type":"integer"},"url":{"type":"string"}},"required":["revision","packageRevision","omitted","creditsRemaining","url"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":0},"packageRevision":{"type":"integer","minimum":0},"allowPartial":{"type":"boolean"},"expectedCents":{"type":"integer","minimum":0}},"required":["revision","packageRevision","expectedCents"],"additionalProperties":false}}}},"tags":["Form workflow"],"description":"Create the reviewed PDF; consumes one credit once per job and target"}},"/jobs/{id}/output":{"get":{"operationId":"output","summary":"Download the completed PDF","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"revision","in":"query","required":true,"schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"PDF binary","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"tags":["Form workflow"]}},"/balance":{"get":{"operationId":"balance","summary":"Get credit balance","security":[{"CustomerKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"creditsRemaining":{"type":"integer"},"creditsUsed":{"type":"integer"},"nextCreditPriceCents":{"type":"integer"},"currency":{"type":"string","const":"USD"}},"required":["creditsRemaining","creditsUsed","nextCreditPriceCents","currency"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"tags":["Credits and payments"]}},"/funding":{"get":{"operationId":"funding","summary":"Quote required credits","security":[{"CustomerKey":[]}],"parameters":[{"name":"credits","in":"query","schema":{"type":"integer","minimum":1,"maximum":2,"default":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"creditsRequired":{"type":"integer"},"creditsRemaining":{"type":"integer"},"creditsToAdd":{"type":"integer"},"activationCredits":{"type":"integer"},"completionCredits":{"type":"integer"},"minimumTopUpCents":{"type":"integer"},"suggestedTopUpCents":{"type":["integer","null"]},"currency":{"const":"USD"}},"required":["creditsRequired","creditsRemaining","creditsToAdd","activationCredits","completionCredits","minimumTopUpCents","suggestedTopUpCents","currency"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"tags":["Credits and payments"]}},"/usage":{"get":{"operationId":"usage","summary":"Get credit usage","security":[{"CustomerKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["usage"],"properties":{"usage":{"type":"array","items":{"type":"object","required":["channel","credits","costCents","createdAt"]}}}}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"tags":["Credits and payments"]}},"/checkout":{"post":{"operationId":"checkout","summary":"Create a purchase checkout","security":[{"CustomerKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"orderId":{"type":"string"}},"required":["url","orderId"],"additionalProperties":false}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cents":{"type":"integer","enum":[100,200,500,1000,2000]},"requestKey":{"type":"string","minLength":8,"maxLength":100},"jobId":{"type":"string","pattern":"^[a-f0-9-]{36}$"}},"required":["cents","requestKey"],"additionalProperties":false}}}},"tags":["Credits and payments"]}},"/payments/{id}":{"get":{"operationId":"payment","summary":"Get payment status","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["id","state","cents","refundedCents","balanceCents"],"properties":{"id":{"type":"string"},"state":{"type":"string","enum":["pending","paid","expired","canceled"]},"cents":{"type":"integer"},"refundedCents":{"type":"integer"},"balanceCents":{"type":"integer"},"jobId":{"type":["string","null"]},"expiresAt":{"type":["integer","null"]},"context":{"anyOf":[{"type":"null"},{"type":"object","properties":{"channel":{"type":"string"},"purpose":{"type":"string"},"authorizationId":{"type":["string","null"]},"fromDeveloper":{"type":"boolean"}},"required":["channel","purpose","authorizationId","fromDeveloper"],"additionalProperties":false}]}}}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"tags":["Credits and payments"]}},"/payments/{id}/cancel":{"post":{"operationId":"cancelPayment","summary":"Cancel an unpaid checkout","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["id","state","cents","refundedCents","balanceCents"],"properties":{"id":{"type":"string"},"state":{"type":"string","enum":["pending","paid","expired","canceled"]},"cents":{"type":"integer"},"refundedCents":{"type":"integer"},"balanceCents":{"type":"integer"},"jobId":{"type":["string","null"]},"expiresAt":{"type":["integer","null"]},"context":{"anyOf":[{"type":"null"},{"type":"object","properties":{"channel":{"type":"string"},"purpose":{"type":"string"},"authorizationId":{"type":["string","null"]},"fromDeveloper":{"type":"boolean"}},"required":["channel","purpose","authorizationId","fromDeveloper"],"additionalProperties":false}]}}}}}},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"tags":["Credits and payments"]}},"/keys/{id}":{"delete":{"operationId":"revokeKey","summary":"Revoke an API key","security":[{"CustomerKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successful response"},"401":{"description":"Invalid or revoked customer key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"403":{"description":"Insufficient key scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"404":{"description":"Operation or owned resource unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"409":{"description":"Stale revision, busy job or duplicate request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}},"429":{"description":"Rate, processing or concurrency allowance reached","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"}},"required":["error","code","requestId"],"additionalProperties":false}}}}},"tags":["Account connection"]}},"/authorizations":{"post":{"operationId":"authorize","security":[],"summary":"Request account connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"intent":{"type":"string","enum":["key_only","form_completion"],"default":"key_only"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"id, secret, authorizationUrl, expiresIn (900 seconds), interval (5 seconds)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"secret":{"type":"string"},"authorizationUrl":{"type":"string"},"expiresIn":{"type":"integer"},"interval":{"type":"integer"},"intent":{"enum":["key_only","form_completion"]}},"required":["id","secret","authorizationUrl","expiresIn","interval","intent"],"additionalProperties":false}}}}},"tags":["Account connection"],"description":"Request human account connection and explicit one-credit activation approval"}},"/authorizations/{id}/token":{"post":{"operationId":"token","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"authorization_pending, or authorized with one-time key","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"state":{"const":"authorization_pending"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"const":"denied"}},"required":["state"],"additionalProperties":false},{"type":"object","required":["state","key","id"],"properties":{"state":{"const":"authorized"},"key":{"type":"string"},"id":{"type":"string"},"scope":{"type":"string"},"name":{"type":"string"}}},{"type":"object","properties":{"state":{"const":"credits_required"},"funding":{"type":"object","properties":{"creditsRequired":{"type":"integer"},"creditsRemaining":{"type":"integer"},"creditsToAdd":{"type":"integer"},"activationCredits":{"type":"integer"},"completionCredits":{"type":"integer"},"minimumTopUpCents":{"type":"integer"},"suggestedTopUpCents":{"type":["integer","null"]},"currency":{"const":"USD"}},"required":["creditsRequired","creditsRemaining","creditsToAdd","activationCredits","completionCredits","minimumTopUpCents","suggestedTopUpCents","currency"],"additionalProperties":false},"checkoutUrl":{"type":"string"},"purchaseUrl":{"type":"string"},"order":{"anyOf":[{"type":"null"},{"type":"object","properties":{"id":{"type":"string"},"state":{"enum":["pending","paid","expired","canceled"]},"url":{"type":["string","null"]}},"required":["id","state","url"],"additionalProperties":false}]}},"required":["state","funding","checkoutUrl","purchaseUrl","order"],"additionalProperties":false}]}}}},"401":{"description":"Invalid or expired request"},"409":{"description":"Already delivered"},"429":{"description":"Polling limit"}},"tags":["Account connection"],"summary":"Collect the approved API key"}},"/authorizations/{id}/checkout":{"post":{"operationId":"authorizationCheckout","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"},"cents":{"type":"integer","enum":[100,200,500,1000,2000]},"requestKey":{"type":"string","minLength":8,"maxLength":100}},"required":["secret","cents","requestKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Customer-approved checkout URL and orderId; payment is not complete.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"orderId":{"type":"string"}},"required":["url","orderId"],"additionalProperties":false}}}},"403":{"description":"Human account authorization required"}},"tags":["Account connection"],"summary":"Create checkout during account connection"}},"/authorizations/{id}/payments/{orderId}":{"post":{"operationId":"authorizationPayment","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"Owned payment order ledger status","content":{"application/json":{"schema":{"type":"object","required":["id","state","cents","refundedCents","balanceCents"],"properties":{"id":{"type":"string"},"state":{"type":"string","enum":["pending","paid","expired","canceled"]},"cents":{"type":"integer"},"refundedCents":{"type":"integer"},"balanceCents":{"type":"integer"},"jobId":{"type":["string","null"]},"expiresAt":{"type":["integer","null"]},"context":{"anyOf":[{"type":"null"},{"type":"object","properties":{"channel":{"type":"string"},"purpose":{"type":"string"},"authorizationId":{"type":["string","null"]},"fromDeveloper":{"type":"boolean"}},"required":["channel","purpose","authorizationId","fromDeveloper"],"additionalProperties":false}]}}}}}},"404":{"description":"Payment not available to authorized customer"}},"tags":["Account connection"],"summary":"Check connection payment status"}},"/authorizations/{id}/renew":{"post":{"operationId":"renewAuthorization","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"Renew an approved, undelivered authorization within 24 hours; no extra approval or debit.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"expiresIn":{"type":"integer"},"authorizationUrl":{"type":"string"}},"required":["id","expiresIn","authorizationUrl"],"additionalProperties":false}}}},"410":{"description":"Approval required again; confirmed funds stay on the account."}},"tags":["Account connection"],"summary":"Renew account connection approval"}},"/authorizations/{id}/payments/{orderId}/cancel":{"post":{"operationId":"cancelAuthorizationPayment","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"Owned payment order ledger status","content":{"application/json":{"schema":{"type":"object","required":["id","state","cents","refundedCents","balanceCents"],"properties":{"id":{"type":"string"},"state":{"type":"string","enum":["pending","paid","expired","canceled"]},"cents":{"type":"integer"},"refundedCents":{"type":"integer"},"balanceCents":{"type":"integer"},"jobId":{"type":["string","null"]},"expiresAt":{"type":["integer","null"]},"context":{"anyOf":[{"type":"null"},{"type":"object","properties":{"channel":{"type":"string"},"purpose":{"type":"string"},"authorizationId":{"type":["string","null"]},"fromDeveloper":{"type":"boolean"}},"required":["channel","purpose","authorizationId","fromDeveloper"],"additionalProperties":false}]}}}}}},"404":{"description":"Payment not available to authorized customer"}},"summary":"Cancel an unpaid connection checkout","tags":["Account connection"],"description":"Expire an unpaid checkout; a paid order cannot be canceled."}}}}