Preskočiť na hlavný obsah

Vývojári

Dokumentácia REST API

API v JSON cez HTTPS pre právnu AI Attorly. Vykonáva rovnaké operácie ako MCP server, s rovnakými kľúčmi, oprávneniami, limitmi a účtovaním.

Rýchly štart

Nahrajte zmluvu a analyzujte ju v štyroch krokoch.

  1. 1. Vytvorte kľúč

    Vytvorte kľúč v Nastavenia › Vývojári a vyberte REST API. Rovnaký kľúč funguje pre server MCP. Uložte ho do premennej prostredia:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Nahrajte dokument

    Pošlite súbor ako multipart/form-data. data.id v odpovedi je identifikátor dokumentu. analyze=false ho uloží bez spustenia analýzy na pozadí, pretože ďalší krok jednu spustí.

    bash
    curl -X POST https://attorly.ai/api/v1/documents \
      -H "Authorization: Bearer $ATTORLY_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -F "[email protected]" \
      -F "type=NDA" \
      -F "analyze=false"
  3. 3. Analyzujte ho

    Prefer: wait=30 čaká na výsledok až 30 sekúnd. Dokončená analýza sa vráti ako 200 s výsledkom v data. Ak trvá dlhšie, dostanete 202 Accepted s hlavičkou Location, ktorá ukazuje na operáciu.

    bash
    curl -i -X POST https://attorly.ai/api/v1/documents/$DOCUMENT_ID/analyses \
      -H "Authorization: Bearer $ATTORLY_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Prefer: wait=30" \
      -H "Content-Type: application/json" \
      -d '{ "mode": "full", "options": { "partyRole": "BUYER" } }'
  4. 4. Vyzdvihnite výsledok

    Dopytujte sa na operáciu, kým jej stav nie je succeeded alebo failed. Analýza je v result. Retry-After udáva, koľko sekúnd čakať medzi dopytmi.

    bash
    curl https://attorly.ai/api/v1/operations/$OPERATION_ID \
      -H "Authorization: Bearer $ATTORLY_API_KEY"

Autentifikácia

Pošlite prihlasovací údaj v hlavičke Authorization ako token Bearer. Kľúče z Nastavenia › Vývojári začínajú lbmcp_ a fungujú v plánoch Pro a Enterprise pre REST API aj MCP server. Kľúče organizácie v Enterprise začínajú atly_ (atly_rk_ pre obmedzené kľúče, atly_test_ pre testovací režim); staršie kľúče lb_ fungujú ďalej. Aplikácie konajúce v mene osoby používajú OAuth.

http
Authorization: Bearer atly_live_…   # or lbmcp_…, atly_test_…, an OAuth access token

Oprávnenia (scopes)

Každý endpoint vyžaduje oprávnenia uvedené vedľa neho. Kľúč bez nich dostane 403 insufficient_scope a requiredScopes v chybe vypíše všetky oprávnenia, ktoré volanie potrebuje. Kľúče API organizácie a OAuth používajú tieto názvy:

OprávnenieOprávnenie API kľúča organizácie
DOCUMENTS_READdocuments:read
DOCUMENTS_WRITEdocuments:write
DOCUMENTS_DELETEdocuments:delete
DOCUMENTS_ANALYZEanalysis:create
CLAUSES_READclauses:read
RESEARCH_READresearch:read
REDLINES_GENERATEredlines:write
NEGOTIATIONS_READnegotiations:read
WORKFLOWS_EXECUTEworkflows:execute
DUE_DILIGENCE_FULLdue-diligence:write
TEMPLATES_READtemplates:read
TEMPLATES_DRAFTdrafts:write
CASES_READcases:read
CASES_WRITEcases:write

Chyby

Každá chyba má rovnaký tvar: stály kód pre logiku programu, správu pre ľudí a requestId pre podporu.

http
HTTP/1.1 403 Forbidden
Content-Type: application/json
Request-Id: req_7Hq2LmN4pX9sT1vB3cD5eF6g
Attorly-Version: 2026-12-01

{
  "error": {
    "type": "permission_error",
    "code": "insufficient_scope",
    "message": "Insufficient permissions. Missing scope: redlines:write.",
    "requiredScopes": ["redlines:write"],
    "docUrl": "https://attorly.ai/docs/api/errors#insufficient_scope",
    "requestId": "req_7Hq2LmN4pX9sT1vB3cD5eF6g"
  }
}

Každý kód je aj s postupom vysvetlený na stránke chybových kódov

Verzie

API je verzované dátumami. Pošlite Attorly-Version a vyberiete verziu pre jednu požiadavku; bez nej sa použije verzia, s ktorou bol kľúč vytvorený (kľúče spred verzovania používajú 2026-10-01). Každá odpoveď uvádza, ktorá verzia odpovedala. Nekompatibilné zmeny prichádzajú len v novej verzii a zoznam zmien ich uvádza.

http
curl https://attorly.ai/api/v1/documents \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Attorly-Version: 2026-12-01"

HTTP/1.1 200 OK
Attorly-Version: 2026-12-01
Request-Id: req_…

Idempotencia

Pri požiadavkách POST, PATCH a DELETE posielajte hlavičku Idempotency-Key, napríklad UUID. Opakovaný pokus s rovnakým kľúčom a rovnakou požiadavkou dostane prvú odpoveď s Idempotent-Replayed: true a práca sa znova nespustí ani nezaúčtuje. Kľúč znova použitý pre inú požiadavku dostane 422 idempotency_key_reused, kľúč, ktorý ešte beží, dostane 409 alebo pri dlhom volaní tú istú operáciu. Chyby servera sa neukladajú, takže ich opakovanie prebehne znova. Kľúče sa uchovávajú 24 hodín.

bash
curl -X POST https://attorly.ai/api/v1/redlines \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "documentId": "doc_123", "partyRole": "BUYER" }'

# IDEMPOTENCY_KEY=$(uuidgen) once per logical request; a retry with the same key and body:
HTTP/1.1 202 Accepted
Idempotent-Replayed: true

Dlhotrvajúce požiadavky

Od verzie 2026-11-01 odpovedajú úplné analýzy, redliny, vyjednávacie plány, workflow, správy due diligence a návrhy AI okamžite 202 Accepted s operáciou. Pošlite Prefer: wait=30 a najprv sa počká až 30 sekúnd (najviac 60) na výsledok, alebo Prefer: respond-async a dostanete 202 pri akomkoľvek zápise. Dopytujte sa na Location, kým stav nie je succeeded alebo failed, alebo sa prihláste na odber operation.succeeded. Výsledky sa uchovávajú 24 hodín. Organizácia môže súčasne spúšťať najviac 5 dlhých operácií AI; ďalšie dostanú 429 concurrency_limit_exceeded.

http
HTTP/1.1 202 Accepted
Location: /api/v1/operations/op_abc123
Retry-After: 2

{ "data": { "id": "op_abc123", "object": "operation", "status": "running", "resultUrl": "/api/v1/operations/op_abc123", … } }

Stránkovanie

Zoznamy vracajú { object: "list", data, hasMore, nextCursor } a prijímajú limit (1 až 100, predvolene 20) a cursor. Ďalšiu stránku získate, keď pošlete nextCursor ako cursor. Na poslednej stránke je nextCursor null. Kurzor zostáva platný, aj keď pribudnú nové položky.

http
GET /api/v1/documents?limit=2

{
  "object": "list",
  "data": [ { "id": "doc_2", … }, { "id": "doc_1", … } ],
  "hasMore": true,
  "nextCursor": "eyJ0IjoiMjAyNi0xMC0xMVQxMDowMDowMC4wMDBaIiwiaWQiOiJkb2NfMSJ9"
}

GET /api/v1/documents?limit=2&cursor=eyJ0IjoiMjAy…

Limity požiadaviek

Požiadavka sa počíta do viacerých okien: hodinový limit kľúča, 300 za minútu na osobu, 600 za minútu na organizáciu, minútový limit na kľúč pre čítanie, zápisy a volania AI a vlastný limit každej operácie. REST a MCP zdieľajú rovnaké počítadlá. Hlavičky RateLimit-Policy a RateLimit ukazujú všetky okná; X-RateLimit-* ukazuje to, ktoré je najbližšie k vyčerpaniu. Nad limitom dostanete 429 s Retry-After.

http
RateLimit-Policy: "key-hour";q=1000;w=3600, "user-minute";q=300;w=60, "org-minute";q=600;w=60, "ai-minute";q=30;w=60, "tool";q=10;w=60
RateLimit: "key-hour";r=998;t=3412, "user-minute";r=297;t=41, "org-minute";r=590;t=41, "ai-minute";r=29;t=41, "tool";r=9;t=41
X-RateLimit-Limit: 10
X-RateLimit-Remaining: 9
X-RateLimit-Reset: 1791720000

Webhooky

Vytvorte endpoint pomocou POST /api/v1/webhook-endpoints a dostanete správu, keď práca skončí, namiesto dopytovania. Attorly pošle POST s udalosťou JSON podpísanou podľa Standard Webhooks tajomstvom whsec_ endpointu. Overte podpis skôr, než obsahu uveríte, odpovedzte 2xx do 15 sekúnd a odstraňujte duplicity podľa webhook-id: neúspešné doručenia sa opakujú 72 hodín. Tajomstvo môžete obnoviť, poslať testovaciu udalosť a pozrieť si každé doručenie.

typescript
import crypto from 'node:crypto';

// Standard Webhooks: verify before you parse. secret is the endpoint's whsec_… value.
export function verifyAttorlyWebhook(rawBody: string, headers: Headers, secret: string): unknown {
  const id = headers.get('webhook-id');
  const timestamp = headers.get('webhook-timestamp');
  const signatures = headers.get('webhook-signature') ?? '';
  if (!id || !timestamp) throw new Error('Missing webhook headers');
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) throw new Error('Timestamp too old');

  const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64');
  const expected = crypto.createHmac('sha256', key).update(`${id}.${timestamp}.${rawBody}`).digest();
  const valid = signatures.split(' ').some((entry) => {
    const [version, value] = entry.split(',');
    const given = Buffer.from(value ?? '', 'base64');
    return version === 'v1' && given.length === expected.length && crypto.timingSafeEqual(given, expected);
  });
  if (!valid) throw new Error('Invalid signature');
  return JSON.parse(rawBody); // Deduplicate on webhook-id: a delivery can arrive more than once.
}

Testovací režim

Testovacie kľúče (atly_test_…) dosiahnu na každý endpoint, ale pracujú s oddelenými testovacími údajmi a vracajú pevné ukážkové výsledky: nebeží žiadna AI a nespotrebúvajú sa kredity. Testovací kľúč nikdy nevidí skutočné údaje. Vložte do ľubovoľného textového poľa magickú hodnotu ako __fail_credits__, __fail_consent__ alebo __slow__ a dostanete danú chybu alebo oneskorenie. DELETE /api/v1/test-data zmaže všetko, čo testovacie kľúče vytvorili.

bash
curl -X POST https://attorly.ai/api/v1/analyses \
  -H "Authorization: Bearer atly_test_…" \
  -H "Content-Type: application/json" \
  -d '{ "mode": "quick", "content": "__fail_credits__" }'

HTTP/1.1 402 Payment Required
{ "error": { "code": "insufficient_credits", "message": "Test mode: the AI credits are used up …" } }

OAuth

Aplikácie konajúce v mene používateľa Attorly sa prihlasujú cez OAuth 2.1: zisťovanie na /.well-known/oauth-authorization-server, dynamická registrácia klientov a tok autorizačného kódu s PKCE (S256). Požiadajte o resource=https://attorly.ai/api/v1 a získate token pre REST API; token vydaný pre MCP server sa tu odmietne. Pridajte offline_access a dostanete obnovovací token. Osoba vyberie organizáciu a na obrazovke súhlasu môže oprávnenia zúžiť.

http
GET https://attorly.ai/.well-known/oauth-protected-resource/api/v1
GET https://attorly.ai/.well-known/oauth-authorization-server

GET https://attorly.ai/api/oauth/authorize?response_type=code&client_id=…&redirect_uri=…
    &code_challenge=…&code_challenge_method=S256&scope=documents:read%20offline_access
    &resource=https://attorly.ai/api/v1&state=…

POST https://attorly.ai/api/oauth/token
grant_type=authorization_code&code=…&code_verifier=…&redirect_uri=…&client_id=…&resource=https://attorly.ai/api/v1

Účtovanie

Operácie s AI čerpajú rovnaké AI kredity ako aplikácia Attorly, z peňaženky vlastníka kľúča alebo jeho organizácie, či ich voláte cez REST, alebo MCP. Keď kredity minú, dostanete 402 insufficient_credits. Volania v testovacom režime sú bezplatné.

Plány

API je súčasťou plánov Pro a Enterprise. Ak plán vlastníka kľúča už nezahŕňa prístup k API alebo vlastník odišiel z organizácie, požiadavky sa odmietnu s kódom 403.

Referencia

Každá operácia, vygenerovaná z dokumentu OpenAPI, ktorý poskytuje samotné API. Cesty sú relatívne k https://attorly.ai. Úspešné odpovede obaľujú výsledok do data. Popisy polí sú v angličtine.

Dokumenty

GET/api/v1/documentslistDocuments

Vypísať uložené dokumenty, ktoré kľúč môže čítať, od najnovších.

Oprávnenie:DOCUMENTS_READ
Parametre dopytu
PoleTypPopis
type"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …Only documents of this kind
status"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"Only documents in this processing state
querystringOnly documents whose name contains this text
includeArchivedbooleanAlso list archived documents (left out by default)
limitinteger
cursorstringPass the nextCursor of the previous page to get the next one
curl
curl "https://attorly.ai/api/v1/documents?limit=20" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/documentsuploadDocument

Nahrať dokument ako multipart/form-data alebo ako JSON s obsahom v base64 či čistým textom. Na pozadí sa analyzuje, ak analyze nie je false.

Oprávnenie:DOCUMENTS_WRITEČerpá kredity AIPrijíma nahrávanie súborov
Telo požiadavky
PoleTypPopis
filenamepovinnéstringThe file name with its extension, e.g. "nda.pdf"; the extension decides the file type when mimeType is absent
contentBase64stringThe file, base64-encoded
textstringPlain text to store as a .txt document, instead of contentBase64
mimeTypestringThe file's MIME type; checked against its content
namestringDisplay name; defaults to the file name
type"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …What the document is
urlstring (uri)An https URL Attorly downloads the file from (public hosts only, up to 10 MB), instead of contentBase64 or text
analyzebooleanAnalyse the document in the background after upload, as the app does (uses AI credits). false stores it only
Údaje odpovede (201)
PoleTypPopis
idpovinnéstring
namepovinnéstring
originalNamepovinnéstring
typepovinné"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
sizepovinnéinteger
statuspovinné"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
analysisQueuedpovinnébooleantrue when the background analysis was started
createdAtpovinnéstringISO 8601 date-time
urlpovinnéstringWhere the document opens in Attorly
curl
curl -X POST "https://attorly.ai/api/v1/documents" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "filename": "nda.txt",
  "text": "This Mutual Non-Disclosure Agreement is entered into by…",
  "type": "NDA"
}'
GET/api/v1/documents/searchsearchDocuments

Vyhľadávanie v texte dokumentov, ktoré kľúč smie čítať, podľa významu aj presných slov.

Oprávnenie:DOCUMENTS_READ
Parametre dopytu
PoleTypPopis
querypovinnéstringWhat to look for, in plain language or exact words
type"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …Only documents of this kind
limitinteger
cursorstringPass the nextCursor of the previous page to get the next one
curl
curl "https://attorly.ai/api/v1/documents/search?query=limitation+of+liability&limit=10" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/documents/{documentId}getDocument

Získať dokument, stav jeho spracovania a najnovšiu analýzu.

Oprávnenie:DOCUMENTS_READ
Parametre cesty
PoleTypPopis
documentIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
idpovinnéstring
namepovinnéstring
originalNamepovinnéstring
typepovinné"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
mimeTypepovinnéstring
sizepovinnéinteger
statuspovinné"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
archivedpovinnéboolean
ownedByYoupovinnéboolean
versionNumberpovinnéinteger | nullThe document's number among its versions you can read ("version 2" — a new version is saved as a new document, never in place); null when it has no other version. documents_list returns the newest version of each document only.
createdAtpovinnéstringISO 8601 date-time
updatedAtpovinnéstringISO 8601 date-time
fileAvailablepovinnébooleanfalse when the stored file can no longer be read
governingLawRequiredpovinnébooleantrue when the analysis is held until a governing law is chosen for the document in Attorly
latestAnalysispovinnéobject | null
urlpovinnéstringWhere the document opens in Attorly
curl
curl "https://attorly.ai/api/v1/documents/doc_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
DELETE/api/v1/documents/{documentId}deleteDocument

Požiadať o vymazanie dokumentu, ktorý vlastníte. Dokument sa vymaže, až keď vymazanie schválite v Attorly.

Oprávnenie:DOCUMENTS_DELETE
Parametre cesty
PoleTypPopis
documentIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
idpovinnéstring
deletedpovinnébooleantrue only when the document is gone
statuspovinné"deleted" | "declined" | "awaiting_approval"deleted: the owner approved and it is gone; declined: the owner said no in their app, nothing was deleted; awaiting_approval: it is marked and waits for the owner to delete or keep it in Attorly
requestedAtstringWhen the deletion was first asked for (awaiting_approval)
urlstringWhere the owner approves or keeps the document in Attorly (awaiting_approval)
curl
curl -X DELETE "https://attorly.ai/api/v1/documents/doc_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
POST/api/v1/analysescreateAnalysis

Analyzuje dokument alebo text vložený do požiadavky. mode je full (uložený dokument) alebo quick.

Oprávnenie:DOCUMENTS_ANALYZEDOCUMENTS_READČerpá kredity AI

Pole mode v tele vyberá jednu z možností: mode: full, mode: quick.

Telo požiadavky
PoleTypPopis
mode"full" | "quick"Runs documents_analyze.
documentIdstring
contentstring
mimeTypestring
optionsobject
curl
curl -X POST "https://attorly.ai/api/v1/analyses" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "quick",
  "content": "This Agreement is entered into by and between…"
}'
GET/api/v1/documents/{documentId}/analyseslistDocumentAnalyses

Zoznam uložených analýz dokumentu, od najnovšej.

Oprávnenie:DOCUMENTS_READ
Parametre cesty
PoleTypPopis
documentIdpovinnéstring
Parametre dopytu
PoleTypPopis
limitinteger
cursorstringPass the nextCursor of the previous page to get the next one
curl
curl "https://attorly.ai/api/v1/documents/doc_abc123/analyses" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/documents/{documentId}/analysescreateDocumentAnalysis

Analyzuje uložený dokument.

Oprávnenie:DOCUMENTS_ANALYZEDOCUMENTS_READČerpá kredity AI
Parametre cesty
PoleTypPopis
documentIdpovinnéstring

Pole mode v tele vyberá jednu z možností: mode: full, mode: quick.

Telo požiadavky
PoleTypPopis
mode"full" | "quick"Runs documents_analyze.
contentstring
mimeTypestring
optionsobject
curl
curl -X POST "https://attorly.ai/api/v1/documents/doc_abc123/analyses" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "full",
  "options": {
    "partyRole": "BUYER"
  }
}'
GET/api/v1/documents/{documentId}/textgetDocumentText

Extrahuje čistý text z uloženého dokumentu PDF alebo DOCX.

Oprávnenie:DOCUMENTS_READ
Parametre cesty
PoleTypPopis
documentIdpovinnéstring
Parametre dopytu
PoleTypPopis
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
Údaje odpovede (200)
PoleTypPopis
textpovinnéstringThe document text from offset (untrusted content)
documentNamepovinnéstring
documentTypepovinnéstring
mimeTypepovinnéstring | null
characterCountpovinnéintegerCharacters in the whole document
wordCountpovinnéintegerWords in the whole document
offsetpovinnéinteger
nextOffsetpovinnéinteger | nullPass as offset to read on; null when the text ends here
truncatedpovinnébooleantrue when the text continues past this slice
curl
curl "https://attorly.ai/api/v1/documents/doc_abc123/text" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/analyses/{analysisId}getAnalysis

Získanie uloženej analýzy: zhrnutie, riziko, kľúčové podmienky, klauzuly a odporúčania.

Oprávnenie:DOCUMENTS_READ
Parametre cesty
PoleTypPopis
analysisIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
idpovinnéstring
documentIdpovinnéstring
documentNamepovinnéstring
summarypovinnéstring | null
riskLevelpovinné"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskScorepovinnénumber
keyTermspovinnéarray of any
clausespovinnéarray of any
recommendationspovinnéarray of any
modepovinnéstringSINGLE or CONSENSUS
createdAtpovinnéstringISO 8601 date-time
urlpovinnéstring
curl
curl "https://attorly.ai/api/v1/analyses/your_analysisId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/comparisonscreateComparison

Porovná dva dokumenty alebo texty riadok po riadku.

Oprávnenie:DOCUMENTS_READ
Telo požiadavky
PoleTypPopis
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
Údaje odpovede (200)
PoleTypPopis
differencespovinnéarray of object
summarypovinnéobject
curl
curl -X POST "https://attorly.ai/api/v1/comparisons" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "sourceDocumentId": "doc_abc123",
  "targetDocumentId": "doc_def456"
}'

Ustanovenia

GET/api/v1/clausessearchClauses

Prehľadá knižnicu ustanovení.

Oprávnenie:CLAUSES_READ
Parametre dopytu
PoleTypPopis
querypovinnéstring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
Údaje odpovede (200)
PoleTypPopis
clausespovinnéarray of object
countpovinnéinteger
curl
curl "https://attorly.ai/api/v1/clauses?query=limitation+of+liability&limit=5" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/clauses/risk-assessmentscreateClauseRiskAssessment

Posúdi riziko ustanovenia.

Oprávnenie:CLAUSES_READ
Telo požiadavky
PoleTypPopis
clauseTextpovinnéstring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …The kind of clause; its risk rules are applied
jurisdictionstringISO 3166-1 alpha-2 country code; defaults to international
contractTypestring
partyRole"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE" | …
Údaje odpovede (200)
PoleTypPopis
clauseTextstring
clauseTypepovinnéstring
jurisdictionpovinnéstring
overallRiskScorepovinnénumber
riskLevelpovinné"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskFactorspovinnéarray of object
recommendationspovinnéarray of string
alternativesarray of object
complianceIssuesarray of object
negotiationTipsarray of string
curl
curl -X POST "https://attorly.ai/api/v1/clauses/risk-assessments" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "clauseText": "The Supplier’s total liability shall not exceed the fees paid in the preceding month.",
  "category": "LIABILITY",
  "partyRole": "BUYER"
}'
POST/api/v1/clauses/market-comparisonscreateClauseMarketComparison

Porovná ustanovenie s trhovo štandardným znením.

Oprávnenie:CLAUSES_READ
Telo požiadavky
PoleTypPopis
clauseTextpovinnéstring
categorypovinné"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
Údaje odpovede (200)
PoleTypPopis
inputClausepovinnéstring
categorypovinnéstring
marketStandardspovinnéarray of object
comparisonpovinnéobject
curl
curl -X POST "https://attorly.ai/api/v1/clauses/market-comparisons" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "clauseText": "Either party may terminate this Agreement on 10 days’ written notice.",
  "category": "TERMINATION"
}'
POST/api/v1/clauses/playbook-checkscreateClausePlaybookCheck

Skontroluje ustanovenie podľa playbooku.

Oprávnenie:CLAUSES_READ
Telo požiadavky
PoleTypPopis
clauseTextpovinnéstring
playbookIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
playbookNamepovinnéstring
compliantpovinnéboolean
violationspovinnéarray of string
warningspovinnéarray of string
rulesCheckedpovinnéinteger
curl
curl -X POST "https://attorly.ai/api/v1/clauses/playbook-checks" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "clauseText": "This Agreement is governed by the laws of England.",
  "playbookId": "pb_abc123"
}'

Výskum

POST/api/v1/research/searchessearchResearch

Prehľadá právne zdroje, napríklad Lovdata, EUR-Lex a CourtListener.

Oprávnenie:RESEARCH_READČerpá kredity AI
Telo požiadavky
PoleTypPopis
querypovinnéstring
jurisdictionsarray of stringISO 3166-1 alpha-2 country code to search under, or "EU"; the first entry is used. Defaults to the key owner's country.
sourcesarray of "lovdata" | "eurlex" | "legislation_uk" | "congress_gov" | "courtlistener" | "finlex"Keep only results from these publishers
dateFromstringKeep only dated results on or after this day
dateTostringKeep only dated results on or before this day
limitinteger
Údaje odpovede (200)
PoleTypPopis
querypovinnéstring
jurisdictionpovinnéstring
resultspovinnéarray of object
totalCountpovinnéintegerResults matching the filters, before limit
sourcesstring
curl
curl -X POST "https://attorly.ai/api/v1/research/searches" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "notice period for terminating a commercial lease",
  "jurisdictions": [
    "NO"
  ],
  "limit": 5
}'
GET/api/v1/research/statutesgetStatute

Vyhľadá právny predpis podľa citácie.

Oprávnenie:RESEARCH_READČerpá kredity AI
Parametre dopytu
PoleTypPopis
citationpovinnéstring
jurisdictionpovinnéstringISO 3166-1 alpha-2 country code, or "EU"
Údaje odpovede (200)
PoleTypPopis
idpovinnéstring
titlepovinnéstring
sourcepovinnéstring
jurisdictionstring
citationstring
urlstring
datestring
excerptstring
relevanceScorenumber
attributionstring
asOfstring
consolidatedAsOfstringISO date the stored text is "as amended through", as its publisher states
inForceTostringISO date the act stops/stopped being in force, when the publisher states one
repealedAtstringISO date the act was repealed, when it was
lawDatesReadbooleanTrue when the publisher's dates were read for the act; a missing consolidatedAsOf then means an unamended text
curl
curl "https://attorly.ai/api/v1/research/statutes?citation=LOV-1999-03-26-17&jurisdiction=NO" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Návrhy zmien

POST/api/v1/redlinescreateRedlines

Vygeneruje návrhy zmien pre dokument alebo text.

Oprávnenie:REDLINES_GENERATEČerpá kredity AI
Telo požiadavky
PoleTypPopis
documentIdstring
contentstring
partyRolepovinné"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
riskTolerance"CONSERVATIVE" | "MODERATE" | "AGGRESSIVE"
focusAreasarray of string
playbookIdstringRedline against this playbook's position ladders (own, organisation, system or shared playbooks)
side"OUR_PAPER" | "THEIR_PAPER" | "EITHER"Whose paper the document is, to pick the playbook positions that apply
Údaje odpovede (200)
PoleTypPopis
changespovinnéarray of object
summaryobject
negotiationNotesarray of string
statisticspovinnéobject
curl
curl -X POST "https://attorly.ai/api/v1/redlines" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "documentId": "doc_abc123",
  "partyRole": "BUYER",
  "riskTolerance": "CONSERVATIVE"
}'
POST/api/v1/documents/{documentId}/redlines/resolutionsresolveRedlines

Prijme alebo odmietne navrhované zmeny v dokumente.

Oprávnenie:REDLINES_GENERATE
Parametre cesty
PoleTypPopis
documentIdpovinnéstring
Telo požiadavky
PoleTypPopis
changespovinnéarray of object
Údaje odpovede (200)
PoleTypPopis
acceptedpovinnéinteger
rejectedpovinnéinteger
messagepovinnéstring
curl
curl -X POST "https://attorly.ai/api/v1/documents/doc_abc123/redlines/resolutions" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "changes": [
    {
      "id": "chg_1",
      "action": "accept"
    },
    {
      "id": "chg_2",
      "action": "reject"
    }
  ]
}'

Rokovania

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

Analyzuje vyjednávaciu pozíciu.

Oprávnenie:NEGOTIATIONS_READČerpá kredity AI
Telo požiadavky
PoleTypPopis
documentIdstring
contentstring
partyRolepovinné"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
Údaje odpovede (200)
PoleTypPopis
overallPositionpovinnéstringFAVORABLE, BALANCED or UNFAVORABLE
positionspovinnéarray of object
prioritizedConcessionsarray of string
dealBreakersarray of string
suggestedApproachstring
estimatedOutcomeobject
curl
curl -X POST "https://attorly.ai/api/v1/negotiations/position-analyses" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "documentId": "doc_abc123",
  "partyRole": "BUYER"
}'
POST/api/v1/negotiations/playbookscreateNegotiationPlaybook

Zostaví vyjednávací playbook na základe stratégie.

Oprávnenie:NEGOTIATIONS_READČerpá kredity AI
Telo požiadavky
PoleTypPopis
strategypovinnéobject
contextobject
Údaje odpovede (200)
PoleTypPopis
playbookpovinnéarray of object
anticipatedObjectionspovinnéarray of object
recommendationspovinnéarray of string
summarypovinnéobject
curl
curl -X POST "https://attorly.ai/api/v1/negotiations/playbooks" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "strategy": {
    "overallPosition": "collaborative",
    "priorities": [
      "Cap liability at 12 months of fees",
      "Keep Norwegian law"
    ]
  }
}'

Pracovné postupy

GET/api/v1/workflows/templateslistWorkflowTemplates

Vypíše šablóny pracovných postupov.

Oprávnenie:WORKFLOWS_EXECUTE
Parametre dopytu
PoleTypPopis
category"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …Due diligence project type the template is built for
limitinteger
cursorstringPass the nextCursor of the previous page to get the next one
curl
curl "https://attorly.ai/api/v1/workflows/templates?limit=20" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/workflows/executionslistWorkflowExecutions

Zoznam behov workflow, od najnovšieho, voliteľne pre jeden projekt alebo stav.

Oprávnenie:WORKFLOWS_EXECUTE
Parametre dopytu
PoleTypPopis
projectIdstringOnly executions on this due diligence project
status"PENDING" | "RUNNING" | "WAITING_FOR_INPUT" | "WAITING_FOR_APPROVAL" | "PAUSED" | "COMPLETED" | …
limitinteger
cursorstringPass the nextCursor of the previous page to get the next one
curl
curl "https://attorly.ai/api/v1/workflows/executions?status=COMPLETED&limit=20" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/workflows/executionscreateWorkflowExecution

Spustí pracovný postup na projekte due diligence.

Oprávnenie:WORKFLOWS_EXECUTEČerpá kredity AI
Telo požiadavky
PoleTypPopis
templateIdpovinnéstring
projectIdpovinnéstring
inputspovinnéobject
optionsobject
Údaje odpovede (202)
PoleTypPopis
executionIdpovinnéstring
templateIdpovinnéstring
templateNamepovinnéstring
statuspovinnéstring
startedAtpovinnéstringISO 8601 date-time
messagepovinnéstring
curl
curl -X POST "https://attorly.ai/api/v1/workflows/executions" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "templateId": "wft_abc123",
  "projectId": "ddp_abc123",
  "inputs": {}
}'
GET/api/v1/workflows/executions/{executionId}getWorkflowExecution

Zistí stav spusteného pracovného postupu.

Oprávnenie:WORKFLOWS_EXECUTE
Parametre cesty
PoleTypPopis
executionIdpovinnéstring
Parametre dopytu
PoleTypPopis
includeStepsboolean
Údaje odpovede (200)
PoleTypPopis
executionIdpovinnéstring
templateNamepovinnéstring
statuspovinnéstring
startedAtstringISO 8601 date-time
completedAtstringISO 8601 date-time
variablesobject
errorstring | null
stepsarray of object
curl
curl "https://attorly.ai/api/v1/workflows/executions/wfx_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Projekty due diligence

GET/api/v1/due-diligence/projectslistDueDiligenceProjects

Zoznam projektov due diligence, od najnovšieho.

Oprávnenie:DUE_DILIGENCE_FULL
Parametre dopytu
PoleTypPopis
status"NOT_STARTED" | "IN_PROGRESS" | "UNDER_REVIEW" | "COMPLETED" | "ON_HOLD" | "CANCELLED"Only projects in this state
limitinteger
cursorstringPass the nextCursor of the previous page to get the next one
curl
curl "https://attorly.ai/api/v1/due-diligence/projects?limit=20" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/due-diligence/projectscreateDueDiligenceProject

Vytvorí projekt due diligence.

Oprávnenie:DUE_DILIGENCE_FULL
Telo požiadavky
PoleTypPopis
namepovinnéstring
dealTypepovinné"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
Údaje odpovede (201)
PoleTypPopis
projectIdpovinnéstring
namepovinnéstring
projectTypepovinnéstring
statuspovinnéstring
createdAtpovinnéstringISO 8601 date-time
messagepovinnéstring
curl
curl -X POST "https://attorly.ai/api/v1/due-diligence/projects" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Project Falcon",
  "dealType": "MA_ACQUISITION",
  "targetCompany": "Target AS"
}'
GET/api/v1/due-diligence/projects/{projectId}getDueDiligenceProject

Získanie projektu due diligence s počtom dokumentov a zistení.

Oprávnenie:DUE_DILIGENCE_FULL
Parametre cesty
PoleTypPopis
projectIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
idpovinnéstring
namepovinnéstring
descriptionpovinnéstring | null
projectTypepovinnéstring
statuspovinnéstring
prioritypovinnéstring
targetCompanypovinnéstring | null
dueDatepovinnéstring | null
documentCountpovinnéinteger
findingCountpovinnéinteger
createdAtpovinnéstringISO 8601 date-time
updatedAtpovinnéstringISO 8601 date-time
completedAtpovinnéstring | null
curl
curl "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/due-diligence/projects/{projectId}/documentsaddDueDiligenceDocuments

Pridá dokumenty do projektu due diligence.

Oprávnenie:DUE_DILIGENCE_FULL
Parametre cesty
PoleTypPopis
projectIdpovinnéstring
Telo požiadavky
PoleTypPopis
documentIdspovinnéarray of string
categorystring
Údaje odpovede (200)
PoleTypPopis
projectIdpovinnéstring
documentsAddedpovinnéinteger
totalDocumentspovinnéinteger
categorypovinnéstring
messagepovinnéstring
curl
curl -X POST "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123/documents" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "documentIds": [
    "doc_abc123",
    "doc_def456"
  ]
}'
GET/api/v1/due-diligence/projects/{projectId}/findingslistDueDiligenceFindings

Vypíše zistenia projektu due diligence.

Oprávnenie:DUE_DILIGENCE_FULL
Parametre cesty
PoleTypPopis
projectIdpovinnéstring
Parametre dopytu
PoleTypPopis
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
Údaje odpovede (200)
PoleTypPopis
projectIdpovinnéstring
projectNamepovinnéstring
findingspovinnéarray of object
riskSummarypovinnéobjectNumber of findings per severity
totalFindingspovinnéinteger
pendingProposalspovinnéintegerRisks the AI proposed that wait for a reviewer: not findings, not listed, not in any report
curl
curl "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123/findings?riskLevel=HIGH" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/due-diligence/projects/{projectId}/reportscreateDueDiligenceReport

Vygeneruje správu z due diligence.

Oprávnenie:DUE_DILIGENCE_FULL
Parametre cesty
PoleTypPopis
projectIdpovinnéstring
Telo požiadavky
PoleTypPopis
formatpovinné"pdf" | "markdown""markdown" returns the report text; "pdf" also returns the formatted PDF (base64)
sectionsarray of "executive_summary" | "risk_overview" | "findings_detail" | "document_analysis" | "recommendations"
includeRecommendationsboolean
Údaje odpovede (201)
PoleTypPopis
reportIdpovinnéstring
projectIdpovinnéstring
projectNamestring
formatpovinné"pdf" | "markdown"
statuspovinnéstring
sectionsarray of string
documentCountinteger
findingCountinteger
pendingProposalsintegerRisks the AI proposed that wait for a reviewer when the report was made: left out of it, and counted at its top
markdownpovinnéstring
attachmentobject
messagestring
curl
curl -X POST "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123/reports" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "format": "markdown"
}'

Šablóny a koncepty

GET/api/v1/templateslistTemplates

Vypíše šablóny dokumentov.

Oprávnenie:TEMPLATES_READ
Parametre dopytu
PoleTypPopis
category"NDA" | "EMPLOYMENT" | "SERVICE_AGREEMENT" | "LEASE" | "REAL_ESTATE" | "CORPORATE" | …
jurisdictionstringISO 3166-1 alpha-2 country code (e.g. "NO", "GB"); jurisdiction-neutral templates are always included
languagestringISO 639-1 language code of the template text (e.g. "en", "nb")
limitinteger
cursorstringPass the nextCursor of the previous page to get the next one
curl
curl "https://attorly.ai/api/v1/templates?limit=20" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/draftscreateDraft

Vytvorí koncept zo šablóny (mode template) alebo pomocou AI (mode ai).

Oprávnenie:TEMPLATES_DRAFTČerpá kredity AI

Pole mode v tele vyberá jednu z možností: mode: template, mode: ai.

Telo požiadavky
PoleTypPopis
mode"template" | "ai"Runs templates_draft.
templateIdstring
variablesobject
optionsobject
documentTypestring
requirementsstring
contextobject
curl
curl -X POST "https://attorly.ai/api/v1/drafts" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "template",
  "templateId": "tpl_abc123",
  "variables": {
    "partyA": "Acme AS",
    "partyB": "Beta AB"
  }
}'

Prípady

GET/api/v1/caseslistCases

Vypísať vlastné prípady, od naposledy zmenených.

Oprávnenie:CASES_READ
Parametre dopytu
PoleTypPopis
status"ACTIVE" | "CLOSED" | "ARCHIVED"Only cases in this state; all states when absent
limitinteger
cursorstringPass the nextCursor of the previous page to get the next one
curl
curl "https://attorly.ai/api/v1/cases?status=ACTIVE&limit=20" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/cases/{caseId}/timelinegetCaseTimeline

Získať časovú os prípadu: každú udalosť s dátumom, dôkazmi a stanoviskom druhej strany.

Oprávnenie:CASES_READ
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
casepovinnéobject
eventspovinnéarray of objectIn date order
countpovinnéinteger
needsReviewCountpovinnéintegerEvents an AI added that no person has confirmed
deletionRequestedCountpovinnéintegerEvents waiting for the owner to approve their deletion
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/timeline" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/timeline/eventscreateTimelineEvent

Pridať udalosť na časovú os prípadu.

Oprávnenie:CASES_WRITE
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
Telo požiadavky
PoleTypPopis
titlepovinnéstringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenpovinnéobjectWhen it happened, as precisely as it is known. precision TIME: start "YYYY-MM-DD" and time "HH:MM" (24-hour, in the case's time zone). DAY: start "YYYY-MM-DD". MONTH: start "YYYY-MM". YEAR: start "YYYY". PERIOD: start and end "YYYY-MM-DD", end after start. approximate: true when the date is an estimate; it is then written "c. …".
category"CONTRACT" | "DEADLINE" | "INCIDENT" | "FILING" | "CORRESPONDENCE" | "COURT_DATE" | …What kind of event it is; OTHER when absent
importantbooleanMarks a key event; exports can be limited to key events
agreement"UNMARKED" | "AGREED" | "DISPUTED"Whether the other side agrees that it happened this way: AGREED, DISPUTED, or UNMARKED (not assessed)
opposingVersionstring | nullThe other side's account of a DISPUTED event. Kept only while agreement is DISPUTED
commentstring | nullThe owner's private note. Exports print it only when asked to
confidentialbooleanLeave this event out whenever the timeline is shared or exported
sourcesarray of objectThe case documents that evidence the event, with an optional page or section ("p. 3"). Each documentId must be a document of this case. On update, the list replaces the event's sources
Údaje odpovede (201)
PoleTypPopis
caseIdpovinnéstring
eventpovinnéobject
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/timeline/events" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Landlord gave written notice of termination",
  "when": {
    "precision": "DAY",
    "start": "2026-03-02"
  },
  "category": "CORRESPONDENCE",
  "important": true,
  "agreement": "DISPUTED",
  "opposingVersion": "The landlord says the notice was handed over on 27 February.",
  "sources": [
    {
      "documentId": "doc_abc123",
      "locator": "p. 1"
    }
  ]
}'
PATCH/api/v1/cases/{caseId}/timeline/events/{eventId}updateTimelineEvent

Zmeniť udalosť na časovej osi prípadu alebo potvrdiť udalosť pridanú AI.

Oprávnenie:CASES_WRITE
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
eventIdpovinnéstring
Telo požiadavky
PoleTypPopis
titlestringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenobjectWhen it happened, as precisely as it is known. precision TIME: start "YYYY-MM-DD" and time "HH:MM" (24-hour, in the case's time zone). DAY: start "YYYY-MM-DD". MONTH: start "YYYY-MM". YEAR: start "YYYY". PERIOD: start and end "YYYY-MM-DD", end after start. approximate: true when the date is an estimate; it is then written "c. …".
category"CONTRACT" | "DEADLINE" | "INCIDENT" | "FILING" | "CORRESPONDENCE" | "COURT_DATE" | …What kind of event it is; OTHER when absent
importantbooleanMarks a key event; exports can be limited to key events
agreement"UNMARKED" | "AGREED" | "DISPUTED"Whether the other side agrees that it happened this way: AGREED, DISPUTED, or UNMARKED (not assessed)
opposingVersionstring | nullThe other side's account of a DISPUTED event. Kept only while agreement is DISPUTED
commentstring | nullThe owner's private note. Exports print it only when asked to
confidentialbooleanLeave this event out whenever the timeline is shared or exported
sourcesarray of objectThe case documents that evidence the event, with an optional page or section ("p. 3"). Each documentId must be a document of this case. On update, the list replaces the event's sources
Údaje odpovede (200)
PoleTypPopis
caseIdpovinnéstring
eventpovinnéobject
curl
curl -X PATCH "https://attorly.ai/api/v1/cases/case_abc123/timeline/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
DELETE/api/v1/cases/{caseId}/timeline/events/{eventId}deleteTimelineEvent

Požiadať o vymazanie udalosti z časovej osi prípadu. Udalosť sa vymaže až vtedy, keď ju vlastník schváli v Attorly.

Oprávnenie:CASES_WRITE
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
eventIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
caseIdpovinnéstring
idpovinnéstring
deletedpovinnébooleantrue only when the event is gone
statuspovinné"deleted" | "declined" | "awaiting_approval"deleted: the owner approved and it is gone; declined: the owner said no in their app, nothing was deleted; awaiting_approval: it is marked and waits for the owner to delete or keep it in Attorly
requestedAtstringWhen the deletion was first asked for (awaiting_approval)
urlstringWhere the owner approves or keeps the event in Attorly (awaiting_approval)
curl
curl -X DELETE "https://attorly.ai/api/v1/cases/case_abc123/timeline/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
POST/api/v1/cases/{caseId}/timeline/exportexportCaseTimeline

Exportovať časovú os prípadu ako súbor PDF, Word, ODT, Excel alebo PowerPoint.

Oprávnenie:CASES_READ
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
Telo požiadavky
PoleTypPopis
layoutpovinné"overview" | "chronology" | "numbered" | "visual"overview: date and what happened, for the other party, a complaints board or a lawyer. chronology: numbered table with sources and an exhibit list, for a court. numbered: one numbered paragraph per event with exhibit references, for the facts section of a filing. visual: the time axis on one landscape page
formatpovinné"pdf" | "docx" | "odt" | "xlsx" | "pptx"The file type. overview and chronology: pdf, docx, odt, xlsx or pptx. numbered: pdf, docx or odt. visual: pdf or pptx
optionsobject
localestringLanguage of the file's headings, dates and file name, as a locale Attorly ships (e.g. "en", "nb", "de"); the account's language when absent or not offered
Údaje odpovede (200)
PoleTypPopis
caseIdpovinnéstring
layoutpovinné"overview" | "chronology" | "numbered" | "visual"
formatpovinné"pdf" | "docx" | "odt" | "xlsx" | "pptx"
localepovinnéstringThe language the file is written in
eventCountpovinnéintegerEvents in the file
exhibitCountpovinnéintegerDocuments in the exhibit list (chronology and numbered layouts)
leftOutConfidentialpovinnéintegerEvents left out because they are marked confidential
attachmentpovinnéobject
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/timeline/export" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "layout": "chronology",
  "format": "docx",
  "options": {
    "markAgreement": true
  },
  "locale": "en"
}'
GET/api/v1/cases/{caseId}/deadlineslistCaseDeadlines

Vypísať termíny prípadu od najbližšieho, s tým, čí je ktorý termín a či je splnený, alebo zmeškaný.

Oprávnenie:CASES_READ
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
Parametre dopytu
PoleTypPopis
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
Údaje odpovede (200)
PoleTypPopis
casepovinnéobject
deadlinespovinnéarray of objectSoonest first
countpovinnéinteger
overdueCountpovinnéinteger
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/deadlines?status=open" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/deadlinescreateCaseDeadline

Pridať k prípadu termín so zadaným dátumom, alebo počítaný od zaznamenaného faktu.

Oprávnenie:CASES_WRITE
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
Telo požiadavky
PoleTypPopis
titlepovinnéstringWhat must be done by then, in one line (at most 200 characters)
dueAtstring (date) | string (date-time)The due date. A day "YYYY-MM-DD" is due at the end of that day where the case applies (its country, else the owner's); a moment ("2026-03-02T09:00:00+01:00", a hearing) is kept as given
derivedFromobjectCount the date from a recorded date fact instead of giving dueAt: due = the fact's date + offsetDays days, or + offsetMonths calendar months. The deadline moves with the fact when the fact is corrected. Record the fact first with facts_record
kind"HEARING" | "FILING" | "DISCOVERY" | "STATUTE_OF_LIMITATIONS" | "CUSTOM"What kind of deadline it is; CUSTOM when absent
party"SELF" | "COUNTERPARTY"SELF: the owner must act by then. COUNTERPARTY: a window the other side set; SELF when absent
notesstring | nullA short note shown with the deadline and in its reminders (at most 500 characters), or null to clear it
Údaje odpovede (201)
PoleTypPopis
caseIdpovinnéstring
deadlinepovinnéobject
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/deadlines" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Protest the termination in writing to the landlord",
  "derivedFrom": {
    "factKey": "receivedAt",
    "offsetMonths": 1
  },
  "kind": "FILING",
  "party": "SELF",
  "notes": "Husleieloven § 9-8 (1): one month from receipt"
}'
PATCH/api/v1/cases/{caseId}/deadlines/{deadlineId}updateCaseDeadline

Zmeniť termín prípadu, alebo ho označiť ako splnený či znovu otvorený.

Oprávnenie:CASES_WRITE
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
deadlineIdpovinnéstring
Telo požiadavky
PoleTypPopis
titlestringWhat must be done by then, in one line (at most 200 characters)
dueAtstring (date) | string (date-time)The due date. A day "YYYY-MM-DD" is due at the end of that day where the case applies (its country, else the owner's); a moment ("2026-03-02T09:00:00+01:00", a hearing) is kept as given
derivedFromobjectCount the date from a recorded date fact instead of giving dueAt: due = the fact's date + offsetDays days, or + offsetMonths calendar months. The deadline moves with the fact when the fact is corrected. Record the fact first with facts_record
kind"HEARING" | "FILING" | "DISCOVERY" | "STATUTE_OF_LIMITATIONS" | "CUSTOM"What kind of deadline it is; CUSTOM when absent
party"SELF" | "COUNTERPARTY"SELF: the owner must act by then. COUNTERPARTY: a window the other side set; SELF when absent
notesstring | nullA short note shown with the deadline and in its reminders (at most 500 characters), or null to clear it
completedbooleantrue marks the deadline done; false reopens it
Údaje odpovede (200)
PoleTypPopis
caseIdpovinnéstring
deadlinepovinnéobject
curl
curl -X PATCH "https://attorly.ai/api/v1/cases/case_abc123/deadlines/dl_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
GET/api/v1/cases/{caseId}/factslistCaseFacts

Vypísať fakty zaznamenané pri prípade s ich zdrojom a fakty, ktoré prípad ešte potrebuje.

Oprávnenie:CASES_READ
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
casepovinnéobject
factspovinnéarray of object
countpovinnéinteger
caseReadspovinnéobject | nullThe facts the case's rule reads, under exactly these keys; null when it reads none
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/facts" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/factsrecordCaseFact

Zaznamenať fakt pri prípade, alebo ho opraviť. Termíny počítané od neho sa posunú s ním.

Oprávnenie:CASES_WRITE
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
Telo požiadavky
PoleTypPopis
keypovinnéstringThe fact, as a camelCase key. facts_list names the facts this case reads, with their format; use one of those, or another camelCase key only for a fact none of them covers
valuepovinnéstringThe value, in the format its key takes (a date fact: YYYY-MM-DD). It is stored in canonical form, so the result can differ from what was sent ("Lissabon" becomes LIS)
Údaje odpovede (200)
PoleTypPopis
caseIdpovinnéstring
outcomepovinné"recorded" | "corrected" | "unchanged"recorded: a new fact; corrected: a new value replaced the old one; unchanged: it already held this value
factpovinnéobject
movedDeadlinespovinnéarray of objectOpen deadlines counted from the fact that moved with the correction, due days before and after
urlpovinnéstringWhere the case opens in Attorly
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/facts" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "receivedAt",
  "value": "2026-03-04"
}'
GET/api/v1/cases/{caseId}/partieslistCaseParties

Vypísať strany prípadu a roly, ktoré prípad ponúka.

Oprávnenie:CASES_READ
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
casepovinnéobject
partiespovinnéarray of object
countpovinnéinteger
rolespovinnéarray of objectThe roles the case offers; empty when it has no case type with roles
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/parties" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/partiescreateCaseParty

Pridať k prípadu stranu v jednej z jeho rolí.

Oprávnenie:CASES_WRITE
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
Telo požiadavky
PoleTypPopis
roleKeypovinnéstringThe role the party has in the case, as one of the roles parties_list returns (e.g. "landlord")
partyTypepovinné"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
namepovinnéstringThe party's name (at most 200 characters)
isSelfbooleantrue when this party is the person the connection acts for; false removes that link
orgNumberstringOrganisation number of an ENTITY
personalIdNumberstringNational identity number of a PERSON. Add it only when the owner gave it for this case
emailstring (email)E-mail address
phonestringPhone number
addressstringPostal address
representedBystringThe lawyer or representative acting for the party
notesstringThe owner's note about the party (at most 1000 characters)
positionintegerOrder within its role, 0 first
Údaje odpovede (201)
PoleTypPopis
caseIdpovinnéstring
partypovinnéobject
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/parties" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "roleKey": "landlord",
  "partyType": "ENTITY",
  "name": "Fjord Eiendom AS",
  "orgNumber": "999999999",
  "email": "[email protected]"
}'
PATCH/api/v1/cases/{caseId}/parties/{partyId}updateCaseParty

Zmeniť údaje strany prípadu.

Oprávnenie:CASES_WRITE
Parametre cesty
PoleTypPopis
caseIdpovinnéstring
partyIdpovinnéstring
Telo požiadavky
PoleTypPopis
partyType"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
namestringThe party's name (at most 200 characters)
isSelfbooleantrue when this party is the person the connection acts for; false removes that link
orgNumberstring | null
personalIdNumberstring | null
emailstring (email) | null
phonestring | null
addressstring | null
representedBystring | null
notesstring | null
positionintegerOrder within its role, 0 first
Údaje odpovede (200)
PoleTypPopis
caseIdpovinnéstring
partypovinnéobject
curl
curl -X PATCH "https://attorly.ai/api/v1/cases/case_abc123/parties/party_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Operácie

GET/api/v1/operations/{operationId}getOperation

Získať stav a výsledok požiadavky odoslanej s Prefer alebo Idempotency-Key.

Parametre cesty
PoleTypPopis
operationIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
idpovinnéstringop_…
objectpovinné"operation"
operationIdpovinnéstringThe REST operation that was called, e.g. createRedlines
statuspovinné"running" | "awaiting_approval" | "succeeded" | "failed"
livemodepovinnéboolean
idempotencyKeystring | null
resultUrlpovinnéstringWhere to poll: /api/v1/operations/{id}
createdAtpovinnéstring (date-time)
completedAtpovinnéstring (date-time) | null
expiresAtpovinnéstring (date-time)
httpStatuspovinnéinteger | null
resultpovinnéanyThe data of the successful call
metaobject
errorpovinnéobject | null
curl
curl "https://attorly.ai/api/v1/operations/op_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Webhooky

GET/api/v1/webhook-endpointslistWebhookEndpoints

Zoznam endpointov webhookov organizácie a režimu kľúča.

curl
curl "https://attorly.ai/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/webhook-endpointscreateWebhookEndpoint

Vytvorenie endpointu webhooku. Odpoveď obsahuje podpisové tajomstvo, zobrazené len raz.

Telo požiadavky
PoleTypPopis
urlpovinnéstring (uri)HTTPS URL that receives the events
descriptionstring
enabledEventspovinnéarray of stringEvent types to receive, or ["*"] for all
includeSnapshotsbooleanSend object snapshots instead of thin { id, object } payloads, for operations made with organization API keys (calls made with personal keys and connected apps always send thin payloads). Organization owners and admins only.
Údaje odpovede (201)
PoleTypPopis
idpovinnéstringwe_…
objectpovinné"webhook_endpoint"
urlpovinnéstring
descriptionstring | null
enabledEventspovinnéarray of string
statuspovinné"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodepovinnéboolean
includeSnapshotspovinnéboolean
apiVersionpovinnéstring
failingSincestring (date-time) | null
createdAtpovinnéstring (date-time)
updatedAtpovinnéstring (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl -X POST "https://attorly.ai/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/attorly/webhooks",
  "description": "Production receiver",
  "enabledEvents": [
    "analysis.completed",
    "operation.succeeded",
    "operation.failed"
  ]
}'
GET/api/v1/webhook-endpoints/{endpointId}getWebhookEndpoint

Získanie endpointu webhooku.

Parametre cesty
PoleTypPopis
endpointIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
idpovinnéstringwe_…
objectpovinné"webhook_endpoint"
urlpovinnéstring
descriptionstring | null
enabledEventspovinnéarray of string
statuspovinné"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodepovinnéboolean
includeSnapshotspovinnéboolean
apiVersionpovinnéstring
failingSincestring (date-time) | null
createdAtpovinnéstring (date-time)
updatedAtpovinnéstring (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
PATCH/api/v1/webhook-endpoints/{endpointId}updateWebhookEndpoint

Zmena URL, udalostí alebo snímok endpointu, prípadne jeho vypnutie a zapnutie.

Parametre cesty
PoleTypPopis
endpointIdpovinnéstring
Telo požiadavky
PoleTypPopis
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
Údaje odpovede (200)
PoleTypPopis
idpovinnéstringwe_…
objectpovinné"webhook_endpoint"
urlpovinnéstring
descriptionstring | null
enabledEventspovinnéarray of string
statuspovinné"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodepovinnéboolean
includeSnapshotspovinnéboolean
apiVersionpovinnéstring
failingSincestring (date-time) | null
createdAtpovinnéstring (date-time)
updatedAtpovinnéstring (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl -X PATCH "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
DELETE/api/v1/webhook-endpoints/{endpointId}deleteWebhookEndpoint

Zmazanie endpointu webhooku a histórie jeho doručení.

Parametre cesty
PoleTypPopis
endpointIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
idpovinnéstring
objectpovinné"webhook_endpoint"
deletedpovinnétrue
curl
curl -X DELETE "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
POST/api/v1/webhook-endpoints/{endpointId}/secret-rollsrollWebhookEndpointSecret

Výmena podpisového tajomstva. Staré podpisuje ešte 24 hodín.

Parametre cesty
PoleTypPopis
endpointIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
idpovinnéstringwe_…
objectpovinné"webhook_endpoint"
urlpovinnéstring
descriptionstring | null
enabledEventspovinnéarray of string
statuspovinné"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodepovinnéboolean
includeSnapshotspovinnéboolean
apiVersionpovinnéstring
failingSincestring (date-time) | null
createdAtpovinnéstring (date-time)
updatedAtpovinnéstring (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl -X POST "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId/secret-rolls" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
POST/api/v1/webhook-endpoints/{endpointId}/test-eventssendWebhookTestEvent

Odoslanie udalosti webhook_endpoint.test len na tento endpoint.

Parametre cesty
PoleTypPopis
endpointIdpovinnéstring
Údaje odpovede (202)
PoleTypPopis
eventIdpovinnéstring
curl
curl -X POST "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId/test-events" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
GET/api/v1/webhook-endpoints/{endpointId}/deliverieslistWebhookDeliveries

Zoznam doručení endpointu, od najnovšieho, s pokusmi a výsledkom.

Parametre cesty
PoleTypPopis
endpointIdpovinnéstring
Parametre dopytu
PoleTypPopis
limitintegerItems per page, 1–100 (default 20)
cursorstringThe nextCursor of the previous page
status"pending" | "succeeded" | "failed"Only deliveries in this state
curl
curl "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId/deliveries" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Udalosti

GET/api/v1/eventslistEvents

Zoznam udalostí za posledných 30 dní, od najnovšej.

Parametre dopytu
PoleTypPopis
limitintegerItems per page, 1–100 (default 20)
cursorstringThe nextCursor of the previous page
typestringOnly events of this type, e.g. analysis.completed
curl
curl "https://attorly.ai/api/v1/events" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/events/{eventId}getEvent

Získanie udalosti tak, ako ju prijímajú endpointy webhookov.

Parametre cesty
PoleTypPopis
eventIdpovinnéstring
Údaje odpovede (200)
PoleTypPopis
idpovinnéstringevt_… — also sent as the webhook-id header; deduplicate on it
objectpovinné"event"
typepovinné"analysis.completed" | "analysis.failed" | "redlines.generated" | "due_diligence.report.completed" | "operation.succeeded" | "operation.failed" | …
apiVersionpovinnéstring
createdAtpovinnéstring (date-time)
livemodepovinnéboolean
datapovinnéobject
curl
curl "https://attorly.ai/api/v1/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/events/{eventId}/redeliveriesredeliverEvent

Opätovné odoslanie udalosti, na jeden endpoint alebo na všetky, ktoré ju odoberajú.

Parametre cesty
PoleTypPopis
eventIdpovinnéstring
Telo požiadavky
PoleTypPopis
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
Údaje odpovede (202)
PoleTypPopis
eventIdpovinnéstring
deliveriesScheduledpovinnéinteger
curl
curl -X POST "https://attorly.ai/api/v1/events/your_eventId/redeliveries" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "endpointId": "we_abc123"
}'

Účet, využitie a záznamy

GET/api/v1/organizationgetOrganization

Organizácia kľúča: plán, AI kredity, predvolená jurisdikcia a čo kľúč smie robiť.

Údaje odpovede (200)
PoleTypPopis
organizationpovinnéobject
userpovinnéobject
planpovinnéstringSTANDARD, PRO or ENTERPRISE
billingpovinnéobject
defaultJurisdictionpovinnéstring | nullISO 3166-1 alpha-2 country used when a document names no governing law
credentialpovinnéobject
appUrlpovinnéstring
curl
curl "https://attorly.ai/api/v1/organization" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/usagegetUsage

Požiadavky za deň, kľúč a operáciu s počtom chýb, cez REST aj MCP.

Parametre dopytu
PoleTypPopis
fromanyISO 8601 date; default 30 days ago (requests are kept 30 days)
toanyISO 8601 date, exclusive; default now
curl
curl "https://attorly.ai/api/v1/usage" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/request-logslistRequestLogs

Zoznam požiadaviek API organizácie za posledných 30 dní, od najnovšej.

Parametre dopytu
PoleTypPopis
limitintegerItems per page, 1–100 (default 20)
cursorstringThe nextCursor of the previous page
statusstring2xx, 4xx, 5xx, or an exact status
credentialIdstringOnly requests made with this key (apikey:<id>, or an MCP connection id)
operationIdstringOnly calls of this operation, e.g. createRedlines
requestIdstringOne request, by its Request-Id
sinceanyISO 8601; only requests at or after this time
untilanyISO 8601; only requests before this time
curl
curl "https://attorly.ai/api/v1/request-logs" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/audit-eventslistAuditEvents

Kto čo volal, kedy a akým kľúčom. Pre vlastníkov a správcov organizácie.

Parametre dopytu
PoleTypPopis
limitintegerItems per page, 1–100 (default 20)
cursorstringThe nextCursor of the previous page
statusstring2xx, 4xx, 5xx, or an exact status
credentialIdstringOnly requests made with this key (apikey:<id>, or an MCP connection id)
operationIdstringOnly calls of this operation, e.g. createRedlines
requestIdstringOne request, by its Request-Id
sinceanyISO 8601; only requests at or after this time
untilanyISO 8601; only requests before this time
curl
curl "https://attorly.ai/api/v1/audit-events" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
DELETE/api/v1/test-datadeleteTestData

Zmazanie všetkých objektov, udalostí a operácií testovacieho režimu organizácie. Len testovacie kľúče.

Údaje odpovede (200)
PoleTypPopis
objectpovinné"test_data_purge"
deletedpovinnéobject
curl
curl -X DELETE "https://attorly.ai/api/v1/test-data" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"