Direkt bei den Haaptinhalt

Entwéckler

REST-API-Dokumentatioun

Eng JSON-iwwer-HTTPS-API fir d'juristesch KI vun Attorly. Si féiert déiselwecht Operatiounen aus wéi den MCP-Server, mat deene selwechte Schlësselen, Scopes, Limitten a mat der selwechter Ofrechnung.

Séieren Ufank

E Kontrakt a véier Schrëtt eroplueden an analyséieren.

  1. 1. Schlëssel uleeën

    Leet ënner Astellungen › Entwéckler e Schlëssel un a wielt REST-API. Dee selwechte Schlëssel funktionéiert fir den MCP-Server. Späichert en an enger Ëmfeldvariabel:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Dokument eroplueden

    Schéckt de Fichier als multipart/form-data. D'data.id vun der Äntwert ass d'ID vum Dokument. analyze=false späichert en, ouni d'Analyse am Hannergrond ze starten, well den nächste Schrëtt eng ausféiert.

    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. Analyséieren

    Prefer: wait=30 waart bis zu 30 Sekonnen op d'Resultat. Eng fäerdeg Analyse kënnt als 200 mam Resultat an data zréck. Wann et méi laang dauert, kritt Dir 202 Accepted mat engem Location-Header, deen op d'Operatioun weist.

    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. D'Resultat ofruffen

    Frot d'Operatioun reegelméisseg of, bis hire Status succeeded oder failed ass. D'Analyse steet am result. Retry-After seet, wéi vill Sekonnen Dir tëscht zwou Ufroe waarde sollt.

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

Authentifizéierung

Schéckt en Zougangsschlëssel am Authorization-Header als Bearer-Token. Schlësselen aus Astellungen › Entwéckler fänke mat lbmcp_ un a funktionéieren op Pro an Enterprise, fir d'REST-API an den MCP-Server gläichermoossen. Organisatiounsschlëssele vun Enterprise fänke mat atly_ un (atly_rk_ fir limitéiert Schlësselen, atly_test_ fir den Testmodus); méi al lb_-Schlëssele funktionéieren nach ëmmer. Apps, déi fir eng Persoun handelen, benotzen OAuth.

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

Berechtegungen (Scopes)

All Endpunkt brauch d'Scopes, déi dernieft opgelëscht sinn. E Schlëssel ouni dës kritt 403 insufficient_scope, a requiredScopes am Feeler lëscht all Scope op, deen den Opruff brauch. Organisatiouns-API-Schlësselen an OAuth benotzen dës Scope-Nimm:

BerechtegungScope vum Organisatiouns-API-Schlëssel
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

Feeler

All Feeler huet déiselwecht Form: e stabile code, op deen Dir reagéiere kënnt, eng message fir Mënschen an eng requestId, déi Dir beim Support uginn.

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"
  }
}

All Code gëtt, mat deem, wat Dir maache kënnt, erkläert op der Säit mat de Feelercoden

Versionéierung

D'API ass no Datum versionéiert. Schéckt Attorly-Version, fir eng Versioun fir eng eenzel Ufro ze wielen; ouni dat benotzt eng Ufro d'Versioun, mat där hire Schlëssel ugeluecht gouf (Schlësselen, déi virun der Versionéierung ugeluecht goufen, benotzen 2026-10-01). All Äntwert seet, wéi eng Versioun geäntwert huet. Inkompatibel Ännerunge kommen nëmmen an enger neier Versioun, an de Changelog lëscht se op.

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

Idempotenz

Schéckt bei POST-, PATCH- an DELETE-Ufroen en Idempotency-Key-Header, zum Beispill eng UUID. En neie Versuch mam selwechte Schlëssel an der selwechter Ufro kritt déi éischt Äntwert mat Idempotent-Replayed: true zréck, an d'Aarbecht gëtt net nach eng Kéier ausgefouert oder ofgerechent. E Schlëssel, dee fir eng aner Ufro erëmbenotzt gëtt, kritt 422 idempotency_key_reused, an een, deen nach leeft, kritt 409 oder, bei engem laangen Opruff, déiselwecht Operatioun. Serverfeeler ginn net gespäichert, dofir gëtt hiren neie Versuch nach eng Kéier ausgefouert. Schlëssele ginn 24 Stonnen opgehuewen.

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

Laang Ufroen

Ab der Versioun 2026-11-01 äntwere komplett Analysen, Redlines, Verhandlungs-Playbooks, Workflowen, Due-Diligence-Rapporten a KI-Entwërf direkt mat 202 Accepted an enger Operatioun. Schéckt Prefer: wait=30, fir fir d'éischt bis zu 30 Sekonnen (héchstens 60) op d'Resultat ze waarden, oder Prefer: respond-async, fir bei all Schreifoperatioun 202 unzefroen. Frot d'Location reegelméisseg of, bis de Status succeeded oder failed ass, oder abonnéiert operation.succeeded. Resultater ginn 24 Stonnen opgehuewen. Pro Organisatioun lafen héchstens 5 laang KI-Operatioune gläichzäiteg; weider kréien 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", … } }

Paginéierung

Lëschte ginn { object: "list", data, hasMore, nextCursor } zréck an huele limit (1 bis 100, Standard 20) a cursor. Fir déi nächst Säit ze kréien, schéckt nextCursor als cursor. Op der leschter Säit ass nextCursor null. Cursore bleiwe gëlteg, während nei Elementer derbäikommen.

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…

Rate-Limitten

Eng Ufro zielt fir e puer Zäitfënsteren: d'Stonnelimitt vum Schlëssel, 300 pro Minutt a pro Persoun, 600 pro Minutt a pro Organisatioun, eng Limitt pro Minutt a pro Schlëssel fir Liesen, Schreiwen a KI-Opriff, an déi eege Limitt vun all Operatioun. REST an MCP deelen déiselwecht Zieler. D'Header RateLimit-Policy a RateLimit weisen all Fënster; X-RateLimit-* weist déi, déi am noosten un hirer Limitt ass. Iwwer enger Limitt kritt Dir 429 mat 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

Webhooks

Leet mat POST /api/v1/webhook-endpoints en Endpunkt un, fir informéiert ze ginn, wann eng Aarbecht fäerdeg ass, amplaz reegelméisseg nozefroen. Attorly schéckt e POST mat engem JSON-Evenement a signéiert en no Standard Webhooks mam whsec_-Secret vum Endpunkt. Verifizéiert d'Signatur, ier Dir dem Inhalt vertraut, äntwert bannent 15 Sekonne mat 2xx an dedupliquéiert iwwer webhook-id: feelgeschloe Liwwerunge ginn 72 Stonne laang nees probéiert. Dir kënnt de Secret ersetzen, en Testevenement schécken an all Liwwerung gesinn.

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.
}

Testmodus

Testschlësselen (atly_test_…) erreechen all Endpunkt, schaffen awer mat separaten Testdonnéeën a gi fix Beispillresultater zréck: et leeft keng KI an et gi keng Credits verbraucht. En Testschlëssel gesäit ni Live-Donnéeën. Setzt e magesche Wäert wéi __fail_credits__, __fail_consent__ oder __slow__ an iergendeen Textfeld, fir dee Feeler oder déi Verzögerung ze kréien. DELETE /api/v1/test-data läscht alles, wat en Testschlëssel ugeluecht huet.

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

Apps, déi fir en Attorly-Benotzer handelen, melle sech mat OAuth 2.1 un: Discovery ënner /.well-known/oauth-authorization-server, dynamesch Client-Registréierung an den Authorization-Code-Flow mat PKCE (S256). Frot resource=https://attorly.ai/api/v1 un, fir en Token fir d'REST-API ze kréien; en Token, dee fir den MCP-Server ausgestallt gouf, gëtt hei refuséiert. Setzt offline_access derbäi, fir e Refresh-Token ze kréien. D'Persoun wielt d'Organisatioun a kann d'Scopes um Zoustëmmungsecran aschränken.

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

Ofrechnung

Operatiounen, déi KI benotzen, verbrauchen déiselwecht KI-Credits wéi d'Attorly-App, aus dem Portmonni vum Proprietär vum Schlëssel oder deem vu senger Organisatioun, egal ob Dir se iwwer REST oder MCP opruft. Wann d'Credits opgebraucht sinn, kritt Dir 402 insufficient_credits. Opriff am Testmodus si gratis.

Abonnementer

D'API ass a Pro an Enterprise abegraff. Wann d'Abonnement vum Proprietär vum Schlëssel keen API-Zougang méi enthält oder de Proprietär d'Organisatioun verlooss huet, ginn d'Ufroe mat 403 refuséiert.

Referenz

All Operatioun, generéiert aus dem OpenAPI-Dokument, dat d'API zur Verfügung stellt. D'Päd si relativ zu https://attorly.ai. Erfollegräich Äntwerte packen d'Resultat an data. D'Beschreiwunge vun de Felder sinn op Englesch.

Dokumenter

GET/api/v1/documentslistDocuments

Déi gespäichert Dokumenter oplëschten, déi de Schlëssel liese kann, déi neist als éischt.

Berechtegung:DOCUMENTS_READ
Query-Parameteren
FeldTypBeschreiwung
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

En Dokument als multipart/form-data eroplueden, oder als JSON mat base64-Inhalt oder einfachem Text. E gëtt am Hannergrond analyséiert, ausser analyze ass false.

Berechtegung:DOCUMENTS_WRITEVerbraucht KI-CreditsAkzeptéiert Fichier-Uploads
Inhalt vun der Ufro
FeldTypBeschreiwung
filenameobligatoreschstringThe 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
Donnéeë vun der Äntwert (201)
FeldTypBeschreiwung
idobligatoreschstring
nameobligatoreschstring
originalNameobligatoreschstring
typeobligatoresch"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
sizeobligatoreschinteger
statusobligatoresch"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
analysisQueuedobligatoreschbooleantrue when the background analysis was started
createdAtobligatoreschstringISO 8601 date-time
urlobligatoreschstringWhere 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

Den Text vun den Dokumenter duerchsichen, déi de Schlëssel liese kann, no Bedeitung an no exakte Wierder.

Berechtegung:DOCUMENTS_READ
Query-Parameteren
FeldTypBeschreiwung
queryobligatoreschstringWhat 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

En Dokument ofruffen, mat sengem Veraarbechtungsstatus a senger leschter Analyse.

Berechtegung:DOCUMENTS_READ
Pad-Parameteren
FeldTypBeschreiwung
documentIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstring
nameobligatoreschstring
originalNameobligatoreschstring
typeobligatoresch"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
mimeTypeobligatoreschstring
sizeobligatoreschinteger
statusobligatoresch"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
archivedobligatoreschboolean
ownedByYouobligatoreschboolean
versionNumberobligatoreschinteger | 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.
createdAtobligatoreschstringISO 8601 date-time
updatedAtobligatoreschstringISO 8601 date-time
fileAvailableobligatoreschbooleanfalse when the stored file can no longer be read
governingLawRequiredobligatoreschbooleantrue when the analysis is held until a governing law is chosen for the document in Attorly
latestAnalysisobligatoreschobject | null
urlobligatoreschstringWhere 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

D'Läsche vun engem Dokument ufroen, deen Iech gehéiert. Den Dokument gëtt eréischt geläscht, wann Dir et an Attorly fräigitt.

Berechtegung:DOCUMENTS_DELETE
Pad-Parameteren
FeldTypBeschreiwung
documentIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstring
deletedobligatoreschbooleantrue only when the document is gone
statusobligatoresch"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

En Dokument oder en Inline-Text analyséieren. mode ass full (gespäicherten Dokument) oder quick.

Berechtegung:DOCUMENTS_ANALYZEDOCUMENTS_READVerbraucht KI-Credits

D'Feld mode am Inhalt wielt eng vun dësen Optiounen: mode: full, mode: quick.

Inhalt vun der Ufro
FeldTypBeschreiwung
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

Déi gespäichert Analyse vun engem Dokument oplëschten, déi neist als éischt.

Berechtegung:DOCUMENTS_READ
Pad-Parameteren
FeldTypBeschreiwung
documentIdobligatoreschstring
Query-Parameteren
FeldTypBeschreiwung
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

E gespäicherten Dokument analyséieren.

Berechtegung:DOCUMENTS_ANALYZEDOCUMENTS_READVerbraucht KI-Credits
Pad-Parameteren
FeldTypBeschreiwung
documentIdobligatoreschstring

D'Feld mode am Inhalt wielt eng vun dësen Optiounen: mode: full, mode: quick.

Inhalt vun der Ufro
FeldTypBeschreiwung
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

Den einfachen Text vun engem gespäicherte PDF- oder DOCX-Dokument extrahéieren.

Berechtegung:DOCUMENTS_READ
Pad-Parameteren
FeldTypBeschreiwung
documentIdobligatoreschstring
Query-Parameteren
FeldTypBeschreiwung
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
textobligatoreschstringThe document text from offset (untrusted content)
documentNameobligatoreschstring
documentTypeobligatoreschstring
mimeTypeobligatoreschstring | null
characterCountobligatoreschintegerCharacters in the whole document
wordCountobligatoreschintegerWords in the whole document
offsetobligatoreschinteger
nextOffsetobligatoreschinteger | nullPass as offset to read on; null when the text ends here
truncatedobligatoreschbooleantrue 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

Eng gespäichert Analyse ofruffen: Resumé, Risiko, wichteg Konditiounen, Klauselen a Recommandatiounen.

Berechtegung:DOCUMENTS_READ
Pad-Parameteren
FeldTypBeschreiwung
analysisIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstring
documentIdobligatoreschstring
documentNameobligatoreschstring
summaryobligatoreschstring | null
riskLevelobligatoresch"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskScoreobligatoreschnumber
keyTermsobligatorescharray of any
clausesobligatorescharray of any
recommendationsobligatorescharray of any
modeobligatoreschstringSINGLE or CONSENSUS
createdAtobligatoreschstringISO 8601 date-time
urlobligatoreschstring
curl
curl "https://attorly.ai/api/v1/analyses/your_analysisId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/comparisonscreateComparison

Zwee Dokumenter oder Texter Zeil fir Zeil vergläichen.

Berechtegung:DOCUMENTS_READ
Inhalt vun der Ufro
FeldTypBeschreiwung
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
differencesobligatorescharray of object
summaryobligatoreschobject
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"
}'

Klauselen

GET/api/v1/clausessearchClauses

D'Klauselbibliothéik duerchsichen.

Berechtegung:CLAUSES_READ
Query-Parameteren
FeldTypBeschreiwung
queryobligatoreschstring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
clausesobligatorescharray of object
countobligatoreschinteger
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

D'Risiko vun enger Klausel bewäerten.

Berechtegung:CLAUSES_READ
Inhalt vun der Ufro
FeldTypBeschreiwung
clauseTextobligatoreschstring
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" | …
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
clauseTextstring
clauseTypeobligatoreschstring
jurisdictionobligatoreschstring
overallRiskScoreobligatoreschnumber
riskLevelobligatoresch"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskFactorsobligatorescharray of object
recommendationsobligatorescharray 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

Eng Klausel mat maartüblecher Formuléierung vergläichen.

Berechtegung:CLAUSES_READ
Inhalt vun der Ufro
FeldTypBeschreiwung
clauseTextobligatoreschstring
categoryobligatoresch"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
inputClauseobligatoreschstring
categoryobligatoreschstring
marketStandardsobligatorescharray of object
comparisonobligatoreschobject
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

Eng Klausel mat engem Playbook ofgläichen.

Berechtegung:CLAUSES_READ
Inhalt vun der Ufro
FeldTypBeschreiwung
clauseTextobligatoreschstring
playbookIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
playbookNameobligatoreschstring
compliantobligatoreschboolean
violationsobligatorescharray of string
warningsobligatorescharray of string
rulesCheckedobligatoreschinteger
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"
}'

Recherche

POST/api/v1/research/searchessearchResearch

Juristesch Quelle wéi Lovdata, EUR-Lex a CourtListener duerchsichen.

Berechtegung:RESEARCH_READVerbraucht KI-Credits
Inhalt vun der Ufro
FeldTypBeschreiwung
queryobligatoreschstring
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
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
queryobligatoreschstring
jurisdictionobligatoreschstring
resultsobligatorescharray of object
totalCountobligatoreschintegerResults 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

E Gesetz iwwer säin Zitat nosichen.

Berechtegung:RESEARCH_READVerbraucht KI-Credits
Query-Parameteren
FeldTypBeschreiwung
citationobligatoreschstring
jurisdictionobligatoreschstringISO 3166-1 alpha-2 country code, or "EU"
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstring
titleobligatoreschstring
sourceobligatoreschstring
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"

Redlines

POST/api/v1/redlinescreateRedlines

Redline-Virschléi fir en Dokument oder en Text generéieren.

Berechtegung:REDLINES_GENERATEVerbraucht KI-Credits
Inhalt vun der Ufro
FeldTypBeschreiwung
documentIdstring
contentstring
partyRoleobligatoresch"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
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
changesobligatorescharray of object
summaryobject
negotiationNotesarray of string
statisticsobligatoreschobject
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

Redline-Ännerungen un engem Dokument akzeptéieren oder refuséieren.

Berechtegung:REDLINES_GENERATE
Pad-Parameteren
FeldTypBeschreiwung
documentIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
changesobligatorescharray of object
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
acceptedobligatoreschinteger
rejectedobligatoreschinteger
messageobligatoreschstring
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"
    }
  ]
}'

Verhandlungen

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

Eng Verhandlungspositioun analyséieren.

Berechtegung:NEGOTIATIONS_READVerbraucht KI-Credits
Inhalt vun der Ufro
FeldTypBeschreiwung
documentIdstring
contentstring
partyRoleobligatoresch"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
overallPositionobligatoreschstringFAVORABLE, BALANCED or UNFAVORABLE
positionsobligatorescharray 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

Aus enger Strategie e Verhandlungs-Playbook erstellen.

Berechtegung:NEGOTIATIONS_READVerbraucht KI-Credits
Inhalt vun der Ufro
FeldTypBeschreiwung
strategyobligatoreschobject
contextobject
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
playbookobligatorescharray of object
anticipatedObjectionsobligatorescharray of object
recommendationsobligatorescharray of string
summaryobligatoreschobject
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"
    ]
  }
}'

Workflowen

GET/api/v1/workflows/templateslistWorkflowTemplates

Workflow-Virlagen oplëschten.

Berechtegung:WORKFLOWS_EXECUTE
Query-Parameteren
FeldTypBeschreiwung
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

Workflow-Ausféierungen oplëschten, déi neist als éischt, op Wonsch fir ee Projet oder ee Status.

Berechtegung:WORKFLOWS_EXECUTE
Query-Parameteren
FeldTypBeschreiwung
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

E Workflow op engem Due-Diligence-Projet starten.

Berechtegung:WORKFLOWS_EXECUTEVerbraucht KI-Credits
Inhalt vun der Ufro
FeldTypBeschreiwung
templateIdobligatoreschstring
projectIdobligatoreschstring
inputsobligatoreschobject
optionsobject
Donnéeë vun der Äntwert (202)
FeldTypBeschreiwung
executionIdobligatoreschstring
templateIdobligatoreschstring
templateNameobligatoreschstring
statusobligatoreschstring
startedAtobligatoreschstringISO 8601 date-time
messageobligatoreschstring
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

De Status vun enger Workflow-Ausféierung ofruffen.

Berechtegung:WORKFLOWS_EXECUTE
Pad-Parameteren
FeldTypBeschreiwung
executionIdobligatoreschstring
Query-Parameteren
FeldTypBeschreiwung
includeStepsboolean
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
executionIdobligatoreschstring
templateNameobligatoreschstring
statusobligatoreschstring
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"

Due Diligence

GET/api/v1/due-diligence/projectslistDueDiligenceProjects

Due-Diligence-Projeten oplëschten, déi neist als éischt.

Berechtegung:DUE_DILIGENCE_FULL
Query-Parameteren
FeldTypBeschreiwung
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

En Due-Diligence-Projet uleeën.

Berechtegung:DUE_DILIGENCE_FULL
Inhalt vun der Ufro
FeldTypBeschreiwung
nameobligatoreschstring
dealTypeobligatoresch"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
Donnéeë vun der Äntwert (201)
FeldTypBeschreiwung
projectIdobligatoreschstring
nameobligatoreschstring
projectTypeobligatoreschstring
statusobligatoreschstring
createdAtobligatoreschstringISO 8601 date-time
messageobligatoreschstring
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

En Due-Diligence-Projet mat der Zuel vu sengen Dokumenter an Erkenntnisser ofruffen.

Berechtegung:DUE_DILIGENCE_FULL
Pad-Parameteren
FeldTypBeschreiwung
projectIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstring
nameobligatoreschstring
descriptionobligatoreschstring | null
projectTypeobligatoreschstring
statusobligatoreschstring
priorityobligatoreschstring
targetCompanyobligatoreschstring | null
dueDateobligatoreschstring | null
documentCountobligatoreschinteger
findingCountobligatoreschinteger
createdAtobligatoreschstringISO 8601 date-time
updatedAtobligatoreschstringISO 8601 date-time
completedAtobligatoreschstring | 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

Dokumenter an en Due-Diligence-Projet setzen.

Berechtegung:DUE_DILIGENCE_FULL
Pad-Parameteren
FeldTypBeschreiwung
projectIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
documentIdsobligatorescharray of string
categorystring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
projectIdobligatoreschstring
documentsAddedobligatoreschinteger
totalDocumentsobligatoreschinteger
categoryobligatoreschstring
messageobligatoreschstring
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

D'Erkenntnisser vun engem Due-Diligence-Projet oplëschten.

Berechtegung:DUE_DILIGENCE_FULL
Pad-Parameteren
FeldTypBeschreiwung
projectIdobligatoreschstring
Query-Parameteren
FeldTypBeschreiwung
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
projectIdobligatoreschstring
projectNameobligatoreschstring
findingsobligatorescharray of object
riskSummaryobligatoreschobjectNumber of findings per severity
totalFindingsobligatoreschinteger
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

En Due-Diligence-Rapport generéieren.

Berechtegung:DUE_DILIGENCE_FULL
Pad-Parameteren
FeldTypBeschreiwung
projectIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
formatobligatoresch"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
Donnéeë vun der Äntwert (201)
FeldTypBeschreiwung
reportIdobligatoreschstring
projectIdobligatoreschstring
projectNamestring
formatobligatoresch"pdf" | "markdown"
statusobligatoreschstring
sectionsarray of string
documentCountinteger
findingCountinteger
markdownobligatoreschstring
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"
}'

Virlagen an Entwërf

GET/api/v1/templateslistTemplates

Dokumentvirlagen oplëschten.

Berechtegung:TEMPLATES_READ
Query-Parameteren
FeldTypBeschreiwung
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

En Entworf aus enger Virlag (mode template) oder mat KI (mode ai) erstellen.

Berechtegung:TEMPLATES_DRAFTVerbraucht KI-Credits

D'Feld mode am Inhalt wielt eng vun dësen Optiounen: mode: template, mode: ai.

Inhalt vun der Ufro
FeldTypBeschreiwung
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"
  }
}'

Fäll

GET/api/v1/caseslistCases

Är Fäll oplëschten, déi zulescht geännert als éischt.

Berechtegung:CASES_READ
Query-Parameteren
FeldTypBeschreiwung
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

D'Chronologie vun engem Fall ofruffen: all Evenement mat sengem Datum, de Beweiser an der Positioun vun der Géigesäit.

Berechtegung:CASES_READ
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
caseobligatoreschobject
eventsobligatorescharray of objectIn date order
countobligatoreschinteger
needsReviewCountobligatoreschintegerEvents an AI added that no person has confirmed
deletionRequestedCountobligatoreschintegerEvents 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

En Evenement an d'Chronologie vun engem Fall setzen.

Berechtegung:CASES_WRITE
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
titleobligatoreschstringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenobligatoreschobjectWhen 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
Donnéeë vun der Äntwert (201)
FeldTypBeschreiwung
caseIdobligatoreschstring
eventobligatoreschobject
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

En Evenement an der Chronologie vun engem Fall änneren, oder eent bestätegen, dat eng KI derbäigesat huet.

Berechtegung:CASES_WRITE
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
eventIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
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
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
caseIdobligatoreschstring
eventobligatoreschobject
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

D'Läsche vun engem Evenement aus der Chronologie vun engem Fall ufroen. D'Evenement gëtt eréischt geläscht, wann de Proprietär et an Attorly fräigëtt.

Berechtegung:CASES_WRITE
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
eventIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
caseIdobligatoreschstring
idobligatoreschstring
deletedobligatoreschbooleantrue only when the event is gone
statusobligatoresch"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

D'Chronologie vun engem Fall als PDF-, Word-, ODT-, Excel- oder PowerPoint-Fichier exportéieren.

Berechtegung:CASES_READ
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
layoutobligatoresch"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
formatobligatoresch"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
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
caseIdobligatoreschstring
layoutobligatoresch"overview" | "chronology" | "numbered" | "visual"
formatobligatoresch"pdf" | "docx" | "odt" | "xlsx" | "pptx"
localeobligatoreschstringThe language the file is written in
eventCountobligatoreschintegerEvents in the file
exhibitCountobligatoreschintegerDocuments in the exhibit list (chronology and numbered layouts)
leftOutConfidentialobligatoreschintegerEvents left out because they are marked confidential
attachmentobligatoreschobject
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

D'Friste vun engem Fall oplëschten, déi noosten als éischt, mat der Angab, wiem seng Frist et ass an ob se erleedegt oder iwwerfälleg ass.

Berechtegung:CASES_READ
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
Query-Parameteren
FeldTypBeschreiwung
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
caseobligatoreschobject
deadlinesobligatorescharray of objectSoonest first
countobligatoreschinteger
overdueCountobligatoreschinteger
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

Eng Frist an e Fall setzen, op e bestëmmten Datum oder vun engem erfaasste Fakt u gerechent.

Berechtegung:CASES_WRITE
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
titleobligatoreschstringWhat 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. 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
Donnéeë vun der Äntwert (201)
FeldTypBeschreiwung
caseIdobligatoreschstring
deadlineobligatoreschobject
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": "Reply to the landlord’s notice",
  "derivedFrom": {
    "factKey": "receivedAt",
    "offsetDays": 30
  },
  "kind": "FILING",
  "party": "SELF",
  "notes": "Object in writing"
}'
PATCH/api/v1/cases/{caseId}/deadlines/{deadlineId}updateCaseDeadline

Eng Frist an engem Fall änneren, oder se als erleedegt oder nees als oppe markéieren.

Berechtegung:CASES_WRITE
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
deadlineIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
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. 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
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
caseIdobligatoreschstring
deadlineobligatoreschobject
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

D'Fakten oplëschten, déi an engem Fall erfaasst sinn, mat hirer Quell, an d'Fakten, déi de Fall nach brauch.

Berechtegung:CASES_READ
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
caseobligatoreschobject
factsobligatorescharray of object
countobligatoreschinteger
caseReadsobligatoreschobject | 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

E Fakt an engem Fall erfaassen oder korrigéieren. Fristen, déi dovun u gerechent ginn, verréckele sech mat.

Berechtegung:CASES_WRITE
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
keyobligatoreschstringThe 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
valueobligatoreschstringThe 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)
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
caseIdobligatoreschstring
outcomeobligatoresch"recorded" | "corrected" | "unchanged"recorded: a new fact; corrected: a new value replaced the old one; unchanged: it already held this value
factobligatoreschobject
movedDeadlinesobligatorescharray of objectOpen deadlines counted from the fact that moved with the correction, due days before and after
urlobligatoreschstringWhere 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

D'Parteie vun engem Fall oplëschten an d'Rollen, déi de Fall virgesäit.

Berechtegung:CASES_READ
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
caseobligatoreschobject
partiesobligatorescharray of object
countobligatoreschinteger
rolesobligatorescharray 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

Eng Partei an e Fall setzen, an enger vu senge Rollen.

Berechtegung:CASES_WRITE
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
roleKeyobligatoreschstringThe role the party has in the case, as one of the roles parties_list returns (e.g. "landlord")
partyTypeobligatoresch"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
nameobligatoreschstringThe 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
Donnéeë vun der Äntwert (201)
FeldTypBeschreiwung
caseIdobligatoreschstring
partyobligatoreschobject
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

D'Detailer vun enger Partei an engem Fall änneren.

Berechtegung:CASES_WRITE
Pad-Parameteren
FeldTypBeschreiwung
caseIdobligatoreschstring
partyIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
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
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
caseIdobligatoreschstring
partyobligatoreschobject
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)"

Operatiounen

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

De Status an d'Resultat vun enger Ufro ofruffen, déi mat Prefer oder Idempotency-Key geschéckt gouf.

Pad-Parameteren
FeldTypBeschreiwung
operationIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstringop_…
objectobligatoresch"operation"
operationIdobligatoreschstringThe REST operation that was called, e.g. createRedlines
statusobligatoresch"running" | "awaiting_approval" | "succeeded" | "failed"
livemodeobligatoreschboolean
idempotencyKeystring | null
resultUrlobligatoreschstringWhere to poll: /api/v1/operations/{id}
createdAtobligatoreschstring (date-time)
completedAtobligatoreschstring (date-time) | null
expiresAtobligatoreschstring (date-time)
httpStatusobligatoreschinteger | null
resultobligatoreschanyThe data of the successful call
metaobject
errorobligatoreschobject | null
curl
curl "https://attorly.ai/api/v1/operations/op_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Webhooks

GET/api/v1/webhook-endpointslistWebhookEndpoints

D'Webhook-Endpunkte vun der Organisatioun an dem Modus vum Schlëssel oplëschten.

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

E Webhook-Endpunkt uleeën. D'Äntwert enthält säi Signatur-Secret, deen nëmmen eng Kéier ugewise gëtt.

Inhalt vun der Ufro
FeldTypBeschreiwung
urlobligatoreschstring (uri)HTTPS URL that receives the events
descriptionstring
enabledEventsobligatorescharray 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.
Donnéeë vun der Äntwert (201)
FeldTypBeschreiwung
idobligatoreschstringwe_…
objectobligatoresch"webhook_endpoint"
urlobligatoreschstring
descriptionstring | null
enabledEventsobligatorescharray of string
statusobligatoresch"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligatoreschboolean
includeSnapshotsobligatoreschboolean
apiVersionobligatoreschstring
failingSincestring (date-time) | null
createdAtobligatoreschstring (date-time)
updatedAtobligatoreschstring (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

E Webhook-Endpunkt ofruffen.

Pad-Parameteren
FeldTypBeschreiwung
endpointIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstringwe_…
objectobligatoresch"webhook_endpoint"
urlobligatoreschstring
descriptionstring | null
enabledEventsobligatorescharray of string
statusobligatoresch"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligatoreschboolean
includeSnapshotsobligatoreschboolean
apiVersionobligatoreschstring
failingSincestring (date-time) | null
createdAtobligatoreschstring (date-time)
updatedAtobligatoreschstring (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

D'URL, d'Evenementer oder d'Snapshots vun engem Endpunkt änneren, oder en deaktivéieren an aktivéieren.

Pad-Parameteren
FeldTypBeschreiwung
endpointIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstringwe_…
objectobligatoresch"webhook_endpoint"
urlobligatoreschstring
descriptionstring | null
enabledEventsobligatorescharray of string
statusobligatoresch"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligatoreschboolean
includeSnapshotsobligatoreschboolean
apiVersionobligatoreschstring
failingSincestring (date-time) | null
createdAtobligatoreschstring (date-time)
updatedAtobligatoreschstring (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

E Webhook-Endpunkt a säi Liwwerungsverlaf läschen.

Pad-Parameteren
FeldTypBeschreiwung
endpointIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstring
objectobligatoresch"webhook_endpoint"
deletedobligatoreschtrue
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

De Signatur-Secret ersetzen. Den ale signéiert nach 24 Stonne mat.

Pad-Parameteren
FeldTypBeschreiwung
endpointIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstringwe_…
objectobligatoresch"webhook_endpoint"
urlobligatoreschstring
descriptionstring | null
enabledEventsobligatorescharray of string
statusobligatoresch"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligatoreschboolean
includeSnapshotsobligatoreschboolean
apiVersionobligatoreschstring
failingSincestring (date-time) | null
createdAtobligatoreschstring (date-time)
updatedAtobligatoreschstring (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

En Evenement webhook_endpoint.test just un dësen Endpunkt schécken.

Pad-Parameteren
FeldTypBeschreiwung
endpointIdobligatoreschstring
Donnéeë vun der Äntwert (202)
FeldTypBeschreiwung
eventIdobligatoreschstring
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

D'Liwwerunge vun engem Endpunkt oplëschten, déi neist als éischt, mat hire Versich an hirem Resultat.

Pad-Parameteren
FeldTypBeschreiwung
endpointIdobligatoreschstring
Query-Parameteren
FeldTypBeschreiwung
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"

Evenementer

GET/api/v1/eventslistEvents

D'Evenementer vun de leschten 30 Deeg oplëschten, déi neist als éischt.

Query-Parameteren
FeldTypBeschreiwung
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

En Evenement ofruffen, sou wéi Webhook-Endpunkten et kréien.

Pad-Parameteren
FeldTypBeschreiwung
eventIdobligatoreschstring
Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
idobligatoreschstringevt_… — also sent as the webhook-id header; deduplicate on it
objectobligatoresch"event"
typeobligatoresch"analysis.completed" | "analysis.failed" | "redlines.generated" | "due_diligence.report.completed" | "operation.succeeded" | "operation.failed" | …
apiVersionobligatoreschstring
createdAtobligatoreschstring (date-time)
livemodeobligatoreschboolean
dataobligatoreschobject
curl
curl "https://attorly.ai/api/v1/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/events/{eventId}/redeliveriesredeliverEvent

En Evenement nach eng Kéier schécken, un een Endpunkt oder un all Endpunkt, deen et abonnéiert huet.

Pad-Parameteren
FeldTypBeschreiwung
eventIdobligatoreschstring
Inhalt vun der Ufro
FeldTypBeschreiwung
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
Donnéeë vun der Äntwert (202)
FeldTypBeschreiwung
eventIdobligatoreschstring
deliveriesScheduledobligatoreschinteger
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"
}'

Kont, Notzung a Protokoller

GET/api/v1/organizationgetOrganization

D'Organisatioun vum Schlëssel: Abonnement, KI-Credits, Standard-Juridictioun a wat de Schlëssel däerf.

Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
organizationobligatoreschobject
userobligatoreschobject
planobligatoreschstringSTANDARD, PRO or ENTERPRISE
billingobligatoreschobject
defaultJurisdictionobligatoreschstring | nullISO 3166-1 alpha-2 country used when a document names no governing law
credentialobligatoreschobject
appUrlobligatoreschstring
curl
curl "https://attorly.ai/api/v1/organization" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/usagegetUsage

Ufroe pro Dag, Schlëssel an Operatioun, mat der Zuel vu Feeler, iwwer REST an MCP.

Query-Parameteren
FeldTypBeschreiwung
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

D'API-Ufroe vun der Organisatioun aus de leschten 30 Deeg oplëschten, déi neist als éischt.

Query-Parameteren
FeldTypBeschreiwung
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

Wien huet wat, wéini a mat wéi engem Schlëssel opgeruff. Fir Proprietären an Administrateure vun der Organisatioun.

Query-Parameteren
FeldTypBeschreiwung
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

All Objet, Evenement an all Operatioun vun der Organisatioun aus dem Testmodus läschen. Just fir Testschlësselen.

Donnéeë vun der Äntwert (200)
FeldTypBeschreiwung
objectobligatoresch"test_data_purge"
deletedobligatoreschobject
curl
curl -X DELETE "https://attorly.ai/api/v1/test-data" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"