Sari la conținutul principal

Dezvoltatori

Documentație API REST

Un API JSON prin HTTPS pentru AI-ul juridic al Attorly. Execută aceleași operațiuni ca serverul MCP, cu aceleași chei, permisiuni, limite și facturare.

Pornire rapidă

Încărcați un contract și analizați-l în patru pași.

  1. 1. Creați o cheie

    Creați o cheie în Setări › Dezvoltatori și alegeți REST API. Aceeași cheie funcționează pentru serverul MCP. Păstrați-o într-o variabilă de mediu:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Încărcați un document

    Trimiteți fișierul ca multipart/form-data. data.id din răspuns este id-ul documentului. analyze=false îl salvează fără a porni analiza în fundal, deoarece pasul următor rulează una.

    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. Analizați-l

    Prefer: wait=30 așteaptă rezultatul până la 30 de secunde. O analiză terminată revine ca 200 cu rezultatul în data. Dacă durează mai mult, primiți 202 Accepted cu un antet Location care indică operațiunea.

    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. Preluați rezultatul

    Interogați operațiunea până când starea ei este succeeded sau failed. Analiza se află în result. Retry-After indică câte secunde să așteptați între interogări.

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

Autentificare

Trimiteți o credențială în antetul Authorization ca token Bearer. Cheile din Setări › Dezvoltatori încep cu lbmcp_ și funcționează în Pro și Enterprise, atât pentru API-ul REST, cât și pentru serverul MCP. Cheile de organizație Enterprise încep cu atly_ (atly_rk_ pentru cheile restricționate, atly_test_ pentru modul de test); cheile lb_ mai vechi funcționează în continuare. Aplicațiile care acționează în numele unei persoane folosesc OAuth.

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

Permisiuni (scope-uri)

Fiecare endpoint necesită permisiunile afișate lângă el. O cheie fără ele primește 403 insufficient_scope, iar requiredScopes din eroare enumeră toate permisiunile de care are nevoie apelul. Cheile API de organizație și OAuth folosesc aceste nume:

Permisiune (scope)Scope pentru cheia API a organizației
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

Erori

Toate erorile au aceeași formă: un cod stabil pentru logica programului, un mesaj pentru oameni și un requestId pentru asistență.

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

Fiecare cod este explicat, împreună cu ce trebuie făcut, pe pagina codurilor de eroare

Versiuni

API-ul este versionat după dată. Trimiteți Attorly-Version pentru a alege versiunea unei cereri; fără el, cererea folosește versiunea cu care a fost creată cheia (cheile anterioare versionării folosesc 2026-10-01). Fiecare răspuns indică versiunea care a răspuns. Modificările incompatibile apar doar într-o versiune nouă, iar jurnalul de modificări le enumeră.

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

Idempotență

Trimiteți un antet Idempotency-Key, de exemplu un UUID, la cererile POST, PATCH și DELETE. O reîncercare cu aceeași cheie și aceeași cerere primește primul răspuns cu Idempotent-Replayed: true, iar lucrarea nu este rulată sau facturată din nou. O cheie refolosită pentru altă cerere primește 422 idempotency_key_reused, iar una încă în curs primește 409 sau, la un apel de lungă durată, aceeași operație. Erorile de server nu sunt păstrate, așa că reîncercarea rulează din nou. Cheile sunt păstrate 24 de ore.

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

Cereri de lungă durată

Începând cu versiunea 2026-11-01, analizele complete, redline-urile, planurile de negociere, fluxurile de lucru, rapoartele de due diligence și ciornele AI răspund imediat 202 Accepted cu o operație. Trimiteți Prefer: wait=30 pentru a aștepta mai întâi rezultatul până la 30 de secunde (maximum 60) sau Prefer: respond-async pentru a cere 202 la orice scriere. Interogați Location până când starea este succeeded sau failed ori abonați-vă la operation.succeeded. Rezultatele sunt păstrate 24 de ore. O organizație rulează simultan cel mult 5 operații AI de lungă durată; celelalte primesc 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", … } }

Paginare

Listele returnează { object: "list", data, hasMore, nextCursor } și acceptă limit (între 1 și 100, implicit 20) și cursor. Pentru pagina următoare, trimiteți nextCursor ca cursor. Pe ultima pagină, nextCursor este null. Un cursor rămâne valid chiar dacă se adaugă elemente noi.

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…

Limite de cereri

O cerere contează în mai multe ferestre: limita pe oră a cheii, 300 pe minut per persoană, 600 pe minut per organizație, o limită pe minut per cheie pentru citiri, scrieri și apeluri AI și limita proprie a fiecărei operații. REST și MCP folosesc aceleași contoare. Anteturile RateLimit-Policy și RateLimit arată toate ferestrele; X-RateLimit-* o arată pe cea mai aproape de epuizare. Peste o limită primiți 429 cu 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

Webhookuri

Creați un endpoint cu POST /api/v1/webhook-endpoints pentru a fi anunțat când o lucrare se termină, în loc să interogați. Attorly trimite un POST cu un eveniment JSON, semnat conform Standard Webhooks cu secretul whsec_ al endpointului. Verificați semnătura înainte să aveți încredere în conținut, răspundeți 2xx în 15 secunde și eliminați duplicatele după webhook-id: livrările eșuate sunt reîncercate timp de 72 de ore. Puteți reînnoi secretul, trimite un eveniment de test și vedea fiecare livrare.

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

Mod de test

Cheile de test (atly_test_…) ajung la toate endpointurile, dar lucrează pe date de test separate și returnează rezultate exemplu fixe: nu rulează AI și nu se consumă credite. O cheie de test nu vede niciodată date reale. Puneți o valoare magică precum __fail_credits__, __fail_consent__ sau __slow__ în orice câmp de text pentru a obține acea eroare sau întârziere. DELETE /api/v1/test-data șterge tot ce au creat cheile de test.

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

Aplicațiile care acționează în numele unui utilizator Attorly se autentifică cu OAuth 2.1: descoperire la /.well-known/oauth-authorization-server, înregistrare dinamică a clienților și fluxul cu cod de autorizare cu PKCE (S256). Cereți resource=https://attorly.ai/api/v1 pentru a obține un token pentru API-ul REST; un token emis pentru serverul MCP este refuzat aici. Adăugați offline_access pentru a obține un token de reîmprospătare. Persoana alege organizația și poate restrânge permisiunile pe ecranul de consimțământ.

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

Facturare

Operațiile care rulează AI consumă aceleași credite AI ca aplicația Attorly, din portofelul proprietarului cheii sau al organizației sale, indiferent dacă le apelați prin REST sau MCP. Când creditele se termină, primiți 402 insufficient_credits. Apelurile în modul de test sunt gratuite.

Planuri

API-ul este inclus în planurile Pro și Enterprise. Dacă planul proprietarului cheii nu mai include acces la API sau proprietarul a părăsit organizația, cererile sunt refuzate cu 403.

Referință

Fiecare operațiune, generată din documentul OpenAPI servit de API. Căile sunt relative la https://attorly.ai. Răspunsurile reușite împachetează rezultatul în data. Descrierile câmpurilor sunt în engleză.

Documente

GET/api/v1/documentslistDocuments

Listează documentele stocate pe care cheia le poate citi, cele mai noi primele.

Permisiune (scope):DOCUMENTS_READ
Parametri de interogare
CâmpTipDescriere
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

Încarcă un document ca multipart/form-data sau ca JSON cu conținut base64 ori text simplu. Este analizat în fundal, cu excepția cazului în care analyze este false.

Permisiune (scope):DOCUMENTS_WRITEFolosește credite IAAcceptă încărcarea fișierelor
Corpul cererii
CâmpTipDescriere
filenameobligatoriustringThe 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
Datele răspunsului (201)
CâmpTipDescriere
idobligatoriustring
nameobligatoriustring
originalNameobligatoriustring
typeobligatoriu"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
sizeobligatoriuinteger
statusobligatoriu"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
analysisQueuedobligatoriubooleantrue when the background analysis was started
createdAtobligatoriustringISO 8601 date-time
urlobligatoriustringWhere 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

Căutați în textul documentelor pe care cheia le poate citi, după sens și după cuvinte exacte.

Permisiune (scope):DOCUMENTS_READ
Parametri de interogare
CâmpTipDescriere
queryobligatoriustringWhat 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

Obține un document, starea procesării și cea mai recentă analiză.

Permisiune (scope):DOCUMENTS_READ
Parametri de cale
CâmpTipDescriere
documentIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustring
nameobligatoriustring
originalNameobligatoriustring
typeobligatoriu"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
mimeTypeobligatoriustring
sizeobligatoriuinteger
statusobligatoriu"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
archivedobligatoriuboolean
ownedByYouobligatoriuboolean
versionNumberobligatoriuinteger | 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.
createdAtobligatoriustringISO 8601 date-time
updatedAtobligatoriustringISO 8601 date-time
fileAvailableobligatoriubooleanfalse when the stored file can no longer be read
governingLawRequiredobligatoriubooleantrue when the analysis is held until a governing law is chosen for the document in Attorly
latestAnalysisobligatoriuobject | null
urlobligatoriustringWhere 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

Solicită ștergerea unui document pe care îl dețineți. Documentul este șters doar după ce aprobați ștergerea în Attorly.

Permisiune (scope):DOCUMENTS_DELETE
Parametri de cale
CâmpTipDescriere
documentIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustring
deletedobligatoriubooleantrue only when the document is gone
statusobligatoriu"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

Analizează un document sau un text trimis direct. mode este full (document stocat) sau quick.

Permisiune (scope):DOCUMENTS_ANALYZEDOCUMENTS_READFolosește credite IA

Câmpul mode din corp alege una dintre: mode: full, mode: quick.

Corpul cererii
CâmpTipDescriere
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

Lista analizelor salvate ale unui document, cele mai noi primele.

Permisiune (scope):DOCUMENTS_READ
Parametri de cale
CâmpTipDescriere
documentIdobligatoriustring
Parametri de interogare
CâmpTipDescriere
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

Analizează un document stocat.

Permisiune (scope):DOCUMENTS_ANALYZEDOCUMENTS_READFolosește credite IA
Parametri de cale
CâmpTipDescriere
documentIdobligatoriustring

Câmpul mode din corp alege una dintre: mode: full, mode: quick.

Corpul cererii
CâmpTipDescriere
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

Extrage textul simplu dintr-un document PDF sau DOCX stocat.

Permisiune (scope):DOCUMENTS_READ
Parametri de cale
CâmpTipDescriere
documentIdobligatoriustring
Parametri de interogare
CâmpTipDescriere
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
Datele răspunsului (200)
CâmpTipDescriere
textobligatoriustringThe document text from offset (untrusted content)
documentNameobligatoriustring
documentTypeobligatoriustring
mimeTypeobligatoriustring | null
characterCountobligatoriuintegerCharacters in the whole document
wordCountobligatoriuintegerWords in the whole document
offsetobligatoriuinteger
nextOffsetobligatoriuinteger | nullPass as offset to read on; null when the text ends here
truncatedobligatoriubooleantrue 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

Obțineți o analiză salvată: rezumat, risc, termeni cheie, clauze și recomandări.

Permisiune (scope):DOCUMENTS_READ
Parametri de cale
CâmpTipDescriere
analysisIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustring
documentIdobligatoriustring
documentNameobligatoriustring
summaryobligatoriustring | null
riskLevelobligatoriu"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskScoreobligatoriunumber
keyTermsobligatoriuarray of any
clausesobligatoriuarray of any
recommendationsobligatoriuarray of any
modeobligatoriustringSINGLE or CONSENSUS
createdAtobligatoriustringISO 8601 date-time
urlobligatoriustring
curl
curl "https://attorly.ai/api/v1/analyses/your_analysisId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/comparisonscreateComparison

Compară două documente sau texte rând cu rând.

Permisiune (scope):DOCUMENTS_READ
Corpul cererii
CâmpTipDescriere
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
Datele răspunsului (200)
CâmpTipDescriere
differencesobligatoriuarray of object
summaryobligatoriuobject
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"
}'

Clauze

GET/api/v1/clausessearchClauses

Caută în biblioteca de clauze.

Permisiune (scope):CLAUSES_READ
Parametri de interogare
CâmpTipDescriere
queryobligatoriustring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
Datele răspunsului (200)
CâmpTipDescriere
clausesobligatoriuarray of object
countobligatoriuinteger
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

Evaluează riscul unei clauze.

Permisiune (scope):CLAUSES_READ
Corpul cererii
CâmpTipDescriere
clauseTextobligatoriustring
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" | …
Datele răspunsului (200)
CâmpTipDescriere
clauseTextstring
clauseTypeobligatoriustring
jurisdictionobligatoriustring
overallRiskScoreobligatoriunumber
riskLevelobligatoriu"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskFactorsobligatoriuarray of object
recommendationsobligatoriuarray 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

Compară o clauză cu formulările standard de pe piață.

Permisiune (scope):CLAUSES_READ
Corpul cererii
CâmpTipDescriere
clauseTextobligatoriustring
categoryobligatoriu"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
Datele răspunsului (200)
CâmpTipDescriere
inputClauseobligatoriustring
categoryobligatoriustring
marketStandardsobligatoriuarray of object
comparisonobligatoriuobject
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

Verifică o clauză în raport cu un playbook.

Permisiune (scope):CLAUSES_READ
Corpul cererii
CâmpTipDescriere
clauseTextobligatoriustring
playbookIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
playbookNameobligatoriustring
compliantobligatoriuboolean
violationsobligatoriuarray of string
warningsobligatoriuarray of string
rulesCheckedobligatoriuinteger
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"
}'

Cercetare

POST/api/v1/research/searchessearchResearch

Caută în surse juridice precum Lovdata, EUR-Lex și CourtListener.

Permisiune (scope):RESEARCH_READFolosește credite IA
Corpul cererii
CâmpTipDescriere
queryobligatoriustring
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
Datele răspunsului (200)
CâmpTipDescriere
queryobligatoriustring
jurisdictionobligatoriustring
resultsobligatoriuarray of object
totalCountobligatoriuintegerResults 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

Caută un act normativ după referință.

Permisiune (scope):RESEARCH_READFolosește credite IA
Parametri de interogare
CâmpTipDescriere
citationobligatoriustring
jurisdictionobligatoriustringISO 3166-1 alpha-2 country code, or "EU"
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustring
titleobligatoriustring
sourceobligatoriustring
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"

Propuneri de modificare

POST/api/v1/redlinescreateRedlines

Generează propuneri de modificare pentru un document sau un text.

Permisiune (scope):REDLINES_GENERATEFolosește credite IA
Corpul cererii
CâmpTipDescriere
documentIdstring
contentstring
partyRoleobligatoriu"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
Datele răspunsului (200)
CâmpTipDescriere
changesobligatoriuarray of object
summaryobject
negotiationNotesarray of string
statisticsobligatoriuobject
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

Acceptă sau respinge modificările propuse într-un document.

Permisiune (scope):REDLINES_GENERATE
Parametri de cale
CâmpTipDescriere
documentIdobligatoriustring
Corpul cererii
CâmpTipDescriere
changesobligatoriuarray of object
Datele răspunsului (200)
CâmpTipDescriere
acceptedobligatoriuinteger
rejectedobligatoriuinteger
messageobligatoriustring
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"
    }
  ]
}'

Negocieri

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

Analizează o poziție de negociere.

Permisiune (scope):NEGOTIATIONS_READFolosește credite IA
Corpul cererii
CâmpTipDescriere
documentIdstring
contentstring
partyRoleobligatoriu"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
Datele răspunsului (200)
CâmpTipDescriere
overallPositionobligatoriustringFAVORABLE, BALANCED or UNFAVORABLE
positionsobligatoriuarray 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

Construiește un playbook de negociere pornind de la o strategie.

Permisiune (scope):NEGOTIATIONS_READFolosește credite IA
Corpul cererii
CâmpTipDescriere
strategyobligatoriuobject
contextobject
Datele răspunsului (200)
CâmpTipDescriere
playbookobligatoriuarray of object
anticipatedObjectionsobligatoriuarray of object
recommendationsobligatoriuarray of string
summaryobligatoriuobject
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"
    ]
  }
}'

Fluxuri de lucru

GET/api/v1/workflows/templateslistWorkflowTemplates

Listează șabloanele de fluxuri de lucru.

Permisiune (scope):WORKFLOWS_EXECUTE
Parametri de interogare
CâmpTipDescriere
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

Lista rulărilor fluxurilor de lucru, cele mai noi primele, opțional pentru un proiect sau o stare.

Permisiune (scope):WORKFLOWS_EXECUTE
Parametri de interogare
CâmpTipDescriere
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

Pornește un flux de lucru pe un proiect de due diligence.

Permisiune (scope):WORKFLOWS_EXECUTEFolosește credite IA
Corpul cererii
CâmpTipDescriere
templateIdobligatoriustring
projectIdobligatoriustring
inputsobligatoriuobject
optionsobject
Datele răspunsului (202)
CâmpTipDescriere
executionIdobligatoriustring
templateIdobligatoriustring
templateNameobligatoriustring
statusobligatoriustring
startedAtobligatoriustringISO 8601 date-time
messageobligatoriustring
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

Obține starea unei execuții a fluxului de lucru.

Permisiune (scope):WORKFLOWS_EXECUTE
Parametri de cale
CâmpTipDescriere
executionIdobligatoriustring
Parametri de interogare
CâmpTipDescriere
includeStepsboolean
Datele răspunsului (200)
CâmpTipDescriere
executionIdobligatoriustring
templateNameobligatoriustring
statusobligatoriustring
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"

Proiecte de due diligence

GET/api/v1/due-diligence/projectslistDueDiligenceProjects

Lista proiectelor de due diligence, cele mai noi primele.

Permisiune (scope):DUE_DILIGENCE_FULL
Parametri de interogare
CâmpTipDescriere
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

Creează un proiect de due diligence.

Permisiune (scope):DUE_DILIGENCE_FULL
Corpul cererii
CâmpTipDescriere
nameobligatoriustring
dealTypeobligatoriu"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
Datele răspunsului (201)
CâmpTipDescriere
projectIdobligatoriustring
nameobligatoriustring
projectTypeobligatoriustring
statusobligatoriustring
createdAtobligatoriustringISO 8601 date-time
messageobligatoriustring
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

Obțineți un proiect de due diligence cu numărul de documente și constatări.

Permisiune (scope):DUE_DILIGENCE_FULL
Parametri de cale
CâmpTipDescriere
projectIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustring
nameobligatoriustring
descriptionobligatoriustring | null
projectTypeobligatoriustring
statusobligatoriustring
priorityobligatoriustring
targetCompanyobligatoriustring | null
dueDateobligatoriustring | null
documentCountobligatoriuinteger
findingCountobligatoriuinteger
createdAtobligatoriustringISO 8601 date-time
updatedAtobligatoriustringISO 8601 date-time
completedAtobligatoriustring | 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

Adaugă documente într-un proiect de due diligence.

Permisiune (scope):DUE_DILIGENCE_FULL
Parametri de cale
CâmpTipDescriere
projectIdobligatoriustring
Corpul cererii
CâmpTipDescriere
documentIdsobligatoriuarray of string
categorystring
Datele răspunsului (200)
CâmpTipDescriere
projectIdobligatoriustring
documentsAddedobligatoriuinteger
totalDocumentsobligatoriuinteger
categoryobligatoriustring
messageobligatoriustring
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

Listează constatările unui proiect de due diligence.

Permisiune (scope):DUE_DILIGENCE_FULL
Parametri de cale
CâmpTipDescriere
projectIdobligatoriustring
Parametri de interogare
CâmpTipDescriere
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
Datele răspunsului (200)
CâmpTipDescriere
projectIdobligatoriustring
projectNameobligatoriustring
findingsobligatoriuarray of object
riskSummaryobligatoriuobjectNumber of findings per severity
totalFindingsobligatoriuinteger
pendingProposalsobligatoriuintegerRisks 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

Generează un raport de due diligence.

Permisiune (scope):DUE_DILIGENCE_FULL
Parametri de cale
CâmpTipDescriere
projectIdobligatoriustring
Corpul cererii
CâmpTipDescriere
formatobligatoriu"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
Datele răspunsului (201)
CâmpTipDescriere
reportIdobligatoriustring
projectIdobligatoriustring
projectNamestring
formatobligatoriu"pdf" | "markdown"
statusobligatoriustring
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
markdownobligatoriustring
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"
}'

Șabloane și proiecte

GET/api/v1/templateslistTemplates

Listează șabloanele de documente.

Permisiune (scope):TEMPLATES_READ
Parametri de interogare
CâmpTipDescriere
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

Creează un proiect dintr-un șablon (mode template) sau cu AI (mode ai).

Permisiune (scope):TEMPLATES_DRAFTFolosește credite IA

Câmpul mode din corp alege una dintre: mode: template, mode: ai.

Corpul cererii
CâmpTipDescriere
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"
  }
}'

Dosare

GET/api/v1/caseslistCases

Listează propriile dosare, cele modificate cel mai recent primele.

Permisiune (scope):CASES_READ
Parametri de interogare
CâmpTipDescriere
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

Obțineți cronologia unui dosar: fiecare eveniment cu data, dovezile și poziția celeilalte părți.

Permisiune (scope):CASES_READ
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
caseobligatoriuobject
eventsobligatoriuarray of objectIn date order
countobligatoriuinteger
needsReviewCountobligatoriuintegerEvents an AI added that no person has confirmed
deletionRequestedCountobligatoriuintegerEvents 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

Adaugă un eveniment în cronologia unui dosar.

Permisiune (scope):CASES_WRITE
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
Corpul cererii
CâmpTipDescriere
titleobligatoriustringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenobligatoriuobjectWhen 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
Datele răspunsului (201)
CâmpTipDescriere
caseIdobligatoriustring
eventobligatoriuobject
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

Modifică un eveniment din cronologia unui dosar sau confirmă un eveniment adăugat de AI.

Permisiune (scope):CASES_WRITE
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
eventIdobligatoriustring
Corpul cererii
CâmpTipDescriere
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
Datele răspunsului (200)
CâmpTipDescriere
caseIdobligatoriustring
eventobligatoriuobject
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

Solicită ștergerea unui eveniment din cronologia unui dosar. Evenimentul este șters doar după ce proprietarul aprobă acest lucru în Attorly.

Permisiune (scope):CASES_WRITE
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
eventIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
caseIdobligatoriustring
idobligatoriustring
deletedobligatoriubooleantrue only when the event is gone
statusobligatoriu"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

Exportă cronologia unui dosar ca fișier PDF, Word, ODT, Excel sau PowerPoint.

Permisiune (scope):CASES_READ
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
Corpul cererii
CâmpTipDescriere
layoutobligatoriu"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
formatobligatoriu"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
Datele răspunsului (200)
CâmpTipDescriere
caseIdobligatoriustring
layoutobligatoriu"overview" | "chronology" | "numbered" | "visual"
formatobligatoriu"pdf" | "docx" | "odt" | "xlsx" | "pptx"
localeobligatoriustringThe language the file is written in
eventCountobligatoriuintegerEvents in the file
exhibitCountobligatoriuintegerDocuments in the exhibit list (chronology and numbered layouts)
leftOutConfidentialobligatoriuintegerEvents left out because they are marked confidential
attachmentobligatoriuobject
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

Listează termenele unui dosar, cel mai apropiat primul, cu indicarea cui aparține fiecare termen și dacă a fost respectat sau a expirat.

Permisiune (scope):CASES_READ
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
Parametri de interogare
CâmpTipDescriere
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
Datele răspunsului (200)
CâmpTipDescriere
caseobligatoriuobject
deadlinesobligatoriuarray of objectSoonest first
countobligatoriuinteger
overdueCountobligatoriuinteger
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

Adaugă un termen la un dosar, la o dată dată sau calculat de la un fapt înregistrat.

Permisiune (scope):CASES_WRITE
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
Corpul cererii
CâmpTipDescriere
titleobligatoriustringWhat 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
Datele răspunsului (201)
CâmpTipDescriere
caseIdobligatoriustring
deadlineobligatoriuobject
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

Modifică un termen al unui dosar sau marchează-l ca îndeplinit ori din nou deschis.

Permisiune (scope):CASES_WRITE
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
deadlineIdobligatoriustring
Corpul cererii
CâmpTipDescriere
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
Datele răspunsului (200)
CâmpTipDescriere
caseIdobligatoriustring
deadlineobligatoriuobject
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

Listează faptele înregistrate într-un dosar, cu sursa lor, și faptele de care dosarul mai are nevoie.

Permisiune (scope):CASES_READ
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
caseobligatoriuobject
factsobligatoriuarray of object
countobligatoriuinteger
caseReadsobligatoriuobject | 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

Înregistrează un fapt într-un dosar sau corectează-l. Termenele calculate de la el se mută odată cu el.

Permisiune (scope):CASES_WRITE
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
Corpul cererii
CâmpTipDescriere
keyobligatoriustringThe 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
valueobligatoriustringThe 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)
Datele răspunsului (200)
CâmpTipDescriere
caseIdobligatoriustring
outcomeobligatoriu"recorded" | "corrected" | "unchanged"recorded: a new fact; corrected: a new value replaced the old one; unchanged: it already held this value
factobligatoriuobject
movedDeadlinesobligatoriuarray of objectOpen deadlines counted from the fact that moved with the correction, due days before and after
urlobligatoriustringWhere 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

Listează părțile unui dosar și rolurile pe care le prevede dosarul.

Permisiune (scope):CASES_READ
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
caseobligatoriuobject
partiesobligatoriuarray of object
countobligatoriuinteger
rolesobligatoriuarray 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

Adaugă o parte la un dosar, într-unul dintre rolurile sale.

Permisiune (scope):CASES_WRITE
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
Corpul cererii
CâmpTipDescriere
roleKeyobligatoriustringThe role the party has in the case, as one of the roles parties_list returns (e.g. "landlord")
partyTypeobligatoriu"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
nameobligatoriustringThe 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
Datele răspunsului (201)
CâmpTipDescriere
caseIdobligatoriustring
partyobligatoriuobject
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

Modifică datele unei părți dintr-un dosar.

Permisiune (scope):CASES_WRITE
Parametri de cale
CâmpTipDescriere
caseIdobligatoriustring
partyIdobligatoriustring
Corpul cererii
CâmpTipDescriere
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
Datele răspunsului (200)
CâmpTipDescriere
caseIdobligatoriustring
partyobligatoriuobject
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)"

Operațiuni

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

Obține starea și rezultatul unei cereri trimise cu Prefer sau Idempotency-Key.

Parametri de cale
CâmpTipDescriere
operationIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustringop_…
objectobligatoriu"operation"
operationIdobligatoriustringThe REST operation that was called, e.g. createRedlines
statusobligatoriu"running" | "awaiting_approval" | "succeeded" | "failed"
livemodeobligatoriuboolean
idempotencyKeystring | null
resultUrlobligatoriustringWhere to poll: /api/v1/operations/{id}
createdAtobligatoriustring (date-time)
completedAtobligatoriustring (date-time) | null
expiresAtobligatoriustring (date-time)
httpStatusobligatoriuinteger | null
resultobligatoriuanyThe data of the successful call
metaobject
errorobligatoriuobject | null
curl
curl "https://attorly.ai/api/v1/operations/op_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Webhookuri

GET/api/v1/webhook-endpointslistWebhookEndpoints

Lista endpointurilor webhook ale organizației și modului cheii.

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

Creați un endpoint webhook. Răspunsul conține secretul de semnare, afișat o singură dată.

Corpul cererii
CâmpTipDescriere
urlobligatoriustring (uri)HTTPS URL that receives the events
descriptionstring
enabledEventsobligatoriuarray 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.
Datele răspunsului (201)
CâmpTipDescriere
idobligatoriustringwe_…
objectobligatoriu"webhook_endpoint"
urlobligatoriustring
descriptionstring | null
enabledEventsobligatoriuarray of string
statusobligatoriu"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligatoriuboolean
includeSnapshotsobligatoriuboolean
apiVersionobligatoriustring
failingSincestring (date-time) | null
createdAtobligatoriustring (date-time)
updatedAtobligatoriustring (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

Obțineți un endpoint webhook.

Parametri de cale
CâmpTipDescriere
endpointIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustringwe_…
objectobligatoriu"webhook_endpoint"
urlobligatoriustring
descriptionstring | null
enabledEventsobligatoriuarray of string
statusobligatoriu"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligatoriuboolean
includeSnapshotsobligatoriuboolean
apiVersionobligatoriustring
failingSincestring (date-time) | null
createdAtobligatoriustring (date-time)
updatedAtobligatoriustring (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

Modificați URL-ul, evenimentele sau instantaneele unui endpoint ori dezactivați-l și reactivați-l.

Parametri de cale
CâmpTipDescriere
endpointIdobligatoriustring
Corpul cererii
CâmpTipDescriere
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustringwe_…
objectobligatoriu"webhook_endpoint"
urlobligatoriustring
descriptionstring | null
enabledEventsobligatoriuarray of string
statusobligatoriu"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligatoriuboolean
includeSnapshotsobligatoriuboolean
apiVersionobligatoriustring
failingSincestring (date-time) | null
createdAtobligatoriustring (date-time)
updatedAtobligatoriustring (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

Ștergeți un endpoint webhook și istoricul livrărilor sale.

Parametri de cale
CâmpTipDescriere
endpointIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustring
objectobligatoriu"webhook_endpoint"
deletedobligatoriutrue
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

Înlocuiți secretul de semnare. Cel vechi mai semnează 24 de ore.

Parametri de cale
CâmpTipDescriere
endpointIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustringwe_…
objectobligatoriu"webhook_endpoint"
urlobligatoriustring
descriptionstring | null
enabledEventsobligatoriuarray of string
statusobligatoriu"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligatoriuboolean
includeSnapshotsobligatoriuboolean
apiVersionobligatoriustring
failingSincestring (date-time) | null
createdAtobligatoriustring (date-time)
updatedAtobligatoriustring (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

Trimiteți un eveniment webhook_endpoint.test doar către acest endpoint.

Parametri de cale
CâmpTipDescriere
endpointIdobligatoriustring
Datele răspunsului (202)
CâmpTipDescriere
eventIdobligatoriustring
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

Lista livrărilor unui endpoint, cele mai noi primele, cu încercările și rezultatul.

Parametri de cale
CâmpTipDescriere
endpointIdobligatoriustring
Parametri de interogare
CâmpTipDescriere
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"

Evenimente

GET/api/v1/eventslistEvents

Lista evenimentelor din ultimele 30 de zile, cele mai noi primele.

Parametri de interogare
CâmpTipDescriere
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

Obțineți un eveniment așa cum îl primesc endpointurile webhook.

Parametri de cale
CâmpTipDescriere
eventIdobligatoriustring
Datele răspunsului (200)
CâmpTipDescriere
idobligatoriustringevt_… — also sent as the webhook-id header; deduplicate on it
objectobligatoriu"event"
typeobligatoriu"analysis.completed" | "analysis.failed" | "redlines.generated" | "due_diligence.report.completed" | "operation.succeeded" | "operation.failed" | …
apiVersionobligatoriustring
createdAtobligatoriustring (date-time)
livemodeobligatoriuboolean
dataobligatoriuobject
curl
curl "https://attorly.ai/api/v1/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/events/{eventId}/redeliveriesredeliverEvent

Retrimiteți un eveniment, către un endpoint sau către toate cele abonate la el.

Parametri de cale
CâmpTipDescriere
eventIdobligatoriustring
Corpul cererii
CâmpTipDescriere
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
Datele răspunsului (202)
CâmpTipDescriere
eventIdobligatoriustring
deliveriesScheduledobligatoriuinteger
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"
}'

Cont, utilizare și jurnale

GET/api/v1/organizationgetOrganization

Organizația cheii: plan, credite AI, jurisdicție implicită și ce poate face cheia.

Datele răspunsului (200)
CâmpTipDescriere
organizationobligatoriuobject
userobligatoriuobject
planobligatoriustringSTANDARD, PRO or ENTERPRISE
billingobligatoriuobject
defaultJurisdictionobligatoriustring | nullISO 3166-1 alpha-2 country used when a document names no governing law
credentialobligatoriuobject
appUrlobligatoriustring
curl
curl "https://attorly.ai/api/v1/organization" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/usagegetUsage

Cereri pe zi, cheie și operație, cu numărul de erori, prin REST și MCP.

Parametri de interogare
CâmpTipDescriere
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

Lista cererilor API ale organizației din ultimele 30 de zile, cele mai noi primele.

Parametri de interogare
CâmpTipDescriere
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

Cine a apelat ce, când și cu ce cheie. Pentru proprietarii și administratorii organizației.

Parametri de interogare
CâmpTipDescriere
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

Ștergeți toate obiectele, evenimentele și operațiile din modul de test ale organizației. Doar chei de test.

Datele răspunsului (200)
CâmpTipDescriere
objectobligatoriu"test_data_purge"
deletedobligatoriuobject
curl
curl -X DELETE "https://attorly.ai/api/v1/test-data" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"