Pāriet uz galveno saturu

Izstrādātājiem

REST API dokumentācija

JSON pa HTTPS saskarne Attorly juridiskajam MI. Tā izpilda tās pašas darbības kā MCP serveris, ar tām pašām atslēgām, tiesībām, ierobežojumiem un norēķiniem.

Ātrā sākšana

Augšupielādējiet līgumu un analizējiet to četrās darbībās.

  1. 1. Izveidojiet atslēgu

    Izveidojiet atslēgu sadaļā Iestatījumi › Izstrādātājiem un izvēlieties REST API. Tā pati atslēga der MCP serverim. Glabājiet to vides mainīgajā:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Augšupielādējiet dokumentu

    Nosūtiet failu kā multipart/form-data. Atbildes data.id ir dokumenta ID. analyze=false to saglabā, nepalaižot fona analīzi, jo nākamā darbība palaiž savu.

    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. Analizējiet to

    Prefer: wait=30 gaida rezultātu līdz 30 sekundēm. Pabeigta analīze tiek atgriezta ar kodu 200, rezultāts laukā data. Ja tā ilgst ilgāk, saņemat 202 Accepted ar Location galveni, kas norāda uz darbību.

    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. Saņemiet rezultātu

    Pārbaudiet darbību, līdz tās statuss ir succeeded vai failed. Analīze ir laukā result. Retry-After norāda, cik sekundes gaidīt starp pārbaudēm.

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

Autentifikācija

Nosūtiet akreditācijas datus galvenē Authorization kā Bearer marķieri. Atslēgas no sadaļas Iestatījumi › Izstrādātājiem sākas ar lbmcp_ un darbojas plānos Pro un Enterprise gan REST API, gan MCP serverim. Enterprise organizācijas atslēgas sākas ar atly_ (ierobežotās atslēgas atly_rk_, testa režīms atly_test_); vecākās lb_ atslēgas joprojām darbojas. Lietotnes, kas rīkojas personas vārdā, izmanto OAuth.

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

Tiesības (scopes)

Katram galapunktam vajadzīgas blakus norādītās tiesības. Atslēga bez tām saņem 403 insufficient_scope, un kļūdas lauks requiredScopes uzskaita visas izsaukumam vajadzīgās tiesības. Organizācijas API atslēgas un OAuth izmanto šos nosaukumus:

TiesībasOrganizācijas API atslēgas tiesības
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

Kļūdas

Visām kļūdām ir vienāda forma: nemainīgs kods programmas loģikai, ziņojums cilvēkiem un requestId atbalsta dienestam.

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

Katrs kods un kas jādara ir paskaidrots kļūdu kodu lapā

Versijas

API versijas ir datētas. Nosūtiet Attorly-Version, lai izvēlētos versiju vienam pieprasījumam; bez tā pieprasījums izmanto versiju, ar kuru tika izveidota atslēga (pirms versiju ieviešanas izveidotās atslēgas izmanto 2026-10-01). Katra atbilde norāda, kura versija atbildēja. Nesaderīgas izmaiņas nāk tikai jaunā versijā, un izmaiņu žurnāls tās uzskaita.

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

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

Idempotence

POST, PATCH un DELETE pieprasījumos sūtiet galveni Idempotency-Key, piemēram, UUID. Atkārtots mēģinājums ar to pašu atslēgu un to pašu pieprasījumu saņem pirmo atbildi ar Idempotent-Replayed: true, un darbs netiek izpildīts vai iekasēts vēlreiz. Citam pieprasījumam atkārtoti izmantota atslēga saņem 422 idempotency_key_reused, bet vēl izpildē esoša saņem 409 vai, ilgam izsaukumam, to pašu operāciju. Servera kļūdas netiek saglabātas, tāpēc atkārtojums tiek izpildīts no jauna. Atslēgas glabā 24 stundas.

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

Ilgi pieprasījumi

Sākot ar versiju 2026-11-01, pilnas analīzes, redline labojumi, sarunu plāni, darbplūsmas, due diligence atskaites un AI melnraksti uzreiz atbild ar 202 Accepted un operāciju. Nosūtiet Prefer: wait=30, lai vispirms gaidītu rezultātu līdz 30 sekundēm (ne vairāk kā 60), vai Prefer: respond-async, lai prasītu 202 jebkurai rakstīšanai. Vaicājiet Location, līdz statuss ir succeeded vai failed, vai abonējiet operation.succeeded. Rezultātus glabā 24 stundas. Organizācija vienlaikus var izpildīt ne vairāk kā 5 ilgas AI operācijas; pārējās saņem 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", … } }

Lapošana

Saraksti atgriež { object: "list", data, hasMore, nextCursor } un pieņem limit (1–100, noklusējumā 20) un cursor. Lai iegūtu nākamo lapu, nosūtiet nextCursor kā cursor. Pēdējā lapā nextCursor ir null. Kursors paliek derīgs arī tad, ja tiek pievienoti jauni ieraksti.

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…

Pieprasījumu ierobežojumi

Pieprasījums tiek skaitīts vairākos logos: atslēgas stundas limits, 300 minūtē uz personu, 600 minūtē uz organizāciju, minūtes limits uz atslēgu lasīšanai, rakstīšanai un AI izsaukumiem, un katras operācijas savs limits. REST un MCP izmanto tos pašus skaitītājus. Galvenes RateLimit-Policy un RateLimit rāda visus logus; X-RateLimit-* rāda to, kas ir vistuvāk izsmelšanai. Pārsniedzot limitu, saņemat 429 ar 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

Tīmekļa aizķeres

Izveidojiet galapunktu ar POST /api/v1/webhook-endpoints, lai saņemtu ziņu, kad darbs ir pabeigts, nevis vaicātu. Attorly nosūta POST ar JSON notikumu, kas parakstīts saskaņā ar Standard Webhooks ar galapunkta whsec_ noslēpumu. Pārbaudiet parakstu, pirms uzticaties saturam, atbildiet ar 2xx 15 sekunžu laikā un izņemiet dublikātus pēc webhook-id: neveiksmīgas piegādes tiek atkārtotas 72 stundas. Varat nomainīt noslēpumu, nosūtīt testa notikumu un apskatīt katru piegādi.

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

Testa režīms

Testa atslēgas (atly_test_…) sasniedz visus galapunktus, bet strādā ar atsevišķiem testa datiem un atgriež fiksētus parauga rezultātus: AI netiek palaists un kredīti netiek tērēti. Testa atslēga nekad neredz reālus datus. Ierakstiet jebkurā teksta laukā maģisku vērtību, piemēram, __fail_credits__, __fail_consent__ vai __slow__, lai iegūtu attiecīgo kļūdu vai aizkavi. DELETE /api/v1/test-data dzēš visu, ko izveidojušas testa atslēgas.

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

Lietotnes, kas rīkojas Attorly lietotāja vārdā, pierakstās ar OAuth 2.1: atklāšana adresē /.well-known/oauth-authorization-server, dinamiska klientu reģistrācija un autorizācijas koda plūsma ar PKCE (S256). Pieprasiet resource=https://attorly.ai/api/v1, lai saņemtu marķieri REST API; MCP serverim izsniegts marķieris šeit tiek noraidīts. Pievienojiet offline_access, lai saņemtu atsvaidzināšanas marķieri. Persona izvēlas organizāciju un piekrišanas ekrānā var sašaurināt tiesības.

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

Norēķini

Operācijas ar AI izmanto tos pašus AI kredītus kā Attorly lietotne, no atslēgas īpašnieka vai viņa organizācijas maka, neatkarīgi no tā, vai tās izsaucat caur REST vai MCP. Kad kredīti beidzas, saņemat 402 insufficient_credits. Testa režīma izsaukumi ir bez maksas.

Plāni

API ir iekļauta Pro un Enterprise plānos. Ja atslēgas īpašnieka plāns vairs neietver API piekļuvi vai īpašnieks ir pametis organizāciju, pieprasījumi tiek noraidīti ar 403.

Apraksts

Katra darbība, ģenerēta no OpenAPI dokumenta, ko nodrošina pati API. Ceļi ir relatīvi pret https://attorly.ai. Veiksmīgas atbildes rezultātu ievieto laukā data. Lauku apraksti ir angļu valodā.

Dokumenti

GET/api/v1/documentslistDocuments

Uzskaitīt saglabātos dokumentus, kurus atslēga var lasīt, jaunākos vispirms.

Tiesības:DOCUMENTS_READ
Vaicājuma parametri
LauksTipsApraksts
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

Augšupielādēt dokumentu kā multipart/form-data vai kā JSON ar base64 saturu vai vienkāršu tekstu. Tas tiek analizēts fonā, ja vien analyze nav false.

Tiesības:DOCUMENTS_WRITEIzmanto MI kredītusPieņem failu augšupielādi
Pieprasījuma saturs
LauksTipsApraksts
filenameobligātsstringThe 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
Atbildes dati (201)
LauksTipsApraksts
idobligātsstring
nameobligātsstring
originalNameobligātsstring
typeobligāts"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
sizeobligātsinteger
statusobligāts"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
analysisQueuedobligātsbooleantrue when the background analysis was started
createdAtobligātsstringISO 8601 date-time
urlobligātsstringWhere 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

Meklēt atslēgai lasāmo dokumentu tekstā pēc nozīmes un precīziem vārdiem.

Tiesības:DOCUMENTS_READ
Vaicājuma parametri
LauksTipsApraksts
queryobligātsstringWhat 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

Iegūt dokumentu, tā apstrādes statusu un jaunāko analīzi.

Tiesības:DOCUMENTS_READ
Ceļa parametri
LauksTipsApraksts
documentIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
idobligātsstring
nameobligātsstring
originalNameobligātsstring
typeobligāts"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
mimeTypeobligātsstring
sizeobligātsinteger
statusobligāts"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
archivedobligātsboolean
ownedByYouobligātsboolean
versionNumberobligātsinteger | 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.
createdAtobligātsstringISO 8601 date-time
updatedAtobligātsstringISO 8601 date-time
fileAvailableobligātsbooleanfalse when the stored file can no longer be read
governingLawRequiredobligātsbooleantrue when the analysis is held until a governing law is chosen for the document in Attorly
latestAnalysisobligātsobject | null
urlobligātsstringWhere 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

Pieprasīt dzēst jums piederošu dokumentu. Dokuments tiek dzēsts tikai tad, kad dzēšanu apstiprināt Attorly.

Tiesības:DOCUMENTS_DELETE
Ceļa parametri
LauksTipsApraksts
documentIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
idobligātsstring
deletedobligātsbooleantrue only when the document is gone
statusobligāts"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

Analizējiet dokumentu vai tieši nosūtītu tekstu. mode ir full (saglabāts dokuments) vai quick.

Tiesības:DOCUMENTS_ANALYZEDOCUMENTS_READIzmanto MI kredītus

Satura lauks mode izvēlas vienu no: mode: full, mode: quick.

Pieprasījuma saturs
LauksTipsApraksts
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

Dokumenta saglabātās analīzes, jaunākās vispirms.

Tiesības:DOCUMENTS_READ
Ceļa parametri
LauksTipsApraksts
documentIdobligātsstring
Vaicājuma parametri
LauksTipsApraksts
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

Analizējiet saglabātu dokumentu.

Tiesības:DOCUMENTS_ANALYZEDOCUMENTS_READIzmanto MI kredītus
Ceļa parametri
LauksTipsApraksts
documentIdobligātsstring

Satura lauks mode izvēlas vienu no: mode: full, mode: quick.

Pieprasījuma saturs
LauksTipsApraksts
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

Izgūstiet saglabāta PDF vai DOCX dokumenta vienkāršo tekstu.

Tiesības:DOCUMENTS_READ
Ceļa parametri
LauksTipsApraksts
documentIdobligātsstring
Vaicājuma parametri
LauksTipsApraksts
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
Atbildes dati (200)
LauksTipsApraksts
textobligātsstringThe document text from offset (untrusted content)
documentNameobligātsstring
documentTypeobligātsstring
mimeTypeobligātsstring | null
characterCountobligātsintegerCharacters in the whole document
wordCountobligātsintegerWords in the whole document
offsetobligātsinteger
nextOffsetobligātsinteger | nullPass as offset to read on; null when the text ends here
truncatedobligātsbooleantrue 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

Iegūt saglabātu analīzi: kopsavilkums, risks, galvenie nosacījumi, klauzulas un ieteikumi.

Tiesības:DOCUMENTS_READ
Ceļa parametri
LauksTipsApraksts
analysisIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
idobligātsstring
documentIdobligātsstring
documentNameobligātsstring
summaryobligātsstring | null
riskLevelobligāts"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskScoreobligātsnumber
keyTermsobligātsarray of any
clausesobligātsarray of any
recommendationsobligātsarray of any
modeobligātsstringSINGLE or CONSENSUS
createdAtobligātsstringISO 8601 date-time
urlobligātsstring
curl
curl "https://attorly.ai/api/v1/analyses/your_analysisId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/comparisonscreateComparison

Salīdziniet divus dokumentus vai tekstus rindu pa rindai.

Tiesības:DOCUMENTS_READ
Pieprasījuma saturs
LauksTipsApraksts
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
Atbildes dati (200)
LauksTipsApraksts
differencesobligātsarray of object
summaryobligātsobject
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"
}'

Klauzulas

GET/api/v1/clausessearchClauses

Meklējiet klauzulu bibliotēkā.

Tiesības:CLAUSES_READ
Vaicājuma parametri
LauksTipsApraksts
queryobligātsstring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
Atbildes dati (200)
LauksTipsApraksts
clausesobligātsarray of object
countobligātsinteger
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

Novērtējiet klauzulas risku.

Tiesības:CLAUSES_READ
Pieprasījuma saturs
LauksTipsApraksts
clauseTextobligātsstring
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" | …
Atbildes dati (200)
LauksTipsApraksts
clauseTextstring
clauseTypeobligātsstring
jurisdictionobligātsstring
overallRiskScoreobligātsnumber
riskLevelobligāts"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskFactorsobligātsarray of object
recommendationsobligātsarray 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

Salīdziniet klauzulu ar tirgū ierastu formulējumu.

Tiesības:CLAUSES_READ
Pieprasījuma saturs
LauksTipsApraksts
clauseTextobligātsstring
categoryobligāts"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
Atbildes dati (200)
LauksTipsApraksts
inputClauseobligātsstring
categoryobligātsstring
marketStandardsobligātsarray of object
comparisonobligātsobject
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

Pārbaudiet klauzulu pret playbook.

Tiesības:CLAUSES_READ
Pieprasījuma saturs
LauksTipsApraksts
clauseTextobligātsstring
playbookIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
playbookNameobligātsstring
compliantobligātsboolean
violationsobligātsarray of string
warningsobligātsarray of string
rulesCheckedobligātsinteger
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"
}'

Izpēte

POST/api/v1/research/searchessearchResearch

Meklējiet juridiskajos avotos, piemēram, Lovdata, EUR-Lex un CourtListener.

Tiesības:RESEARCH_READIzmanto MI kredītus
Pieprasījuma saturs
LauksTipsApraksts
queryobligātsstring
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
Atbildes dati (200)
LauksTipsApraksts
queryobligātsstring
jurisdictionobligātsstring
resultsobligātsarray of object
totalCountobligātsintegerResults 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

Atrodiet tiesību aktu pēc atsauces.

Tiesības:RESEARCH_READIzmanto MI kredītus
Vaicājuma parametri
LauksTipsApraksts
citationobligātsstring
jurisdictionobligātsstringISO 3166-1 alpha-2 country code, or "EU"
Atbildes dati (200)
LauksTipsApraksts
idobligātsstring
titleobligātsstring
sourceobligātsstring
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"

Izmaiņu priekšlikumi

POST/api/v1/redlinescreateRedlines

Ģenerējiet izmaiņu priekšlikumus dokumentam vai tekstam.

Tiesības:REDLINES_GENERATEIzmanto MI kredītus
Pieprasījuma saturs
LauksTipsApraksts
documentIdstring
contentstring
partyRoleobligāts"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
Atbildes dati (200)
LauksTipsApraksts
changesobligātsarray of object
summaryobject
negotiationNotesarray of string
statisticsobligātsobject
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

Pieņemiet vai noraidiet dokumenta izmaiņas.

Tiesības:REDLINES_GENERATE
Ceļa parametri
LauksTipsApraksts
documentIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
changesobligātsarray of object
Atbildes dati (200)
LauksTipsApraksts
acceptedobligātsinteger
rejectedobligātsinteger
messageobligātsstring
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"
    }
  ]
}'

Sarunas

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

Analizējiet sarunu pozīciju.

Tiesības:NEGOTIATIONS_READIzmanto MI kredītus
Pieprasījuma saturs
LauksTipsApraksts
documentIdstring
contentstring
partyRoleobligāts"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
Atbildes dati (200)
LauksTipsApraksts
overallPositionobligātsstringFAVORABLE, BALANCED or UNFAVORABLE
positionsobligātsarray 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

Izveidojiet sarunu playbook no stratēģijas.

Tiesības:NEGOTIATIONS_READIzmanto MI kredītus
Pieprasījuma saturs
LauksTipsApraksts
strategyobligātsobject
contextobject
Atbildes dati (200)
LauksTipsApraksts
playbookobligātsarray of object
anticipatedObjectionsobligātsarray of object
recommendationsobligātsarray of string
summaryobligātsobject
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"
    ]
  }
}'

Darbplūsmas

GET/api/v1/workflows/templateslistWorkflowTemplates

Uzskaitiet darbplūsmu veidnes.

Tiesības:WORKFLOWS_EXECUTE
Vaicājuma parametri
LauksTipsApraksts
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

Darbplūsmu izpildes, jaunākās vispirms, pēc izvēles vienam projektam vai statusam.

Tiesības:WORKFLOWS_EXECUTE
Vaicājuma parametri
LauksTipsApraksts
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

Palaidiet darbplūsmu padziļinātās izpētes projektā.

Tiesības:WORKFLOWS_EXECUTEIzmanto MI kredītus
Pieprasījuma saturs
LauksTipsApraksts
templateIdobligātsstring
projectIdobligātsstring
inputsobligātsobject
optionsobject
Atbildes dati (202)
LauksTipsApraksts
executionIdobligātsstring
templateIdobligātsstring
templateNameobligātsstring
statusobligātsstring
startedAtobligātsstringISO 8601 date-time
messageobligātsstring
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

Iegūstiet darbplūsmas izpildes statusu.

Tiesības:WORKFLOWS_EXECUTE
Ceļa parametri
LauksTipsApraksts
executionIdobligātsstring
Vaicājuma parametri
LauksTipsApraksts
includeStepsboolean
Atbildes dati (200)
LauksTipsApraksts
executionIdobligātsstring
templateNameobligātsstring
statusobligātsstring
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"

Padziļinātā izpēte

GET/api/v1/due-diligence/projectslistDueDiligenceProjects

Due diligence projekti, jaunākie vispirms.

Tiesības:DUE_DILIGENCE_FULL
Vaicājuma parametri
LauksTipsApraksts
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

Izveidojiet padziļinātās izpētes projektu.

Tiesības:DUE_DILIGENCE_FULL
Pieprasījuma saturs
LauksTipsApraksts
nameobligātsstring
dealTypeobligāts"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
Atbildes dati (201)
LauksTipsApraksts
projectIdobligātsstring
nameobligātsstring
projectTypeobligātsstring
statusobligātsstring
createdAtobligātsstringISO 8601 date-time
messageobligātsstring
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

Iegūt due diligence projektu ar dokumentu un konstatējumu skaitu.

Tiesības:DUE_DILIGENCE_FULL
Ceļa parametri
LauksTipsApraksts
projectIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
idobligātsstring
nameobligātsstring
descriptionobligātsstring | null
projectTypeobligātsstring
statusobligātsstring
priorityobligātsstring
targetCompanyobligātsstring | null
dueDateobligātsstring | null
documentCountobligātsinteger
findingCountobligātsinteger
createdAtobligātsstringISO 8601 date-time
updatedAtobligātsstringISO 8601 date-time
completedAtobligātsstring | 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

Pievienojiet dokumentus padziļinātās izpētes projektam.

Tiesības:DUE_DILIGENCE_FULL
Ceļa parametri
LauksTipsApraksts
projectIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
documentIdsobligātsarray of string
categorystring
Atbildes dati (200)
LauksTipsApraksts
projectIdobligātsstring
documentsAddedobligātsinteger
totalDocumentsobligātsinteger
categoryobligātsstring
messageobligātsstring
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

Uzskaitiet padziļinātās izpētes projekta konstatējumus.

Tiesības:DUE_DILIGENCE_FULL
Ceļa parametri
LauksTipsApraksts
projectIdobligātsstring
Vaicājuma parametri
LauksTipsApraksts
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
Atbildes dati (200)
LauksTipsApraksts
projectIdobligātsstring
projectNameobligātsstring
findingsobligātsarray of object
riskSummaryobligātsobjectNumber of findings per severity
totalFindingsobligātsinteger
pendingProposalsobligātsintegerRisks 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

Ģenerējiet padziļinātās izpētes ziņojumu.

Tiesības:DUE_DILIGENCE_FULL
Ceļa parametri
LauksTipsApraksts
projectIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
formatobligāts"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
Atbildes dati (201)
LauksTipsApraksts
reportIdobligātsstring
projectIdobligātsstring
projectNamestring
formatobligāts"pdf" | "markdown"
statusobligātsstring
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
markdownobligātsstring
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"
}'

Veidnes un projekti

GET/api/v1/templateslistTemplates

Uzskaitiet dokumentu veidnes.

Tiesības:TEMPLATES_READ
Vaicājuma parametri
LauksTipsApraksts
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

Izveidojiet projektu no veidnes (mode template) vai ar MI (mode ai).

Tiesības:TEMPLATES_DRAFTIzmanto MI kredītus

Satura lauks mode izvēlas vienu no: mode: template, mode: ai.

Pieprasījuma saturs
LauksTipsApraksts
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"
  }
}'

Lietas

GET/api/v1/caseslistCases

Uzskaitīt savas lietas, nesen mainītās vispirms.

Tiesības:CASES_READ
Vaicājuma parametri
LauksTipsApraksts
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

Iegūt lietas laika skalu: katru notikumu ar datumu, pierādījumiem un otras puses nostāju.

Tiesības:CASES_READ
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
caseobligātsobject
eventsobligātsarray of objectIn date order
countobligātsinteger
needsReviewCountobligātsintegerEvents an AI added that no person has confirmed
deletionRequestedCountobligātsintegerEvents 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

Pievienot notikumu lietas laika skalai.

Tiesības:CASES_WRITE
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
titleobligātsstringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenobligātsobjectWhen 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
Atbildes dati (201)
LauksTipsApraksts
caseIdobligātsstring
eventobligātsobject
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

Mainīt notikumu lietas laika skalā vai apstiprināt AI pievienotu notikumu.

Tiesības:CASES_WRITE
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
eventIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
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
Atbildes dati (200)
LauksTipsApraksts
caseIdobligātsstring
eventobligātsobject
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

Pieprasīt notikuma dzēšanu no lietas laika līnijas. Notikums tiek dzēsts tikai tad, kad īpašnieks to apstiprina Attorly.

Tiesības:CASES_WRITE
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
eventIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
caseIdobligātsstring
idobligātsstring
deletedobligātsbooleantrue only when the event is gone
statusobligāts"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

Eksportēt lietas laika skalu kā PDF, Word, ODT, Excel vai PowerPoint failu.

Tiesības:CASES_READ
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
layoutobligāts"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
formatobligāts"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
Atbildes dati (200)
LauksTipsApraksts
caseIdobligātsstring
layoutobligāts"overview" | "chronology" | "numbered" | "visual"
formatobligāts"pdf" | "docx" | "odt" | "xlsx" | "pptx"
localeobligātsstringThe language the file is written in
eventCountobligātsintegerEvents in the file
exhibitCountobligātsintegerDocuments in the exhibit list (chronology and numbered layouts)
leftOutConfidentialobligātsintegerEvents left out because they are marked confidential
attachmentobligātsobject
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

Uzskaitīt lietas termiņus, tuvāko vispirms, norādot, kura termiņš tas ir un vai tas ir izpildīts vai nokavēts.

Tiesības:CASES_READ
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
Vaicājuma parametri
LauksTipsApraksts
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
Atbildes dati (200)
LauksTipsApraksts
caseobligātsobject
deadlinesobligātsarray of objectSoonest first
countobligātsinteger
overdueCountobligātsinteger
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

Pievienot lietai termiņu ar norādītu datumu vai aprēķinātu no reģistrēta fakta.

Tiesības:CASES_WRITE
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
titleobligātsstringWhat 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
Atbildes dati (201)
LauksTipsApraksts
caseIdobligātsstring
deadlineobligātsobject
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

Mainīt lietas termiņu vai atzīmēt to kā izpildītu vai atkal atvērtu.

Tiesības:CASES_WRITE
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
deadlineIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
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
Atbildes dati (200)
LauksTipsApraksts
caseIdobligātsstring
deadlineobligātsobject
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

Uzskaitīt lietā reģistrētos faktus ar to avotu un faktus, kas lietai vēl vajadzīgi.

Tiesības:CASES_READ
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
caseobligātsobject
factsobligātsarray of object
countobligātsinteger
caseReadsobligātsobject | 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

Reģistrēt faktu lietā vai to labot. No tā aprēķinātie termiņi pārvietojas līdzi.

Tiesības:CASES_WRITE
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
keyobligātsstringThe 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
valueobligātsstringThe 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)
Atbildes dati (200)
LauksTipsApraksts
caseIdobligātsstring
outcomeobligāts"recorded" | "corrected" | "unchanged"recorded: a new fact; corrected: a new value replaced the old one; unchanged: it already held this value
factobligātsobject
movedDeadlinesobligātsarray of objectOpen deadlines counted from the fact that moved with the correction, due days before and after
urlobligātsstringWhere 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

Uzskaitīt lietas puses un lomas, ko lieta paredz.

Tiesības:CASES_READ
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
caseobligātsobject
partiesobligātsarray of object
countobligātsinteger
rolesobligātsarray 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

Pievienot lietai pusi kādā no tās lomām.

Tiesības:CASES_WRITE
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
roleKeyobligātsstringThe role the party has in the case, as one of the roles parties_list returns (e.g. "landlord")
partyTypeobligāts"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
nameobligātsstringThe 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
Atbildes dati (201)
LauksTipsApraksts
caseIdobligātsstring
partyobligātsobject
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

Mainīt lietas puses datus.

Tiesības:CASES_WRITE
Ceļa parametri
LauksTipsApraksts
caseIdobligātsstring
partyIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
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
Atbildes dati (200)
LauksTipsApraksts
caseIdobligātsstring
partyobligātsobject
curl
curl -X PATCH "https://attorly.ai/api/v1/cases/case_abc123/parties/party_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Operācijas

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

Iegūt ar Prefer vai Idempotency-Key nosūtīta pieprasījuma statusu un rezultātu.

Ceļa parametri
LauksTipsApraksts
operationIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
idobligātsstringop_…
objectobligāts"operation"
operationIdobligātsstringThe REST operation that was called, e.g. createRedlines
statusobligāts"running" | "awaiting_approval" | "succeeded" | "failed"
livemodeobligātsboolean
idempotencyKeystring | null
resultUrlobligātsstringWhere to poll: /api/v1/operations/{id}
createdAtobligātsstring (date-time)
completedAtobligātsstring (date-time) | null
expiresAtobligātsstring (date-time)
httpStatusobligātsinteger | null
resultobligātsanyThe data of the successful call
metaobject
errorobligātsobject | null
curl
curl "https://attorly.ai/api/v1/operations/op_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Tīmekļa aizķeres

GET/api/v1/webhook-endpointslistWebhookEndpoints

Atslēgas organizācijas un režīma tīmekļa aizķeru galapunkti.

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

Izveidot tīmekļa aizķeres galapunktu. Atbildē ir parakstīšanas noslēpums, kas tiek parādīts tikai vienreiz.

Pieprasījuma saturs
LauksTipsApraksts
urlobligātsstring (uri)HTTPS URL that receives the events
descriptionstring
enabledEventsobligātsarray 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.
Atbildes dati (201)
LauksTipsApraksts
idobligātsstringwe_…
objectobligāts"webhook_endpoint"
urlobligātsstring
descriptionstring | null
enabledEventsobligātsarray of string
statusobligāts"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligātsboolean
includeSnapshotsobligātsboolean
apiVersionobligātsstring
failingSincestring (date-time) | null
createdAtobligātsstring (date-time)
updatedAtobligātsstring (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

Iegūt tīmekļa aizķeres galapunktu.

Ceļa parametri
LauksTipsApraksts
endpointIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
idobligātsstringwe_…
objectobligāts"webhook_endpoint"
urlobligātsstring
descriptionstring | null
enabledEventsobligātsarray of string
statusobligāts"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligātsboolean
includeSnapshotsobligātsboolean
apiVersionobligātsstring
failingSincestring (date-time) | null
createdAtobligātsstring (date-time)
updatedAtobligātsstring (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

Mainīt galapunkta URL, notikumus vai momentuzņēmumus vai to izslēgt un ieslēgt.

Ceļa parametri
LauksTipsApraksts
endpointIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
Atbildes dati (200)
LauksTipsApraksts
idobligātsstringwe_…
objectobligāts"webhook_endpoint"
urlobligātsstring
descriptionstring | null
enabledEventsobligātsarray of string
statusobligāts"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligātsboolean
includeSnapshotsobligātsboolean
apiVersionobligātsstring
failingSincestring (date-time) | null
createdAtobligātsstring (date-time)
updatedAtobligātsstring (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

Dzēst tīmekļa aizķeres galapunktu un tā piegāžu vēsturi.

Ceļa parametri
LauksTipsApraksts
endpointIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
idobligātsstring
objectobligāts"webhook_endpoint"
deletedobligātstrue
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

Nomainīt parakstīšanas noslēpumu. Vecais paraksta vēl 24 stundas.

Ceļa parametri
LauksTipsApraksts
endpointIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
idobligātsstringwe_…
objectobligāts"webhook_endpoint"
urlobligātsstring
descriptionstring | null
enabledEventsobligātsarray of string
statusobligāts"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobligātsboolean
includeSnapshotsobligātsboolean
apiVersionobligātsstring
failingSincestring (date-time) | null
createdAtobligātsstring (date-time)
updatedAtobligātsstring (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

Nosūtīt notikumu webhook_endpoint.test tikai uz šo galapunktu.

Ceļa parametri
LauksTipsApraksts
endpointIdobligātsstring
Atbildes dati (202)
LauksTipsApraksts
eventIdobligātsstring
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

Galapunkta piegādes, jaunākās vispirms, ar mēģinājumiem un rezultātu.

Ceļa parametri
LauksTipsApraksts
endpointIdobligātsstring
Vaicājuma parametri
LauksTipsApraksts
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"

Notikumi

GET/api/v1/eventslistEvents

Pēdējo 30 dienu notikumi, jaunākie vispirms.

Vaicājuma parametri
LauksTipsApraksts
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

Iegūt notikumu tādu, kādu to saņem tīmekļa aizķeru galapunkti.

Ceļa parametri
LauksTipsApraksts
eventIdobligātsstring
Atbildes dati (200)
LauksTipsApraksts
idobligātsstringevt_… — also sent as the webhook-id header; deduplicate on it
objectobligāts"event"
typeobligāts"analysis.completed" | "analysis.failed" | "redlines.generated" | "due_diligence.report.completed" | "operation.succeeded" | "operation.failed" | …
apiVersionobligātsstring
createdAtobligātsstring (date-time)
livemodeobligātsboolean
dataobligātsobject
curl
curl "https://attorly.ai/api/v1/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/events/{eventId}/redeliveriesredeliverEvent

Nosūtīt notikumu vēlreiz vienam galapunktam vai visiem, kas to abonē.

Ceļa parametri
LauksTipsApraksts
eventIdobligātsstring
Pieprasījuma saturs
LauksTipsApraksts
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
Atbildes dati (202)
LauksTipsApraksts
eventIdobligātsstring
deliveriesScheduledobligātsinteger
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"
}'

Konts, lietojums un žurnāli

GET/api/v1/organizationgetOrganization

Atslēgas organizācija: plāns, AI kredīti, noklusējuma jurisdikcija un ko atslēga drīkst darīt.

Atbildes dati (200)
LauksTipsApraksts
organizationobligātsobject
userobligātsobject
planobligātsstringSTANDARD, PRO or ENTERPRISE
billingobligātsobject
defaultJurisdictionobligātsstring | nullISO 3166-1 alpha-2 country used when a document names no governing law
credentialobligātsobject
appUrlobligātsstring
curl
curl "https://attorly.ai/api/v1/organization" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/usagegetUsage

Pieprasījumi dienā, pa atslēgām un operācijām, ar kļūdu skaitu, caur REST un MCP.

Vaicājuma parametri
LauksTipsApraksts
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

Organizācijas API pieprasījumi pēdējās 30 dienās, jaunākie vispirms.

Vaicājuma parametri
LauksTipsApraksts
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

Kas ko izsauca, kad un ar kuru atslēgu. Organizācijas īpašniekiem un administratoriem.

Vaicājuma parametri
LauksTipsApraksts
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

Dzēst visus organizācijas testa režīma objektus, notikumus un operācijas. Tikai testa atslēgām.

Atbildes dati (200)
LauksTipsApraksts
objectobligāts"test_data_purge"
deletedobligātsobject
curl
curl -X DELETE "https://attorly.ai/api/v1/test-data" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"