LEGAION Partner Verification API v1 Base URL: https://rkryjteyfzgxisnmykek.supabase.co/functions/v1/partner-verification Website: https://www.legaion.com/ Support: support@legaion.com AUTHENTICATION Use Authorization: Bearer on every API request. An organisation administrator creates a key in LEGAION Business Panel > Administration > API Keys. Required scope: engine:verify. Active membership, API limits and the underlying verification engine's subscription, role and processing-mode checks apply. Never use a Supabase service-role key, user password or a short-lived browser session as the integration credential. GET /account Returns HTTP 200 with {account:"LEGAION",organization_id:"..."} when the key is valid. POST /jobs Required header: Idempotency-Key (8-128 ASCII letters, digits, underscores, dots, colons or hyphens). Required JSON field: documentContent (non-blank text, at most 60000 characters). Optional: documentType (at most 120 characters; default document), outputLanguage (pl or en; default pl). Returns HTTP 202 with id, status:pending, created_at, expires_at, human_review_required:true. Use a stable, unique request ID for each source document VERSION. Repeat the same request after a transport error with the same ID. Different content with the same ID returns 409. Do not blindly retry with new IDs: each new job may consume verification credits. The service starts a background verification. API acceptance is NOT a successful verification result. GET /jobs/{id} Use the SAME API key that submitted the job. Poll no faster than once every 5 seconds. 202: pending. Continue polling, subject to rate limits. 200 + status completed: includes coverage, human_review_required:true and verifier containing the full engine response (claims, verdicts, sources and available completeness metadata). 200 + status failed: error_code identifies a terminal failure. Do not interpret it as approval. No automatic retry is performed. coverage is complete only if extractionCoverage.complete is explicitly true and the response has no known analysis truncation. Completeness is not a statement that all claims are correct. Unknown, unverified, fabricated and other engine verdicts remain unchanged in verifier. Consumers must inspect them. Always keep human review in the workflow. A worker that does not finish is reported as failed on polling after four minutes. ERRORS 400 invalid input or missing idempotency key; 401 invalid/expired/revoked key; 403 missing scope or membership; 404 unknown or inaccessible job; 409 idempotency conflict; 410 result expired; 413 payload too large; 429 API limit; 503 temporary service/storage failure. Transport errors must not be treated as successful verification. Requests and polls count against API limits. DATA HANDLING Only explicitly submitted text is sent to LEGAION. The partner API does not persist the input document or raw API key. It stores metadata and an AES-GCM encrypted result, using a per-job key derived from the submitting API key. Results may contain document excerpts. They are accessible for 24 hours; an hourly retention job deletes expired records. Key revocation blocks retrieval immediately. Rotating to another key does not grant access to older results. The verification engine uses the existing no-document-history channel and its usual role, hybrid-mode and billing guards. This is not a claim of zero retention by model providers or partner platforms. n8n/Zapier execution histories and Forge frontend handling follow those platforms' settings and terms. Review the LEGAION privacy policy, DPA and subprocessors before sending confidential data. No automatic document approval, signature, external message, or Jira issue change is performed. N8N WORKFLOW Start Verification -> Wait (5 seconds) -> Get Verification -> branch by status. Repeat Wait only while pending. Stop on failed. Send completed findings for human review. Reuse the source document/version ID for retries. Store the key only in n8n Credentials. ZAPIER WORKFLOW Start Verification -> Delay (1 minute) -> Find Verification -> Filter status equals completed -> human review. If still pending, wait and retrieve again; never continue to approval on pending or failed. Retrieve within 24 hours. Retain successful test Zap runs for review. Configure the key only in the Authentication connection. ATLASSIAN WORKFLOW Open LEGAION Verification on a Jira/JSM issue. Connect your LEGAION key, paste selected text, then Send for verification. The panel polls for findings. Credentials are per-user and stored in Forge's encrypted secret storage; the backend checks Jira issue access as the current user. No attachments are automatically collected. Disconnect removes the stored key.