Přeskočit na hlavní obsah

Vývojáři

Dokumentace REST API

API s JSON přes HTTPS pro právní AI Attorly. Provádí stejné operace jako server MCP, se stejnými klíči, oprávněními, limity i účtováním.

Rychlý start

Nahrajte smlouvu a analyzujte ji ve čtyřech krocích.

  1. 1. Vytvořte klíč

    Vytvořte klíč v Nastavení › Vývojáři a vyberte REST API. Stejný klíč funguje pro server MCP. Uložte ho do proměnné prostředí:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Nahrajte dokument

    Pošlete soubor jako multipart/form-data. data.id v odpovědi je identifikátor dokumentu. analyze=false ho uloží bez spuštění analýzy na pozadí, protože další 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 čeká na výsledek až 30 sekund. Dokončená analýza se vrátí jako 200 s výsledkem v data. Pokud trvá déle, dostanete 202 Accepted s hlavičkou Location, která ukazuje na operaci.

    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. Vyzvedněte výsledek

    Dotazujte se na operaci, dokud není její stav succeeded nebo failed. Analýza je v result. Retry-After udává, kolik sekund čekat mezi dotazy.

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

Ověřování

Pošlete přihlašovací údaj v hlavičce Authorization jako token Bearer. Klíče z Nastavení › Vývojáři začínají lbmcp_ a fungují v tarifech Pro a Enterprise pro REST API i MCP server. Klíče organizace v Enterprise začínají atly_ (atly_rk_ pro omezené klíče, atly_test_ pro testovací režim); starší klíče lb_ fungují dál. Aplikace jednající za osobu používají OAuth.

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

Oprávnění (scopes)

Každý endpoint vyžaduje oprávnění uvedená vedle něj. Klíč bez nich dostane 403 insufficient_scope a requiredScopes v chybě vypíše všechna oprávnění, která volání potřebuje. Klíče API organizace a OAuth používají tyto názvy:

OprávněníOprávnění API klíče organizace
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á stejný tvar: stálý kód pro logiku programu, zprávu pro lidi a requestId pro 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 i s postupem vysvětlen na stránce chybových kódů

Verze

API je verzováno daty. Pošlete Attorly-Version a vyberete verzi pro jeden požadavek; bez ní se použije verze, se kterou byl klíč vytvořen (klíče z doby před verzováním používají 2026-10-01). Každá odpověď uvádí, která verze odpověděla. Nekompatibilní změny přicházejí jen v nové verzi a seznam změn je uvádí.

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_…

Idempotence

U požadavků POST, PATCH a DELETE posílejte hlavičku Idempotency-Key, například UUID. Opakovaný pokus se stejným klíčem a stejným požadavkem dostane první odpověď s Idempotent-Replayed: true a práce se znovu nespustí ani nezaúčtuje. Klíč znovu použitý pro jiný požadavek dostane 422 idempotency_key_reused, klíč, který ještě běží, dostane 409 nebo u dlouhého volání stejnou operaci. Chyby serveru se neukládají, takže jejich opakování proběhne znovu. Klíče se uchovávají 24 hodin.

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

Dlouhotrvající požadavky

Od verze 2026-11-01 odpovídají úplné analýzy, redliny, vyjednávací plány, workflow, zprávy due diligence a návrhy AI okamžitě 202 Accepted s operací. Pošlete Prefer: wait=30 a nejdřív se počká až 30 sekund (nejvýše 60) na výsledek, nebo Prefer: respond-async a dostanete 202 u jakéhokoli zápisu. Dotazujte se na Location, dokud není stav succeeded nebo failed, nebo se přihlaste k odběru operation.succeeded. Výsledky se uchovávají 24 hodin. Organizace může současně spouštět nejvýše 5 dlouhých operací AI; další dostanou 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ánkování

Seznamy vracejí { object: "list", data, hasMore, nextCursor } a přijímají limit (1 až 100, výchozí 20) a cursor. Další stránku získáte, když pošlete nextCursor jako cursor. Na poslední stránce je nextCursor null. Kurzor zůstává platný, i když přibudou 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žadavků

Požadavek se počítá do několika oken: hodinový limit klíče, 300 za minutu na osobu, 600 za minutu na organizaci, minutový limit na klíč pro čtení, zápisy a volání AI a vlastní limit každé operace. REST a MCP sdílejí stejná počítadla. Hlavičky RateLimit-Policy a RateLimit ukazují všechna okna; X-RateLimit-* ukazuje to, které je nejblíž vyčerpání. Nad limitem 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

Vytvořte endpoint pomocí POST /api/v1/webhook-endpoints a dostanete zprávu, když práce skončí, místo dotazování. Attorly pošle POST s událostí JSON podepsanou podle Standard Webhooks tajemstvím whsec_ endpointu. Ověřte podpis dřív, než obsahu uvěříte, odpovězte 2xx do 15 sekund a odstraňujte duplicity podle webhook-id: neúspěšná doručení se opakují 72 hodin. Tajemství můžete obnovit, poslat testovací událost a prohlédnout si každé doručení.

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

Testovací klíče (atly_test_…) dosáhnou na každý endpoint, ale pracují s oddělenými testovacími daty a vracejí pevné ukázkové výsledky: neběží žádná AI a nespotřebovávají se kredity. Testovací klíč nikdy nevidí skutečná data. Vložte do libovolného textového pole magickou hodnotu jako __fail_credits__, __fail_consent__ nebo __slow__ a dostanete danou chybu nebo zpoždění. DELETE /api/v1/test-data smaže vše, co testovací klíče vytvořily.

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

Aplikace jednající za uživatele Attorly se přihlašují přes OAuth 2.1: zjišťování na /.well-known/oauth-authorization-server, dynamická registrace klientů a tok autorizačního kódu s PKCE (S256). Požádejte o resource=https://attorly.ai/api/v1 a získáte token pro REST API; token vydaný pro MCP server se zde odmítne. Přidejte offline_access a dostanete obnovovací token. Osoba vybere organizaci a na obrazovce souhlasu může oprávnění zúžit.

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

Účtování

Operace s AI čerpají stejné AI kredity jako aplikace Attorly, z peněženky vlastníka klíče nebo jeho organizace, ať je voláte přes REST, nebo MCP. Když kredity dojdou, dostanete 402 insufficient_credits. Volání v testovacím režimu jsou zdarma.

Plány

API je součástí plánů Pro a Enterprise. Pokud plán vlastníka klíče už přístup k API nezahrnuje nebo vlastník opustil organizaci, požadavky jsou odmítnuty s kódem 403.

Reference

Každá operace, vygenerovaná z dokumentu OpenAPI, který poskytuje samo API. Cesty jsou relativní k https://attorly.ai. Úspěšné odpovědi obalují výsledek do data. Popisy polí jsou v angličtině.

Dokumenty

GET/api/v1/documentslistDocuments

Vypsat uložené dokumenty, které klíč může číst, od nejnovějších.

Oprávnění:DOCUMENTS_READ
Parametry dotazu
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

Nahrát dokument jako multipart/form-data nebo jako JSON s obsahem v base64 či prostým textem. Na pozadí se analyzuje, pokud analyze není false.

Oprávnění:DOCUMENTS_WRITEČerpá kredity AIPřijímá nahrávání souborů
Tělo požadavku
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
Data odpovědi (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

Vyhledávání v textu dokumentů, které klíč smí číst, podle významu i přesných slov.

Oprávnění:DOCUMENTS_READ
Parametry dotazu
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ískat dokument, stav jeho zpracování a nejnovější analýzu.

Oprávnění:DOCUMENTS_READ
Parametry cesty
PoleTypPopis
documentIdpovinnéstring
Data odpovědi (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žádat o smazání dokumentu, který vlastníte. Dokument se smaže, až když smazání schválíte v Attorly.

Oprávnění:DOCUMENTS_DELETE
Parametry cesty
PoleTypPopis
documentIdpovinnéstring
Data odpovědi (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

Analyzovat dokument nebo text vložený v požadavku. mode je full (uložený dokument) nebo quick.

Oprávnění:DOCUMENTS_ANALYZEDOCUMENTS_READČerpá kredity AI

Pole mode v těle vybírá jednu z možností: mode: full, mode: quick.

Tělo požadavku
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

Seznam uložených analýz dokumentu, od nejnovější.

Oprávnění:DOCUMENTS_READ
Parametry cesty
PoleTypPopis
documentIdpovinnéstring
Parametry dotazu
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

Analyzovat uložený dokument.

Oprávnění:DOCUMENTS_ANALYZEDOCUMENTS_READČerpá kredity AI
Parametry cesty
PoleTypPopis
documentIdpovinnéstring

Pole mode v těle vybírá jednu z možností: mode: full, mode: quick.

Tělo požadavku
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

Extrahovat prostý text z uloženého dokumentu PDF nebo DOCX.

Oprávnění:DOCUMENTS_READ
Parametry cesty
PoleTypPopis
documentIdpovinnéstring
Parametry dotazu
PoleTypPopis
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
Data odpovědi (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ískání uložené analýzy: shrnutí, riziko, klíčové podmínky, klauzule a doporučení.

Oprávnění:DOCUMENTS_READ
Parametry cesty
PoleTypPopis
analysisIdpovinnéstring
Data odpovědi (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

Porovnat dva dokumenty nebo texty řádek po řádku.

Oprávnění:DOCUMENTS_READ
Tělo požadavku
PoleTypPopis
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
Data odpovědi (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"
}'

Ustanovení

GET/api/v1/clausessearchClauses

Prohledat knihovnu ustanovení.

Oprávnění:CLAUSES_READ
Parametry dotazu
PoleTypPopis
querypovinnéstring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
Data odpovědi (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

Posoudit riziko ustanovení.

Oprávnění:CLAUSES_READ
Tělo požadavku
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" | …
Data odpovědi (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

Porovnat ustanovení s formulacemi obvyklými na trhu.

Oprávnění:CLAUSES_READ
Tělo požadavku
PoleTypPopis
clauseTextpovinnéstring
categorypovinné"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
Data odpovědi (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

Zkontrolovat ustanovení podle playbooku.

Oprávnění:CLAUSES_READ
Tělo požadavku
PoleTypPopis
clauseTextpovinnéstring
playbookIdpovinnéstring
Data odpovědi (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"
}'

Rešerše

POST/api/v1/research/searchessearchResearch

Prohledat právní zdroje, jako jsou Lovdata, EUR-Lex a CourtListener.

Oprávnění:RESEARCH_READČerpá kredity AI
Tělo požadavku
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
Data odpovědi (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

Vyhledat předpis podle citace.

Oprávnění:RESEARCH_READČerpá kredity AI
Parametry dotazu
PoleTypPopis
citationpovinnéstring
jurisdictionpovinnéstringISO 3166-1 alpha-2 country code, or "EU"
Data odpovědi (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 změn

POST/api/v1/redlinescreateRedlines

Vygenerovat návrhy změn pro dokument nebo text.

Oprávnění:REDLINES_GENERATEČerpá kredity AI
Tělo požadavku
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
Data odpovědi (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

Přijmout nebo odmítnout změny v dokumentu.

Oprávnění:REDLINES_GENERATE
Parametry cesty
PoleTypPopis
documentIdpovinnéstring
Tělo požadavku
PoleTypPopis
changespovinnéarray of object
Data odpovědi (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"
    }
  ]
}'

Vyjednávání

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

Analyzovat vyjednávací pozici.

Oprávnění:NEGOTIATIONS_READČerpá kredity AI
Tělo požadavku
PoleTypPopis
documentIdstring
contentstring
partyRolepovinné"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
Data odpovědi (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

Sestavit vyjednávací playbook ze strategie.

Oprávnění:NEGOTIATIONS_READČerpá kredity AI
Tělo požadavku
PoleTypPopis
strategypovinnéobject
contextobject
Data odpovědi (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

Vypsat šablony pracovních postupů.

Oprávnění:WORKFLOWS_EXECUTE
Parametry dotazu
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

Seznam běhů workflow, od nejnovějšího, volitelně pro jeden projekt nebo stav.

Oprávnění:WORKFLOWS_EXECUTE
Parametry dotazu
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

Spustit pracovní postup na projektu due diligence.

Oprávnění:WORKFLOWS_EXECUTEČerpá kredity AI
Tělo požadavku
PoleTypPopis
templateIdpovinnéstring
projectIdpovinnéstring
inputspovinnéobject
optionsobject
Data odpovědi (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

Zjistit stav běhu pracovního postupu.

Oprávnění:WORKFLOWS_EXECUTE
Parametry cesty
PoleTypPopis
executionIdpovinnéstring
Parametry dotazu
PoleTypPopis
includeStepsboolean
Data odpovědi (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

Seznam projektů due diligence, od nejnovějšího.

Oprávnění:DUE_DILIGENCE_FULL
Parametry dotazu
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

Vytvořit projekt due diligence.

Oprávnění:DUE_DILIGENCE_FULL
Tělo požadavku
PoleTypPopis
namepovinnéstring
dealTypepovinné"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
Data odpovědi (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ískání projektu due diligence s počtem dokumentů a zjištění.

Oprávnění:DUE_DILIGENCE_FULL
Parametry cesty
PoleTypPopis
projectIdpovinnéstring
Data odpovědi (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

Přidat dokumenty do projektu due diligence.

Oprávnění:DUE_DILIGENCE_FULL
Parametry cesty
PoleTypPopis
projectIdpovinnéstring
Tělo požadavku
PoleTypPopis
documentIdspovinnéarray of string
categorystring
Data odpovědi (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

Vypsat zjištění projektu due diligence.

Oprávnění:DUE_DILIGENCE_FULL
Parametry cesty
PoleTypPopis
projectIdpovinnéstring
Parametry dotazu
PoleTypPopis
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
Data odpovědi (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

Vygenerovat zprávu due diligence.

Oprávnění:DUE_DILIGENCE_FULL
Parametry cesty
PoleTypPopis
projectIdpovinnéstring
Tělo požadavku
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
Data odpovědi (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"
}'

Šablony a koncepty

GET/api/v1/templateslistTemplates

Vypsat šablony dokumentů.

Oprávnění:TEMPLATES_READ
Parametry dotazu
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

Vytvořit koncept ze šablony (mode template) nebo pomocí AI (mode ai).

Oprávnění:TEMPLATES_DRAFTČerpá kredity AI

Pole mode v těle vybírá jednu z možností: mode: template, mode: ai.

Tělo požadavku
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"
  }
}'

Případy

GET/api/v1/caseslistCases

Vypsat vlastní případy, od naposledy změněných.

Oprávnění:CASES_READ
Parametry dotazu
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ískat časovou osu případu: každou událost s datem, důkazy a stanoviskem druhé strany.

Oprávnění:CASES_READ
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
Data odpovědi (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

Přidat událost na časovou osu případu.

Oprávnění:CASES_WRITE
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
Tělo požadavku
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
Data odpovědi (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

Změnit událost na časové ose případu, nebo potvrdit událost přidanou AI.

Oprávnění:CASES_WRITE
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
eventIdpovinnéstring
Tělo požadavku
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
Data odpovědi (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žádat o smazání události z časové osy případu. Událost se smaže, až když ji vlastník schválí v Attorly.

Oprávnění:CASES_WRITE
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
eventIdpovinnéstring
Data odpovědi (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

Exportovat časovou osu případu jako soubor PDF, Word, ODT, Excel nebo PowerPoint.

Oprávnění:CASES_READ
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
Tělo požadavku
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
Data odpovědi (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

Vypsat lhůty případu od nejbližší, s tím, čí je která lhůta a zda je splněná, nebo zmeškaná.

Oprávnění:CASES_READ
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
Parametry dotazu
PoleTypPopis
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
Data odpovědi (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

Přidat k případu lhůtu se zadaným datem, nebo počítanou od zaznamenaného faktu.

Oprávnění:CASES_WRITE
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
Tělo požadavku
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
Data odpovědi (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

Změnit lhůtu případu, nebo ji označit jako splněnou či znovu otevřenou.

Oprávnění:CASES_WRITE
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
deadlineIdpovinnéstring
Tělo požadavku
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
Data odpovědi (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

Vypsat fakta zaznamenaná u případu s jejich zdrojem a fakta, která případ ještě potřebuje.

Oprávnění:CASES_READ
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
Data odpovědi (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

Zaznamenat fakt u případu, nebo ho opravit. Lhůty počítané od něj se posunou s ním.

Oprávnění:CASES_WRITE
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
Tělo požadavku
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)
Data odpovědi (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

Vypsat strany případu a role, které případ nabízí.

Oprávnění:CASES_READ
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
Data odpovědi (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

Přidat k případu stranu v jedné z jeho rolí.

Oprávnění:CASES_WRITE
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
Tělo požadavku
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
Data odpovědi (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

Změnit údaje strany případu.

Oprávnění:CASES_WRITE
Parametry cesty
PoleTypPopis
caseIdpovinnéstring
partyIdpovinnéstring
Tělo požadavku
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
Data odpovědi (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)"

Operace

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

Získat stav a výsledek požadavku odeslaného s Prefer nebo Idempotency-Key.

Parametry cesty
PoleTypPopis
operationIdpovinnéstring
Data odpovědi (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

Seznam endpointů webhooků organizace a režimu klíče.

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

Vytvoření endpointu webhooku. Odpověď obsahuje podpisové tajemství, zobrazené jen jednou.

Tělo požadavku
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.
Data odpovědi (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ískání endpointu webhooku.

Parametry cesty
PoleTypPopis
endpointIdpovinnéstring
Data odpovědi (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

Změna URL, událostí nebo snímků endpointu, případně jeho vypnutí a zapnutí.

Parametry cesty
PoleTypPopis
endpointIdpovinnéstring
Tělo požadavku
PoleTypPopis
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
Data odpovědi (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

Smazání endpointu webhooku a historie jeho doručení.

Parametry cesty
PoleTypPopis
endpointIdpovinnéstring
Data odpovědi (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ýměna podpisového tajemství. Staré podepisuje ještě 24 hodin.

Parametry cesty
PoleTypPopis
endpointIdpovinnéstring
Data odpovědi (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

Odeslání události webhook_endpoint.test jen na tento endpoint.

Parametry cesty
PoleTypPopis
endpointIdpovinnéstring
Data odpovědi (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

Seznam doručení endpointu, od nejnovějšího, s pokusy a výsledkem.

Parametry cesty
PoleTypPopis
endpointIdpovinnéstring
Parametry dotazu
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"

Události

GET/api/v1/eventslistEvents

Seznam událostí za posledních 30 dní, od nejnovější.

Parametry dotazu
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ískání události tak, jak ji přijímají endpointy webhooků.

Parametry cesty
PoleTypPopis
eventIdpovinnéstring
Data odpovědi (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é odeslání události, na jeden endpoint nebo na všechny, které ji odebírají.

Parametry cesty
PoleTypPopis
eventIdpovinnéstring
Tělo požadavku
PoleTypPopis
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
Data odpovědi (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žití a protokoly

GET/api/v1/organizationgetOrganization

Organizace klíče: tarif, AI kredity, výchozí jurisdikce a co klíč smí dělat.

Data odpovědi (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žadavky za den, klíč a operaci s počtem chyb, přes REST i MCP.

Parametry dotazu
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

Seznam požadavků API organizace za posledních 30 dní, od nejnovějšího.

Parametry dotazu
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

Kdo co volal, kdy a jakým klíčem. Pro vlastníky a správce organizace.

Parametry dotazu
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

Smazání všech objektů, událostí a operací testovacího režimu organizace. Jen testovací klíče.

Data odpovědi (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)"