Preskoči na glavni sadržaj

Razvojni programeri

Dokumentacija REST API-ja

API koji preko HTTPS-a razmjenjuje JSON, za Attorlyjevu pravnu umjetnu inteligenciju. Izvršava iste operacije kao MCP poslužitelj, s istim ključevima, ovlastima, ograničenjima i naplatom.

Brzi početak

Učitajte ugovor i analizirajte ga u četiri koraka.

  1. 1. Stvorite ključ

    Stvorite ključ u Postavke › Razvojni programeri i odaberite REST API. Isti ključ radi za MCP poslužitelj. Spremite ga u varijablu okruženja:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Učitajte dokument

    Pošaljite datoteku kao multipart/form-data. data.id u odgovoru je identifikator dokumenta. analyze=false sprema ga bez pokretanja analize u pozadini jer sljedeći korak pokreće svoju.

    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. Analizirajte ga

    Prefer: wait=30 čeka rezultat do 30 sekundi. Dovršena analiza vraća se kao 200 s rezultatom u data. Ako traje dulje, dobivate 202 Accepted sa zaglavljem Location koje pokazuje na operaciju.

    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. Preuzmite rezultat

    Ispitujte operaciju dok joj status ne bude succeeded ili failed. Analiza je u result. Retry-After kaže koliko sekundi čekati između upita.

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

Autentifikacija

Pošaljite vjerodajnicu u zaglavlju Authorization kao Bearer token. Ključevi iz Postavke › Razvojni programeri počinju s lbmcp_ i rade u paketima Pro i Enterprise, za REST API i MCP poslužitelj. Ključevi organizacije u paketu Enterprise počinju s atly_ (atly_rk_ za ograničene ključeve, atly_test_ za testni način); stariji ključevi lb_ i dalje rade. Aplikacije koje djeluju u ime osobe koriste OAuth.

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

Ovlasti (scopes)

Svaka krajnja točka zahtijeva ovlasti navedene pokraj nje. Ključ bez njih dobiva 403 insufficient_scope, a requiredScopes u pogrešci navodi sve ovlasti koje poziv treba. API ključevi organizacije i OAuth koriste ove nazive:

OvlastOvlast API ključa organizacije
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

Pogreške

Sve pogreške imaju isti oblik: stalni kod za programsku logiku, poruku za ljude i requestId za podršku.

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

Svaki kod objašnjen je, s uputama što učiniti, na stranici s kodovima pogrešaka

Verzije

API ima verzije po datumu. Pošaljite Attorly-Version da biste odabrali verziju za jedan zahtjev; bez njega se koristi verzija s kojom je ključ stvoren (ključevi stvoreni prije verzioniranja koriste 2026-10-01). Svaki odgovor navodi koja je verzija odgovorila. Nekompatibilne promjene dolaze samo u novoj verziji, a dnevnik promjena ih navodi.

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

Idempotentnost

Uz zahtjeve POST, PATCH i DELETE šaljite zaglavlje Idempotency-Key, primjerice UUID. Ponovni pokušaj s istim ključem i istim zahtjevom dobiva prvi odgovor s Idempotent-Replayed: true, a posao se ne izvodi i ne naplaćuje ponovno. Ključ ponovno upotrijebljen za drugi zahtjev dobiva 422 idempotency_key_reused, a ključ koji se još izvodi dobiva 409 ili, za dugotrajni poziv, istu operaciju. Pogreške poslužitelja se ne spremaju, pa se ponovni pokušaj izvodi iznova. Ključevi se čuvaju 24 sata.

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

Dugotrajni zahtjevi

Od verzije 2026-11-01 potpune analize, redlineovi, planovi pregovaranja, tijekovi rada, izvješća dubinske analize i AI nacrti odmah odgovaraju 202 Accepted s operacijom. Pošaljite Prefer: wait=30 da biste prvo čekali rezultat do 30 sekundi (najviše 60) ili Prefer: respond-async da biste tražili 202 za bilo koje pisanje. Provjeravajte Location dok status ne bude succeeded ili failed ili se pretplatite na operation.succeeded. Rezultati se čuvaju 24 sata. Organizacija istodobno može izvoditi najviše 5 dugotrajnih AI operacija; ostale dobivaju 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", … } }

Straničenje

Popisi vraćaju { object: "list", data, hasMore, nextCursor } i primaju limit (od 1 do 100, zadano 20) i cursor. Za sljedeću stranicu pošaljite nextCursor kao cursor. Na posljednjoj stranici nextCursor je null. Kursor ostaje valjan i kad se dodaju nove stavke.

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…

Ograničenja zahtjeva

Zahtjev se broji u nekoliko prozora: satno ograničenje ključa, 300 u minuti po osobi, 600 u minuti po organizaciji, ograničenje u minuti po ključu za čitanje, pisanje i AI pozive te vlastito ograničenje svake operacije. REST i MCP dijele iste brojače. Zaglavlja RateLimit-Policy i RateLimit prikazuju sve prozore; X-RateLimit-* prikazuje onaj najbliži iscrpljenju. Iznad ograničenja dobivate 429 s Retry-After.

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

Webhookovi

Stvorite krajnju točku s POST /api/v1/webhook-endpoints da biste dobili obavijest kad posao završi, umjesto da provjeravate. Attorly šalje POST s JSON događajem potpisanim prema Standard Webhooks tajnom whsec_ krajnje točke. Provjerite potpis prije nego što povjerujete sadržaju, odgovorite 2xx unutar 15 sekundi i uklanjajte duplikate po webhook-id: neuspjele isporuke ponavljaju se 72 sata. Možete obnoviti tajnu, poslati testni događaj i vidjeti svaku isporuku.

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

Testni način

Testni ključevi (atly_test_…) dosežu svaku krajnju točku, ali rade s odvojenim testnim podacima i vraćaju fiksne primjere rezultata: AI se ne pokreće i krediti se ne troše. Testni ključ nikad ne vidi stvarne podatke. Upišite u bilo koje tekstualno polje čarobnu vrijednost poput __fail_credits__, __fail_consent__ ili __slow__ da biste dobili tu pogrešku ili kašnjenje. DELETE /api/v1/test-data briše sve što su testni ključevi stvorili.

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

Aplikacije koje djeluju u ime korisnika Attorlyja prijavljuju se putem OAuth 2.1: otkrivanje na /.well-known/oauth-authorization-server, dinamička registracija klijenata i tijek autorizacijskog koda s PKCE (S256). Zatražite resource=https://attorly.ai/api/v1 da biste dobili token za REST API; token izdan za MCP poslužitelj ovdje se odbija. Dodajte offline_access da biste dobili token za osvježavanje. Osoba odabire organizaciju i na zaslonu za pristanak može suziti ovlasti.

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

Naplata

Operacije s AI-jem troše iste AI kredite kao aplikacija Attorly, iz novčanika vlasnika ključa ili njegove organizacije, bez obzira pozivate li ih putem REST-a ili MCP-a. Kad krediti ponestanu, dobivate 402 insufficient_credits. Pozivi u testnom načinu su besplatni.

Planovi

API je uključen u planove Pro i Enterprise. Ako plan vlasnika ključa više ne uključuje pristup API-ju ili je vlasnik napustio organizaciju, zahtjevi se odbijaju s 403.

Referenca

Svaka operacija, generirana iz OpenAPI dokumenta koji poslužuje sam API. Putanje su relativne u odnosu na https://attorly.ai. Uspješni odgovori omataju rezultat u data. Opisi polja su na engleskom.

Dokumenti

GET/api/v1/documentslistDocuments

Prikaži spremljene dokumente koje ključ može čitati, od najnovijih.

Ovlast:DOCUMENTS_READ
Parametri upita
PoljeVrstaOpis
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

Prenesi dokument kao multipart/form-data ili kao JSON sa sadržajem u base64 ili običnim tekstom. Analizira se u pozadini, osim ako je analyze false.

Ovlast:DOCUMENTS_WRITETroši AI kreditePrima učitavanje datoteka
Tijelo zahtjeva
PoljeVrstaOpis
filenameobaveznostringThe 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
Podaci odgovora (201)
PoljeVrstaOpis
idobaveznostring
nameobaveznostring
originalNameobaveznostring
typeobavezno"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
sizeobaveznointeger
statusobavezno"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
analysisQueuedobaveznobooleantrue when the background analysis was started
createdAtobaveznostringISO 8601 date-time
urlobaveznostringWhere 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

Pretraživanje teksta dokumenata koje ključ smije čitati, po značenju i po točnim riječima.

Ovlast:DOCUMENTS_READ
Parametri upita
PoljeVrstaOpis
queryobaveznostringWhat 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

Dohvati dokument, stanje njegove obrade i najnoviju analizu.

Ovlast:DOCUMENTS_READ
Parametri putanje
PoljeVrstaOpis
documentIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostring
nameobaveznostring
originalNameobaveznostring
typeobavezno"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
mimeTypeobaveznostring
sizeobaveznointeger
statusobavezno"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
archivedobaveznoboolean
ownedByYouobaveznoboolean
versionNumberobaveznointeger | 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.
createdAtobaveznostringISO 8601 date-time
updatedAtobaveznostringISO 8601 date-time
fileAvailableobaveznobooleanfalse when the stored file can no longer be read
governingLawRequiredobaveznobooleantrue when the analysis is held until a governing law is chosen for the document in Attorly
latestAnalysisobaveznoobject | null
urlobaveznostringWhere 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

Zahtjev za brisanje dokumenta čiji ste vlasnik. Dokument se briše tek kada brisanje odobrite u Attorlyju.

Ovlast:DOCUMENTS_DELETE
Parametri putanje
PoljeVrstaOpis
documentIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostring
deletedobaveznobooleantrue only when the document is gone
statusobavezno"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

Analizira dokument ili tekst poslan u zahtjevu. mode je full (pohranjeni dokument) ili quick.

Ovlast:DOCUMENTS_ANALYZEDOCUMENTS_READTroši AI kredite

Polje mode u tijelu bira jednu od mogućnosti: mode: full, mode: quick.

Tijelo zahtjeva
PoljeVrstaOpis
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

Popis spremljenih analiza dokumenta, od najnovije.

Ovlast:DOCUMENTS_READ
Parametri putanje
PoljeVrstaOpis
documentIdobaveznostring
Parametri upita
PoljeVrstaOpis
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

Analizira pohranjeni dokument.

Ovlast:DOCUMENTS_ANALYZEDOCUMENTS_READTroši AI kredite
Parametri putanje
PoljeVrstaOpis
documentIdobaveznostring

Polje mode u tijelu bira jednu od mogućnosti: mode: full, mode: quick.

Tijelo zahtjeva
PoljeVrstaOpis
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

Izdvaja čisti tekst pohranjenog PDF ili DOCX dokumenta.

Ovlast:DOCUMENTS_READ
Parametri putanje
PoljeVrstaOpis
documentIdobaveznostring
Parametri upita
PoljeVrstaOpis
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
Podaci odgovora (200)
PoljeVrstaOpis
textobaveznostringThe document text from offset (untrusted content)
documentNameobaveznostring
documentTypeobaveznostring
mimeTypeobaveznostring | null
characterCountobaveznointegerCharacters in the whole document
wordCountobaveznointegerWords in the whole document
offsetobaveznointeger
nextOffsetobaveznointeger | nullPass as offset to read on; null when the text ends here
truncatedobaveznobooleantrue 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

Dohvat spremljene analize: sažetak, rizik, ključni uvjeti, klauzule i preporuke.

Ovlast:DOCUMENTS_READ
Parametri putanje
PoljeVrstaOpis
analysisIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostring
documentIdobaveznostring
documentNameobaveznostring
summaryobaveznostring | null
riskLevelobavezno"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskScoreobaveznonumber
keyTermsobaveznoarray of any
clausesobaveznoarray of any
recommendationsobaveznoarray of any
modeobaveznostringSINGLE or CONSENSUS
createdAtobaveznostringISO 8601 date-time
urlobaveznostring
curl
curl "https://attorly.ai/api/v1/analyses/your_analysisId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/comparisonscreateComparison

Uspoređuje dva dokumenta ili teksta redak po redak.

Ovlast:DOCUMENTS_READ
Tijelo zahtjeva
PoljeVrstaOpis
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
Podaci odgovora (200)
PoljeVrstaOpis
differencesobaveznoarray of object
summaryobaveznoobject
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"
}'

Klauzule

GET/api/v1/clausessearchClauses

Pretražuje knjižnicu klauzula.

Ovlast:CLAUSES_READ
Parametri upita
PoljeVrstaOpis
queryobaveznostring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
Podaci odgovora (200)
PoljeVrstaOpis
clausesobaveznoarray of object
countobaveznointeger
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

Procjenjuje rizik klauzule.

Ovlast:CLAUSES_READ
Tijelo zahtjeva
PoljeVrstaOpis
clauseTextobaveznostring
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" | …
Podaci odgovora (200)
PoljeVrstaOpis
clauseTextstring
clauseTypeobaveznostring
jurisdictionobaveznostring
overallRiskScoreobaveznonumber
riskLevelobavezno"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskFactorsobaveznoarray of object
recommendationsobaveznoarray 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

Uspoređuje klauzulu s uobičajenim tržišnim formulacijama.

Ovlast:CLAUSES_READ
Tijelo zahtjeva
PoljeVrstaOpis
clauseTextobaveznostring
categoryobavezno"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
Podaci odgovora (200)
PoljeVrstaOpis
inputClauseobaveznostring
categoryobaveznostring
marketStandardsobaveznoarray of object
comparisonobaveznoobject
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

Provjerava klauzulu prema playbooku.

Ovlast:CLAUSES_READ
Tijelo zahtjeva
PoljeVrstaOpis
clauseTextobaveznostring
playbookIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
playbookNameobaveznostring
compliantobaveznoboolean
violationsobaveznoarray of string
warningsobaveznoarray of string
rulesCheckedobaveznointeger
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"
}'

Istraživanje

POST/api/v1/research/searchessearchResearch

Pretražuje pravne izvore poput Lovdata, EUR-Lex i CourtListener.

Ovlast:RESEARCH_READTroši AI kredite
Tijelo zahtjeva
PoljeVrstaOpis
queryobaveznostring
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
Podaci odgovora (200)
PoljeVrstaOpis
queryobaveznostring
jurisdictionobaveznostring
resultsobaveznoarray of object
totalCountobaveznointegerResults 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

Pronalazi propis prema citatu.

Ovlast:RESEARCH_READTroši AI kredite
Parametri upita
PoljeVrstaOpis
citationobaveznostring
jurisdictionobaveznostringISO 3166-1 alpha-2 country code, or "EU"
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostring
titleobaveznostring
sourceobaveznostring
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"

Prijedlozi izmjena

POST/api/v1/redlinescreateRedlines

Generira prijedloge izmjena za dokument ili tekst.

Ovlast:REDLINES_GENERATETroši AI kredite
Tijelo zahtjeva
PoljeVrstaOpis
documentIdstring
contentstring
partyRoleobavezno"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
Podaci odgovora (200)
PoljeVrstaOpis
changesobaveznoarray of object
summaryobject
negotiationNotesarray of string
statisticsobaveznoobject
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

Prihvaća ili odbija predložene izmjene u dokumentu.

Ovlast:REDLINES_GENERATE
Parametri putanje
PoljeVrstaOpis
documentIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
changesobaveznoarray of object
Podaci odgovora (200)
PoljeVrstaOpis
acceptedobaveznointeger
rejectedobaveznointeger
messageobaveznostring
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"
    }
  ]
}'

Pregovori

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

Analizira pregovaračku poziciju.

Ovlast:NEGOTIATIONS_READTroši AI kredite
Tijelo zahtjeva
PoljeVrstaOpis
documentIdstring
contentstring
partyRoleobavezno"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
Podaci odgovora (200)
PoljeVrstaOpis
overallPositionobaveznostringFAVORABLE, BALANCED or UNFAVORABLE
positionsobaveznoarray 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

Izrađuje pregovarački playbook na temelju strategije.

Ovlast:NEGOTIATIONS_READTroši AI kredite
Tijelo zahtjeva
PoljeVrstaOpis
strategyobaveznoobject
contextobject
Podaci odgovora (200)
PoljeVrstaOpis
playbookobaveznoarray of object
anticipatedObjectionsobaveznoarray of object
recommendationsobaveznoarray of string
summaryobaveznoobject
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"
    ]
  }
}'

Tijekovi rada

GET/api/v1/workflows/templateslistWorkflowTemplates

Navodi predloške tijekova rada.

Ovlast:WORKFLOWS_EXECUTE
Parametri upita
PoljeVrstaOpis
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

Popis izvođenja tijekova rada, od najnovijeg, po želji za jedan projekt ili status.

Ovlast:WORKFLOWS_EXECUTE
Parametri upita
PoljeVrstaOpis
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

Pokreće tijek rada na projektu dubinske analize.

Ovlast:WORKFLOWS_EXECUTETroši AI kredite
Tijelo zahtjeva
PoljeVrstaOpis
templateIdobaveznostring
projectIdobaveznostring
inputsobaveznoobject
optionsobject
Podaci odgovora (202)
PoljeVrstaOpis
executionIdobaveznostring
templateIdobaveznostring
templateNameobaveznostring
statusobaveznostring
startedAtobaveznostringISO 8601 date-time
messageobaveznostring
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

Dohvaća status izvođenja tijeka rada.

Ovlast:WORKFLOWS_EXECUTE
Parametri putanje
PoljeVrstaOpis
executionIdobaveznostring
Parametri upita
PoljeVrstaOpis
includeStepsboolean
Podaci odgovora (200)
PoljeVrstaOpis
executionIdobaveznostring
templateNameobaveznostring
statusobaveznostring
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"

Dubinska analiza

GET/api/v1/due-diligence/projectslistDueDiligenceProjects

Popis projekata dubinske analize, od najnovijeg.

Ovlast:DUE_DILIGENCE_FULL
Parametri upita
PoljeVrstaOpis
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

Izrađuje projekt dubinske analize.

Ovlast:DUE_DILIGENCE_FULL
Tijelo zahtjeva
PoljeVrstaOpis
nameobaveznostring
dealTypeobavezno"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
Podaci odgovora (201)
PoljeVrstaOpis
projectIdobaveznostring
nameobaveznostring
projectTypeobaveznostring
statusobaveznostring
createdAtobaveznostringISO 8601 date-time
messageobaveznostring
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

Dohvat projekta dubinske analize s brojem dokumenata i nalaza.

Ovlast:DUE_DILIGENCE_FULL
Parametri putanje
PoljeVrstaOpis
projectIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostring
nameobaveznostring
descriptionobaveznostring | null
projectTypeobaveznostring
statusobaveznostring
priorityobaveznostring
targetCompanyobaveznostring | null
dueDateobaveznostring | null
documentCountobaveznointeger
findingCountobaveznointeger
createdAtobaveznostringISO 8601 date-time
updatedAtobaveznostringISO 8601 date-time
completedAtobaveznostring | 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

Dodaje dokumente u projekt dubinske analize.

Ovlast:DUE_DILIGENCE_FULL
Parametri putanje
PoljeVrstaOpis
projectIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
documentIdsobaveznoarray of string
categorystring
Podaci odgovora (200)
PoljeVrstaOpis
projectIdobaveznostring
documentsAddedobaveznointeger
totalDocumentsobaveznointeger
categoryobaveznostring
messageobaveznostring
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

Navodi nalaze projekta dubinske analize.

Ovlast:DUE_DILIGENCE_FULL
Parametri putanje
PoljeVrstaOpis
projectIdobaveznostring
Parametri upita
PoljeVrstaOpis
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
Podaci odgovora (200)
PoljeVrstaOpis
projectIdobaveznostring
projectNameobaveznostring
findingsobaveznoarray of object
riskSummaryobaveznoobjectNumber of findings per severity
totalFindingsobaveznointeger
pendingProposalsobaveznointegerRisks 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

Generira izvješće dubinske analize.

Ovlast:DUE_DILIGENCE_FULL
Parametri putanje
PoljeVrstaOpis
projectIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
formatobavezno"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
Podaci odgovora (201)
PoljeVrstaOpis
reportIdobaveznostring
projectIdobaveznostring
projectNamestring
formatobavezno"pdf" | "markdown"
statusobaveznostring
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
markdownobaveznostring
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"
}'

Predlošci i nacrti

GET/api/v1/templateslistTemplates

Navodi predloške dokumenata.

Ovlast:TEMPLATES_READ
Parametri upita
PoljeVrstaOpis
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

Izrađuje nacrt iz predloška (mode template) ili pomoću umjetne inteligencije (mode ai).

Ovlast:TEMPLATES_DRAFTTroši AI kredite

Polje mode u tijelu bira jednu od mogućnosti: mode: template, mode: ai.

Tijelo zahtjeva
PoljeVrstaOpis
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"
  }
}'

Predmeti

GET/api/v1/caseslistCases

Prikaži vlastite predmete, od nedavno promijenjenih.

Ovlast:CASES_READ
Parametri upita
PoljeVrstaOpis
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

Dohvat vremenske crte predmeta: svaki događaj s datumom, dokazima i stajalištem druge strane.

Ovlast:CASES_READ
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
caseobaveznoobject
eventsobaveznoarray of objectIn date order
countobaveznointeger
needsReviewCountobaveznointegerEvents an AI added that no person has confirmed
deletionRequestedCountobaveznointegerEvents 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

Dodaj događaj na vremensku crtu predmeta.

Ovlast:CASES_WRITE
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
titleobaveznostringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenobaveznoobjectWhen 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
Podaci odgovora (201)
PoljeVrstaOpis
caseIdobaveznostring
eventobaveznoobject
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

Promijeni događaj na vremenskoj crti predmeta ili potvrdi događaj koji je dodao AI.

Ovlast:CASES_WRITE
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
eventIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
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
Podaci odgovora (200)
PoljeVrstaOpis
caseIdobaveznostring
eventobaveznoobject
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

Zatraži brisanje događaja s vremenske crte predmeta. Događaj se briše tek kada ga vlasnik odobri u Attorlyju.

Ovlast:CASES_WRITE
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
eventIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
caseIdobaveznostring
idobaveznostring
deletedobaveznobooleantrue only when the event is gone
statusobavezno"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

Izvezi vremensku crtu predmeta kao PDF, Word, ODT, Excel ili PowerPoint datoteku.

Ovlast:CASES_READ
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
layoutobavezno"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
formatobavezno"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
Podaci odgovora (200)
PoljeVrstaOpis
caseIdobaveznostring
layoutobavezno"overview" | "chronology" | "numbered" | "visual"
formatobavezno"pdf" | "docx" | "odt" | "xlsx" | "pptx"
localeobaveznostringThe language the file is written in
eventCountobaveznointegerEvents in the file
exhibitCountobaveznointegerDocuments in the exhibit list (chronology and numbered layouts)
leftOutConfidentialobaveznointegerEvents left out because they are marked confidential
attachmentobaveznoobject
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

Prikaži rokove predmeta, od najbližeg, s time čiji je koji rok i je li ispunjen ili prekoračen.

Ovlast:CASES_READ
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
Parametri upita
PoljeVrstaOpis
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
Podaci odgovora (200)
PoljeVrstaOpis
caseobaveznoobject
deadlinesobaveznoarray of objectSoonest first
countobaveznointeger
overdueCountobaveznointeger
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

Dodaj rok predmetu, na zadani datum ili računat od zabilježene činjenice.

Ovlast:CASES_WRITE
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
titleobaveznostringWhat 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
Podaci odgovora (201)
PoljeVrstaOpis
caseIdobaveznostring
deadlineobaveznoobject
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

Promijeni rok predmeta ili ga označi kao ispunjen ili ponovno otvoren.

Ovlast:CASES_WRITE
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
deadlineIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
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
Podaci odgovora (200)
PoljeVrstaOpis
caseIdobaveznostring
deadlineobaveznoobject
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

Prikaži činjenice zabilježene u predmetu, s njihovim izvorom, i činjenice koje predmetu još trebaju.

Ovlast:CASES_READ
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
caseobaveznoobject
factsobaveznoarray of object
countobaveznointeger
caseReadsobaveznoobject | 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

Zabilježi činjenicu u predmetu ili je ispravi. Rokovi računati od nje pomiču se s njom.

Ovlast:CASES_WRITE
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
keyobaveznostringThe 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
valueobaveznostringThe 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)
Podaci odgovora (200)
PoljeVrstaOpis
caseIdobaveznostring
outcomeobavezno"recorded" | "corrected" | "unchanged"recorded: a new fact; corrected: a new value replaced the old one; unchanged: it already held this value
factobaveznoobject
movedDeadlinesobaveznoarray of objectOpen deadlines counted from the fact that moved with the correction, due days before and after
urlobaveznostringWhere 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

Prikaži stranke predmeta i uloge koje predmet predviđa.

Ovlast:CASES_READ
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
caseobaveznoobject
partiesobaveznoarray of object
countobaveznointeger
rolesobaveznoarray 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

Dodaj stranku predmetu u jednoj od njegovih uloga.

Ovlast:CASES_WRITE
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
roleKeyobaveznostringThe role the party has in the case, as one of the roles parties_list returns (e.g. "landlord")
partyTypeobavezno"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
nameobaveznostringThe 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
Podaci odgovora (201)
PoljeVrstaOpis
caseIdobaveznostring
partyobaveznoobject
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

Promijeni podatke stranke u predmetu.

Ovlast:CASES_WRITE
Parametri putanje
PoljeVrstaOpis
caseIdobaveznostring
partyIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
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
Podaci odgovora (200)
PoljeVrstaOpis
caseIdobaveznostring
partyobaveznoobject
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)"

Operacije

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

Dohvati stanje i rezultat zahtjeva poslanog s Prefer ili Idempotency-Key.

Parametri putanje
PoljeVrstaOpis
operationIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostringop_…
objectobavezno"operation"
operationIdobaveznostringThe REST operation that was called, e.g. createRedlines
statusobavezno"running" | "awaiting_approval" | "succeeded" | "failed"
livemodeobaveznoboolean
idempotencyKeystring | null
resultUrlobaveznostringWhere to poll: /api/v1/operations/{id}
createdAtobaveznostring (date-time)
completedAtobaveznostring (date-time) | null
expiresAtobaveznostring (date-time)
httpStatusobaveznointeger | null
resultobaveznoanyThe data of the successful call
metaobject
errorobaveznoobject | null
curl
curl "https://attorly.ai/api/v1/operations/op_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Webhookovi

GET/api/v1/webhook-endpointslistWebhookEndpoints

Popis krajnjih točaka webhooka organizacije i načina ključa.

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

Stvaranje krajnje točke webhooka. Odgovor sadrži tajnu za potpisivanje, prikazanu samo jednom.

Tijelo zahtjeva
PoljeVrstaOpis
urlobaveznostring (uri)HTTPS URL that receives the events
descriptionstring
enabledEventsobaveznoarray 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.
Podaci odgovora (201)
PoljeVrstaOpis
idobaveznostringwe_…
objectobavezno"webhook_endpoint"
urlobaveznostring
descriptionstring | null
enabledEventsobaveznoarray of string
statusobavezno"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobaveznoboolean
includeSnapshotsobaveznoboolean
apiVersionobaveznostring
failingSincestring (date-time) | null
createdAtobaveznostring (date-time)
updatedAtobaveznostring (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

Dohvat krajnje točke webhooka.

Parametri putanje
PoljeVrstaOpis
endpointIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostringwe_…
objectobavezno"webhook_endpoint"
urlobaveznostring
descriptionstring | null
enabledEventsobaveznoarray of string
statusobavezno"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobaveznoboolean
includeSnapshotsobaveznoboolean
apiVersionobaveznostring
failingSincestring (date-time) | null
createdAtobaveznostring (date-time)
updatedAtobaveznostring (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

Promjena URL-a, događaja ili snimki krajnje točke ili njezino isključivanje i uključivanje.

Parametri putanje
PoljeVrstaOpis
endpointIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostringwe_…
objectobavezno"webhook_endpoint"
urlobaveznostring
descriptionstring | null
enabledEventsobaveznoarray of string
statusobavezno"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobaveznoboolean
includeSnapshotsobaveznoboolean
apiVersionobaveznostring
failingSincestring (date-time) | null
createdAtobaveznostring (date-time)
updatedAtobaveznostring (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

Brisanje krajnje točke webhooka i povijesti isporuka.

Parametri putanje
PoljeVrstaOpis
endpointIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostring
objectobavezno"webhook_endpoint"
deletedobaveznotrue
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

Zamjena tajne za potpisivanje. Stara potpisuje još 24 sata.

Parametri putanje
PoljeVrstaOpis
endpointIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostringwe_…
objectobavezno"webhook_endpoint"
urlobaveznostring
descriptionstring | null
enabledEventsobaveznoarray of string
statusobavezno"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobaveznoboolean
includeSnapshotsobaveznoboolean
apiVersionobaveznostring
failingSincestring (date-time) | null
createdAtobaveznostring (date-time)
updatedAtobaveznostring (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

Slanje događaja webhook_endpoint.test samo ovoj krajnjoj točki.

Parametri putanje
PoljeVrstaOpis
endpointIdobaveznostring
Podaci odgovora (202)
PoljeVrstaOpis
eventIdobaveznostring
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

Popis isporuka krajnje točke, od najnovije, s pokušajima i ishodom.

Parametri putanje
PoljeVrstaOpis
endpointIdobaveznostring
Parametri upita
PoljeVrstaOpis
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"

Događaji

GET/api/v1/eventslistEvents

Popis događaja iz posljednjih 30 dana, od najnovijeg.

Parametri upita
PoljeVrstaOpis
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

Dohvat događaja onakvog kakvog ga primaju krajnje točke webhooka.

Parametri putanje
PoljeVrstaOpis
eventIdobaveznostring
Podaci odgovora (200)
PoljeVrstaOpis
idobaveznostringevt_… — also sent as the webhook-id header; deduplicate on it
objectobavezno"event"
typeobavezno"analysis.completed" | "analysis.failed" | "redlines.generated" | "due_diligence.report.completed" | "operation.succeeded" | "operation.failed" | …
apiVersionobaveznostring
createdAtobaveznostring (date-time)
livemodeobaveznoboolean
dataobaveznoobject
curl
curl "https://attorly.ai/api/v1/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/events/{eventId}/redeliveriesredeliverEvent

Ponovno slanje događaja jednoj krajnjoj točki ili svima koje su ga pretplatile.

Parametri putanje
PoljeVrstaOpis
eventIdobaveznostring
Tijelo zahtjeva
PoljeVrstaOpis
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
Podaci odgovora (202)
PoljeVrstaOpis
eventIdobaveznostring
deliveriesScheduledobaveznointeger
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"
}'

Račun, korištenje i zapisnici

GET/api/v1/organizationgetOrganization

Organizacija ključa: paket, AI krediti, zadana nadležnost i što ključ smije.

Podaci odgovora (200)
PoljeVrstaOpis
organizationobaveznoobject
userobaveznoobject
planobaveznostringSTANDARD, PRO or ENTERPRISE
billingobaveznoobject
defaultJurisdictionobaveznostring | nullISO 3166-1 alpha-2 country used when a document names no governing law
credentialobaveznoobject
appUrlobaveznostring
curl
curl "https://attorly.ai/api/v1/organization" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/usagegetUsage

Zahtjevi po danu, ključu i operaciji s brojem pogrešaka, putem REST-a i MCP-a.

Parametri upita
PoljeVrstaOpis
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

Popis API zahtjeva organizacije iz posljednjih 30 dana, od najnovijeg.

Parametri upita
PoljeVrstaOpis
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

Tko je što pozvao, kada i kojim ključem. Za vlasnike i administratore organizacije.

Parametri upita
PoljeVrstaOpis
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

Brisanje svih objekata, događaja i operacija testnog načina organizacije. Samo testni ključevi.

Podaci odgovora (200)
PoljeVrstaOpis
objectobavezno"test_data_purge"
deletedobaveznoobject
curl
curl -X DELETE "https://attorly.ai/api/v1/test-data" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"