Aqbeż għall-kontenut ewlieni

Żviluppaturi

Dokumentazzjoni tar-REST API

API ta' JSON fuq HTTPS għall-AI legali ta' Attorly. Tħaddem l-istess operazzjonijiet bħas-server MCP, bl-istess keys, ambiti, limiti u fatturazzjoni.

Bidu malajr

Tella' kuntratt u analizzah f'erba' passi.

  1. 1. Oħloq key

    Oħloq key f'Issettjar › Żviluppaturi u agħżel REST API. L-istess key taħdem għas-server MCP. Żommha f'varjabbli tal-ambjent:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Tella' dokument

    Ibgħat il-fajl bħala multipart/form-data. Id-data.id tat-tweġiba huwa l-id tad-dokument. analyze=false jaħżnu mingħajr ma jibda l-analiżi fl-isfond, għax il-pass li jmiss iħaddem waħda.

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

    Prefer: wait=30 jistenna sa 30 sekonda għar-riżultat. Analiżi lesta tiġi lura bħala 200 bir-riżultat f'data. Jekk tieħu aktar, tikseb 202 Accepted b'header Location li jipponta lejn l-operazzjoni.

    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. Iġbor ir-riżultat

    Iċċekkja l-operazzjoni ripetutament sakemm l-istatus tagħha jkun succeeded jew failed. L-analiżi tinsab f'result. Retry-After jgħid kemm-il sekonda tistenna bejn kull ċekkjar.

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

Awtentikazzjoni

Ibgħat kredenzjali fl-header Authorization bħala Bearer token. Il-keys minn Issettjar › Żviluppaturi jibdew b'lbmcp_ u jaħdmu fuq Pro u Enterprise, kemm għar-REST API kif ukoll għas-server MCP. Il-keys tal-organizzazzjoni Enterprise jibdew b'atly_ (atly_rk_ għal keys ristretti, atly_test_ għall-mod tat-test); keys lb_ eqdem jibqgħu jaħdmu. L-apps li jaġixxu għal persuna jużaw OAuth.

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

Ambiti

Kull endpoint jeħtieġ l-ambiti elenkati ħdejh. Key mingħajrhom tikseb 403 insufficient_scope, u requiredScopes fl-iżball jelenka kull ambitu li teħtieġ is-sejħa. L-API keys tal-organizzazzjoni u OAuth jużaw dawn l-ismijiet tal-ambiti:

AmbituAmbitu tal-API key tal-organizzazzjoni
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

Żbalji

Kull żball għandu l-istess forma: kodiċi stabbli biex tagħżel fuqu, messaġġ għan-nies, u requestId biex tikkwota lill-appoġġ.

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

Kull kodiċi huwa spjegat, flimkien ma' x'għandek tagħmel dwaru, fuq il-paġna tal-kodiċijiet tal-iżbalji

Verżjonijiet

L-API għandha verżjonijiet skont id-data. Ibgħat Attorly-Version biex tagħżel verżjoni għal talba waħda; mingħajru, talba tuża l-verżjoni li biha nħolqot il-key tagħha (keys maħluqa qabel il-verżjonijiet jużaw 2026-10-01). Kull tweġiba tgħid liema verżjoni wieġbet. Bidliet li jkissru jaslu biss f'verżjoni ġdida, u l-changelog jelenkahom.

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

Idempotenza

Ibgħat header Idempotency-Key, pereżempju UUID, fuq talbiet POST, PATCH u DELETE. Tentattiv ieħor bl-istess key u l-istess talba jieħu lura l-ewwel tweġiba b'Idempotent-Replayed: true, u x-xogħol ma jerġax jitħaddem jew jiġi fatturat. Key użata mill-ġdid għal talba differenti tikseb 422 idempotency_key_reused, u waħda li għadha għaddejja tikseb 409 jew, għal sejħa li ddum ħafna, l-istess operazzjoni. L-iżbalji tas-server ma jinħażnux, għalhekk it-tentattiv mill-ġdid tagħhom jerġa' jitħaddem. Il-keys jinżammu għal 24 siegħa.

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

Talbiet li jdumu ħafna

Mill-verżjoni 2026-11-01, analiżi sħaħ, redlines, playbooks tan-negozjar, flussi tax-xogħol, rapporti ta' due diligence u abbozzi bl-AI iwieġbu 202 Accepted b'operazzjoni minnufih. Ibgħat Prefer: wait=30 biex l-ewwel tistenna sa 30 sekonda (massimu 60) għar-riżultat, jew Prefer: respond-async biex titlob 202 fuq kwalunkwe kitba. Iċċekkja l-Location ripetutament sakemm l-istatus ikun succeeded jew failed, jew abbona għal operation.succeeded. Ir-riżultati jinżammu għal 24 siegħa. Massimu ta' 5 operazzjonijiet tal-AI li jdumu ħafna jitħaddmu għal kull organizzazzjoni f'daqqa; aktar jiksbu 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", … } }

Paġinazzjoni

Il-listi jirritornaw { object: "list", data, hasMore, nextCursor } u jieħdu limit (1 sa 100, awtomatikament 20) u cursor. Biex tikseb il-paġna li jmiss, ibgħat nextCursor bħala cursor. Fl-aħħar paġna, nextCursor huwa null. Il-cursors jibqgħu validi waqt li jiżdiedu elementi ġodda.

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…

Limiti tar-rata

Talba tgħodd kontra diversi twieqi: il-limitu fis-siegħa tal-key, 300 fil-minuta għal kull persuna, 600 fil-minuta għal kull organizzazzjoni, limitu fil-minuta għal kull key għal qari, kitba u sejħiet tal-AI, u l-limitu ta' kull operazzjoni. REST u MCP jaqsmu l-istess counters. Il-headers RateLimit-Policy u RateLimit juru kull tieqa; X-RateLimit-* juri dik l-eqreb li tispiċċa. Meta taqbeż limitu tikseb 429 b'Retry-After.

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

Webhooks

Oħloq endpoint b'POST /api/v1/webhook-endpoints biex tiġi infurmat meta jitlesta x-xogħol, minflok ma tiċċekkja ripetutament. Attorly jibgħat POST b'avveniment JSON u jiffirmah skont Standard Webhooks bis-sigriet whsec_ tal-endpoint. Ivverifika l-firma qabel ma tafda l-kontenut, wieġeb 2xx fi żmien 15-il sekonda u neħħi d-duplikati skont webhook-id: il-konsenji li jfallu jerġgħu jiġu ppruvati għal 72 siegħa. Tista' ddawwar is-sigriet, tibgħat avveniment tat-test u tara kull konsenja.

typescript
import crypto from 'node:crypto';

// Standard Webhooks: verify before you parse. secret is the endpoint's whsec_… value.
export function verifyAttorlyWebhook(rawBody: string, headers: Headers, secret: string): unknown {
  const id = headers.get('webhook-id');
  const timestamp = headers.get('webhook-timestamp');
  const signatures = headers.get('webhook-signature') ?? '';
  if (!id || !timestamp) throw new Error('Missing webhook headers');
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) throw new Error('Timestamp too old');

  const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64');
  const expected = crypto.createHmac('sha256', key).update(`${id}.${timestamp}.${rawBody}`).digest();
  const valid = signatures.split(' ').some((entry) => {
    const [version, value] = entry.split(',');
    const given = Buffer.from(value ?? '', 'base64');
    return version === 'v1' && given.length === expected.length && crypto.timingSafeEqual(given, expected);
  });
  if (!valid) throw new Error('Invalid signature');
  return JSON.parse(rawBody); // Deduplicate on webhook-id: a delivery can arrive more than once.
}

Mod tat-test

Il-keys tat-test (atly_test_…) jilħqu kull endpoint, iżda jaħdmu fuq data tat-test separata u jirritornaw riżultati ta' eżempju fissi: l-ebda AI ma jaħdem u l-ebda kreditu ma jintuża. Key tat-test qatt ma tara data live. Poġġi valur maġiku bħal __fail_credits__, __fail_consent__ jew __slow__ fi kwalunkwe qasam tat-test biex tikseb dak in-nuqqas jew dewmien. DELETE /api/v1/test-data iħassar kull ma ħolqot key tat-test.

bash
curl -X POST https://attorly.ai/api/v1/analyses \
  -H "Authorization: Bearer atly_test_…" \
  -H "Content-Type: application/json" \
  -d '{ "mode": "quick", "content": "__fail_credits__" }'

HTTP/1.1 402 Payment Required
{ "error": { "code": "insufficient_credits", "message": "Test mode: the AI credits are used up …" } }

OAuth

L-apps li jaġixxu għal utent ta' Attorly jidħlu b'OAuth 2.1: discovery f'/.well-known/oauth-authorization-server, reġistrazzjoni dinamika tal-klijent, u l-authorization code flow b'PKCE (S256). Itlob resource=https://attorly.ai/api/v1 biex tikseb token għar-REST API; token maħruġ għas-server MCP jiġi rrifjutat hawn. Żid offline_access biex tikseb refresh token. Il-persuna tagħżel l-organizzazzjoni u tista' tnaqqas l-ambiti fl-iskrin tal-kunsens.

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

Fatturazzjoni

L-operazzjonijiet li jħaddmu l-AI jużaw l-istess krediti tal-AI bħall-app ta' Attorly, mill-kartiera tas-sid tal-key jew tal-organizzazzjoni tiegħu, kemm jekk issejħilhom fuq REST jew MCP. Meta jispiċċaw il-krediti tikseb 402 insufficient_credits. Is-sejħiet fil-mod tat-test huma b'xejn.

Pjanijiet

L-API hija inkluża f'Pro u Enterprise. Jekk il-pjan tas-sid tal-key m'għadux jinkludi aċċess għall-API, jew is-sid ħalla l-organizzazzjoni, it-talbiet jiġu rrifjutati b'403.

Referenza

Kull operazzjoni, iġġenerata mid-dokument OpenAPI li sservi l-API. Il-mogħdijiet huma relattivi għal https://attorly.ai. It-tweġibiet ta' suċċess jgeżwru r-riżultat f'data. Id-deskrizzjonijiet tal-oqsma huma bl-Ingliż.

Dokumenti

GET/api/v1/documentslistDocuments

Elenka d-dokumenti maħżuna li l-key tista' taqra, l-aktar ġodda l-ewwel.

Ambitu:DOCUMENTS_READ
Parametri tal-query
QasamTipDeskrizzjoni
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

Tella' dokument bħala multipart/form-data, jew bħala JSON b'kontenut base64 jew test sempliċi. Jiġi analizzat fl-isfond sakemm analyze ma jkunx false.

Ambitu:DOCUMENTS_WRITEJuża l-krediti tal-AIJaċċetta tellgħat ta' fajls
Kontenut tat-talba
QasamTipDeskrizzjoni
filenamemeħtieġstringThe file name with its extension, e.g. "nda.pdf"; the extension decides the file type when mimeType is absent
contentBase64stringThe file, base64-encoded
textstringPlain text to store as a .txt document, instead of contentBase64
mimeTypestringThe file's MIME type; checked against its content
namestringDisplay name; defaults to the file name
type"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …What the document is
urlstring (uri)An https URL Attorly downloads the file from (public hosts only, up to 10 MB), instead of contentBase64 or text
analyzebooleanAnalyse the document in the background after upload, as the app does (uses AI credits). false stores it only
Data tat-tweġiba (201)
QasamTipDeskrizzjoni
idmeħtieġstring
namemeħtieġstring
originalNamemeħtieġstring
typemeħtieġ"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
sizemeħtieġinteger
statusmeħtieġ"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
analysisQueuedmeħtieġbooleantrue when the background analysis was started
createdAtmeħtieġstringISO 8601 date-time
urlmeħtieġstringWhere the document opens in Attorly
curl
curl -X POST "https://attorly.ai/api/v1/documents" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "filename": "nda.txt",
  "text": "This Mutual Non-Disclosure Agreement is entered into by…",
  "type": "NDA"
}'
GET/api/v1/documents/searchsearchDocuments

Fittex fit-test tad-dokumenti li l-key tista' taqra, skont it-tifsira u skont il-kliem eżatt.

Ambitu:DOCUMENTS_READ
Parametri tal-query
QasamTipDeskrizzjoni
querymeħtieġstringWhat to look for, in plain language or exact words
type"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …Only documents of this kind
limitinteger
cursorstringPass the nextCursor of the previous page to get the next one
curl
curl "https://attorly.ai/api/v1/documents/search?query=limitation+of+liability&limit=10" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/documents/{documentId}getDocument

Ikseb dokument, l-istatus tal-ipproċessar tiegħu u l-aħħar analiżi tiegħu.

Ambitu:DOCUMENTS_READ
Parametri tal-mogħdija
QasamTipDeskrizzjoni
documentIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstring
namemeħtieġstring
originalNamemeħtieġstring
typemeħtieġ"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
mimeTypemeħtieġstring
sizemeħtieġinteger
statusmeħtieġ"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
archivedmeħtieġboolean
ownedByYoumeħtieġboolean
versionNumbermeħtieġinteger | nullThe document's number among its versions you can read ("version 2" — a new version is saved as a new document, never in place); null when it has no other version. documents_list returns the newest version of each document only.
createdAtmeħtieġstringISO 8601 date-time
updatedAtmeħtieġstringISO 8601 date-time
fileAvailablemeħtieġbooleanfalse when the stored file can no longer be read
governingLawRequiredmeħtieġbooleantrue when the analysis is held until a governing law is chosen for the document in Attorly
latestAnalysismeħtieġobject | null
urlmeħtieġstringWhere the document opens in Attorly
curl
curl "https://attorly.ai/api/v1/documents/doc_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
DELETE/api/v1/documents/{documentId}deleteDocument

Itlob it-tħassir ta' dokument li huwa tiegħek. Id-dokument jitħassar biss meta tapprovah f'Attorly.

Ambitu:DOCUMENTS_DELETE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
documentIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstring
deletedmeħtieġbooleantrue only when the document is gone
statusmeħtieġ"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

Analizza dokument jew test inline. mode huwa full (dokument maħżun) jew quick.

Ambitu:DOCUMENTS_ANALYZEDOCUMENTS_READJuża l-krediti tal-AI

Il-qasam mode tal-kontenut jagħżel wieħed minn: mode: full, mode: quick.

Kontenut tat-talba
QasamTipDeskrizzjoni
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

Elenka l-analiżi maħżuna ta' dokument, l-aktar ġodda l-ewwel.

Ambitu:DOCUMENTS_READ
Parametri tal-mogħdija
QasamTipDeskrizzjoni
documentIdmeħtieġstring
Parametri tal-query
QasamTipDeskrizzjoni
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

Analizza dokument maħżun.

Ambitu:DOCUMENTS_ANALYZEDOCUMENTS_READJuża l-krediti tal-AI
Parametri tal-mogħdija
QasamTipDeskrizzjoni
documentIdmeħtieġstring

Il-qasam mode tal-kontenut jagħżel wieħed minn: mode: full, mode: quick.

Kontenut tat-talba
QasamTipDeskrizzjoni
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

Estratta t-test sempliċi ta' dokument PDF jew DOCX maħżun.

Ambitu:DOCUMENTS_READ
Parametri tal-mogħdija
QasamTipDeskrizzjoni
documentIdmeħtieġstring
Parametri tal-query
QasamTipDeskrizzjoni
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
textmeħtieġstringThe document text from offset (untrusted content)
documentNamemeħtieġstring
documentTypemeħtieġstring
mimeTypemeħtieġstring | null
characterCountmeħtieġintegerCharacters in the whole document
wordCountmeħtieġintegerWords in the whole document
offsetmeħtieġinteger
nextOffsetmeħtieġinteger | nullPass as offset to read on; null when the text ends here
truncatedmeħtieġbooleantrue when the text continues past this slice
curl
curl "https://attorly.ai/api/v1/documents/doc_abc123/text" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/analyses/{analysisId}getAnalysis

Ikseb analiżi maħżuna: sommarju, riskju, termini ewlenin, klawsoli u rakkomandazzjonijiet.

Ambitu:DOCUMENTS_READ
Parametri tal-mogħdija
QasamTipDeskrizzjoni
analysisIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstring
documentIdmeħtieġstring
documentNamemeħtieġstring
summarymeħtieġstring | null
riskLevelmeħtieġ"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskScoremeħtieġnumber
keyTermsmeħtieġarray of any
clausesmeħtieġarray of any
recommendationsmeħtieġarray of any
modemeħtieġstringSINGLE or CONSENSUS
createdAtmeħtieġstringISO 8601 date-time
urlmeħtieġstring
curl
curl "https://attorly.ai/api/v1/analyses/your_analysisId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/comparisonscreateComparison

Qabbel żewġ dokumenti jew testi linja b'linja.

Ambitu:DOCUMENTS_READ
Kontenut tat-talba
QasamTipDeskrizzjoni
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
differencesmeħtieġarray of object
summarymeħtieġobject
curl
curl -X POST "https://attorly.ai/api/v1/comparisons" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "sourceDocumentId": "doc_abc123",
  "targetDocumentId": "doc_def456"
}'

Klawsoli

GET/api/v1/clausessearchClauses

Fittex fil-librerija tal-klawsoli.

Ambitu:CLAUSES_READ
Parametri tal-query
QasamTipDeskrizzjoni
querymeħtieġstring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
clausesmeħtieġarray of object
countmeħtieġinteger
curl
curl "https://attorly.ai/api/v1/clauses?query=limitation+of+liability&limit=5" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/clauses/risk-assessmentscreateClauseRiskAssessment

Evalwa r-riskju ta' klawsola.

Ambitu:CLAUSES_READ
Kontenut tat-talba
QasamTipDeskrizzjoni
clauseTextmeħtieġstring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …The kind of clause; its risk rules are applied
jurisdictionstringISO 3166-1 alpha-2 country code; defaults to international
contractTypestring
partyRole"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE" | …
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
clauseTextstring
clauseTypemeħtieġstring
jurisdictionmeħtieġstring
overallRiskScoremeħtieġnumber
riskLevelmeħtieġ"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskFactorsmeħtieġarray of object
recommendationsmeħtieġarray of string
alternativesarray of object
complianceIssuesarray of object
negotiationTipsarray of string
curl
curl -X POST "https://attorly.ai/api/v1/clauses/risk-assessments" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "clauseText": "The Supplier’s total liability shall not exceed the fees paid in the preceding month.",
  "category": "LIABILITY",
  "partyRole": "BUYER"
}'
POST/api/v1/clauses/market-comparisonscreateClauseMarketComparison

Qabbel klawsola ma' lingwaġġ standard tas-suq.

Ambitu:CLAUSES_READ
Kontenut tat-talba
QasamTipDeskrizzjoni
clauseTextmeħtieġstring
categorymeħtieġ"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
inputClausemeħtieġstring
categorymeħtieġstring
marketStandardsmeħtieġarray of object
comparisonmeħtieġobject
curl
curl -X POST "https://attorly.ai/api/v1/clauses/market-comparisons" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "clauseText": "Either party may terminate this Agreement on 10 days’ written notice.",
  "category": "TERMINATION"
}'
POST/api/v1/clauses/playbook-checkscreateClausePlaybookCheck

Iċċekkja klawsola ma' playbook.

Ambitu:CLAUSES_READ
Kontenut tat-talba
QasamTipDeskrizzjoni
clauseTextmeħtieġstring
playbookIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
playbookNamemeħtieġstring
compliantmeħtieġboolean
violationsmeħtieġarray of string
warningsmeħtieġarray of string
rulesCheckedmeħtieġinteger
curl
curl -X POST "https://attorly.ai/api/v1/clauses/playbook-checks" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "clauseText": "This Agreement is governed by the laws of England.",
  "playbookId": "pb_abc123"
}'

Riċerka

POST/api/v1/research/searchessearchResearch

Fittex f'sorsi legali bħal Lovdata, EUR-Lex u CourtListener.

Ambitu:RESEARCH_READJuża l-krediti tal-AI
Kontenut tat-talba
QasamTipDeskrizzjoni
querymeħtieġstring
jurisdictionsarray of stringISO 3166-1 alpha-2 country code to search under, or "EU"; the first entry is used. Defaults to the key owner's country.
sourcesarray of "lovdata" | "eurlex" | "legislation_uk" | "congress_gov" | "courtlistener" | "finlex"Keep only results from these publishers
dateFromstringKeep only dated results on or after this day
dateTostringKeep only dated results on or before this day
limitinteger
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
querymeħtieġstring
jurisdictionmeħtieġstring
resultsmeħtieġarray of object
totalCountmeħtieġintegerResults matching the filters, before limit
sourcesstring
curl
curl -X POST "https://attorly.ai/api/v1/research/searches" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "notice period for terminating a commercial lease",
  "jurisdictions": [
    "NO"
  ],
  "limit": 5
}'
GET/api/v1/research/statutesgetStatute

Fittex statut skont iċ-ċitazzjoni.

Ambitu:RESEARCH_READJuża l-krediti tal-AI
Parametri tal-query
QasamTipDeskrizzjoni
citationmeħtieġstring
jurisdictionmeħtieġstringISO 3166-1 alpha-2 country code, or "EU"
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstring
titlemeħtieġstring
sourcemeħtieġstring
jurisdictionstring
citationstring
urlstring
datestring
excerptstring
relevanceScorenumber
attributionstring
asOfstring
consolidatedAsOfstringISO date the stored text is "as amended through", as its publisher states
inForceTostringISO date the act stops/stopped being in force, when the publisher states one
repealedAtstringISO date the act was repealed, when it was
lawDatesReadbooleanTrue when the publisher's dates were read for the act; a missing consolidatedAsOf then means an unamended text
curl
curl "https://attorly.ai/api/v1/research/statutes?citation=LOV-1999-03-26-17&jurisdiction=NO" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Redlines

POST/api/v1/redlinescreateRedlines

Iġġenera suġġerimenti ta' redline għal dokument jew test.

Ambitu:REDLINES_GENERATEJuża l-krediti tal-AI
Kontenut tat-talba
QasamTipDeskrizzjoni
documentIdstring
contentstring
partyRolemeħtieġ"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
riskTolerance"CONSERVATIVE" | "MODERATE" | "AGGRESSIVE"
focusAreasarray of string
playbookIdstringRedline against this playbook's position ladders (own, organisation, system or shared playbooks)
side"OUR_PAPER" | "THEIR_PAPER" | "EITHER"Whose paper the document is, to pick the playbook positions that apply
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
changesmeħtieġarray of object
summaryobject
negotiationNotesarray of string
statisticsmeħtieġobject
curl
curl -X POST "https://attorly.ai/api/v1/redlines" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "documentId": "doc_abc123",
  "partyRole": "BUYER",
  "riskTolerance": "CONSERVATIVE"
}'
POST/api/v1/documents/{documentId}/redlines/resolutionsresolveRedlines

Aċċetta jew iċħad bidliet ta' redline f'dokument.

Ambitu:REDLINES_GENERATE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
documentIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
changesmeħtieġarray of object
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
acceptedmeħtieġinteger
rejectedmeħtieġinteger
messagemeħtieġstring
curl
curl -X POST "https://attorly.ai/api/v1/documents/doc_abc123/redlines/resolutions" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "changes": [
    {
      "id": "chg_1",
      "action": "accept"
    },
    {
      "id": "chg_2",
      "action": "reject"
    }
  ]
}'

Negozjati

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

Analizza pożizzjoni fin-negozjar.

Ambitu:NEGOTIATIONS_READJuża l-krediti tal-AI
Kontenut tat-talba
QasamTipDeskrizzjoni
documentIdstring
contentstring
partyRolemeħtieġ"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
overallPositionmeħtieġstringFAVORABLE, BALANCED or UNFAVORABLE
positionsmeħtieġarray of object
prioritizedConcessionsarray of string
dealBreakersarray of string
suggestedApproachstring
estimatedOutcomeobject
curl
curl -X POST "https://attorly.ai/api/v1/negotiations/position-analyses" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "documentId": "doc_abc123",
  "partyRole": "BUYER"
}'
POST/api/v1/negotiations/playbookscreateNegotiationPlaybook

Ibni playbook tan-negozjar minn strateġija.

Ambitu:NEGOTIATIONS_READJuża l-krediti tal-AI
Kontenut tat-talba
QasamTipDeskrizzjoni
strategymeħtieġobject
contextobject
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
playbookmeħtieġarray of object
anticipatedObjectionsmeħtieġarray of object
recommendationsmeħtieġarray of string
summarymeħtieġobject
curl
curl -X POST "https://attorly.ai/api/v1/negotiations/playbooks" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "strategy": {
    "overallPosition": "collaborative",
    "priorities": [
      "Cap liability at 12 months of fees",
      "Keep Norwegian law"
    ]
  }
}'

Flussi tax-xogħol

GET/api/v1/workflows/templateslistWorkflowTemplates

Elenka l-mudelli tal-flussi tax-xogħol.

Ambitu:WORKFLOWS_EXECUTE
Parametri tal-query
QasamTipDeskrizzjoni
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

Elenka l-eżekuzzjonijiet tal-flussi tax-xogħol, l-aktar ġodda l-ewwel, fakultattivament għal proġett jew status wieħed.

Ambitu:WORKFLOWS_EXECUTE
Parametri tal-query
QasamTipDeskrizzjoni
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

Ibda fluss tax-xogħol fuq proġett ta' due diligence.

Ambitu:WORKFLOWS_EXECUTEJuża l-krediti tal-AI
Kontenut tat-talba
QasamTipDeskrizzjoni
templateIdmeħtieġstring
projectIdmeħtieġstring
inputsmeħtieġobject
optionsobject
Data tat-tweġiba (202)
QasamTipDeskrizzjoni
executionIdmeħtieġstring
templateIdmeħtieġstring
templateNamemeħtieġstring
statusmeħtieġstring
startedAtmeħtieġstringISO 8601 date-time
messagemeħtieġstring
curl
curl -X POST "https://attorly.ai/api/v1/workflows/executions" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "templateId": "wft_abc123",
  "projectId": "ddp_abc123",
  "inputs": {}
}'
GET/api/v1/workflows/executions/{executionId}getWorkflowExecution

Ikseb l-istatus ta' eżekuzzjoni ta' fluss tax-xogħol.

Ambitu:WORKFLOWS_EXECUTE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
executionIdmeħtieġstring
Parametri tal-query
QasamTipDeskrizzjoni
includeStepsboolean
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
executionIdmeħtieġstring
templateNamemeħtieġstring
statusmeħtieġstring
startedAtstringISO 8601 date-time
completedAtstringISO 8601 date-time
variablesobject
errorstring | null
stepsarray of object
curl
curl "https://attorly.ai/api/v1/workflows/executions/wfx_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Due diligence

GET/api/v1/due-diligence/projectslistDueDiligenceProjects

Elenka l-proġetti ta' due diligence, l-aktar ġodda l-ewwel.

Ambitu:DUE_DILIGENCE_FULL
Parametri tal-query
QasamTipDeskrizzjoni
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

Oħloq proġett ta' due diligence.

Ambitu:DUE_DILIGENCE_FULL
Kontenut tat-talba
QasamTipDeskrizzjoni
namemeħtieġstring
dealTypemeħtieġ"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
Data tat-tweġiba (201)
QasamTipDeskrizzjoni
projectIdmeħtieġstring
namemeħtieġstring
projectTypemeħtieġstring
statusmeħtieġstring
createdAtmeħtieġstringISO 8601 date-time
messagemeħtieġstring
curl
curl -X POST "https://attorly.ai/api/v1/due-diligence/projects" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Project Falcon",
  "dealType": "MA_ACQUISITION",
  "targetCompany": "Target AS"
}'
GET/api/v1/due-diligence/projects/{projectId}getDueDiligenceProject

Ikseb proġett ta' due diligence bl-għadd tad-dokumenti u tas-sejbiet tiegħu.

Ambitu:DUE_DILIGENCE_FULL
Parametri tal-mogħdija
QasamTipDeskrizzjoni
projectIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstring
namemeħtieġstring
descriptionmeħtieġstring | null
projectTypemeħtieġstring
statusmeħtieġstring
prioritymeħtieġstring
targetCompanymeħtieġstring | null
dueDatemeħtieġstring | null
documentCountmeħtieġinteger
findingCountmeħtieġinteger
createdAtmeħtieġstringISO 8601 date-time
updatedAtmeħtieġstringISO 8601 date-time
completedAtmeħtieġstring | null
curl
curl "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/due-diligence/projects/{projectId}/documentsaddDueDiligenceDocuments

Żid dokumenti ma' proġett ta' due diligence.

Ambitu:DUE_DILIGENCE_FULL
Parametri tal-mogħdija
QasamTipDeskrizzjoni
projectIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
documentIdsmeħtieġarray of string
categorystring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
projectIdmeħtieġstring
documentsAddedmeħtieġinteger
totalDocumentsmeħtieġinteger
categorymeħtieġstring
messagemeħtieġstring
curl
curl -X POST "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123/documents" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "documentIds": [
    "doc_abc123",
    "doc_def456"
  ]
}'
GET/api/v1/due-diligence/projects/{projectId}/findingslistDueDiligenceFindings

Elenka s-sejbiet ta' proġett ta' due diligence.

Ambitu:DUE_DILIGENCE_FULL
Parametri tal-mogħdija
QasamTipDeskrizzjoni
projectIdmeħtieġstring
Parametri tal-query
QasamTipDeskrizzjoni
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
projectIdmeħtieġstring
projectNamemeħtieġstring
findingsmeħtieġarray of object
riskSummarymeħtieġobjectNumber of findings per severity
totalFindingsmeħtieġinteger
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

Iġġenera rapport ta' due diligence.

Ambitu:DUE_DILIGENCE_FULL
Parametri tal-mogħdija
QasamTipDeskrizzjoni
projectIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
formatmeħtieġ"pdf" | "markdown""markdown" returns the report text; "pdf" also returns the formatted PDF (base64)
sectionsarray of "executive_summary" | "risk_overview" | "findings_detail" | "document_analysis" | "recommendations"
includeRecommendationsboolean
Data tat-tweġiba (201)
QasamTipDeskrizzjoni
reportIdmeħtieġstring
projectIdmeħtieġstring
projectNamestring
formatmeħtieġ"pdf" | "markdown"
statusmeħtieġstring
sectionsarray of string
documentCountinteger
findingCountinteger
markdownmeħtieġstring
attachmentobject
messagestring
curl
curl -X POST "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123/reports" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "format": "markdown"
}'

Mudelli u abbozzi

GET/api/v1/templateslistTemplates

Elenka l-mudelli tad-dokumenti.

Ambitu:TEMPLATES_READ
Parametri tal-query
QasamTipDeskrizzjoni
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

Oħloq abbozz minn mudell (mode template) jew bl-AI (mode ai).

Ambitu:TEMPLATES_DRAFTJuża l-krediti tal-AI

Il-qasam mode tal-kontenut jagħżel wieħed minn: mode: template, mode: ai.

Kontenut tat-talba
QasamTipDeskrizzjoni
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"
  }
}'

Każijiet

GET/api/v1/caseslistCases

Elenka l-każijiet tiegħek, l-aktar reċentement mibdula l-ewwel.

Ambitu:CASES_READ
Parametri tal-query
QasamTipDeskrizzjoni
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

Ikseb il-kronoloġija ta' każ: kull avveniment bid-data, l-evidenza u l-pożizzjoni tan-naħa l-oħra.

Ambitu:CASES_READ
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
casemeħtieġobject
eventsmeħtieġarray of objectIn date order
countmeħtieġinteger
needsReviewCountmeħtieġintegerEvents an AI added that no person has confirmed
deletionRequestedCountmeħtieġintegerEvents waiting for the owner to approve their deletion
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/timeline" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/timeline/eventscreateTimelineEvent

Żid avveniment mal-kronoloġija ta' każ.

Ambitu:CASES_WRITE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
titlemeħtieġstringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenmeħtieġobjectWhen it happened, as precisely as it is known. precision TIME: start "YYYY-MM-DD" and time "HH:MM" (24-hour, in the case's time zone). DAY: start "YYYY-MM-DD". MONTH: start "YYYY-MM". YEAR: start "YYYY". PERIOD: start and end "YYYY-MM-DD", end after start. approximate: true when the date is an estimate; it is then written "c. …".
category"CONTRACT" | "DEADLINE" | "INCIDENT" | "FILING" | "CORRESPONDENCE" | "COURT_DATE" | …What kind of event it is; OTHER when absent
importantbooleanMarks a key event; exports can be limited to key events
agreement"UNMARKED" | "AGREED" | "DISPUTED"Whether the other side agrees that it happened this way: AGREED, DISPUTED, or UNMARKED (not assessed)
opposingVersionstring | nullThe other side's account of a DISPUTED event. Kept only while agreement is DISPUTED
commentstring | nullThe owner's private note. Exports print it only when asked to
confidentialbooleanLeave this event out whenever the timeline is shared or exported
sourcesarray of objectThe case documents that evidence the event, with an optional page or section ("p. 3"). Each documentId must be a document of this case. On update, the list replaces the event's sources
Data tat-tweġiba (201)
QasamTipDeskrizzjoni
caseIdmeħtieġstring
eventmeħtieġobject
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/timeline/events" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Landlord gave written notice of termination",
  "when": {
    "precision": "DAY",
    "start": "2026-03-02"
  },
  "category": "CORRESPONDENCE",
  "important": true,
  "agreement": "DISPUTED",
  "opposingVersion": "The landlord says the notice was handed over on 27 February.",
  "sources": [
    {
      "documentId": "doc_abc123",
      "locator": "p. 1"
    }
  ]
}'
PATCH/api/v1/cases/{caseId}/timeline/events/{eventId}updateTimelineEvent

Ibdel avveniment fil-kronoloġija ta' każ, jew ikkonferma wieħed li żied l-AI.

Ambitu:CASES_WRITE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
eventIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
titlestringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenobjectWhen it happened, as precisely as it is known. precision TIME: start "YYYY-MM-DD" and time "HH:MM" (24-hour, in the case's time zone). DAY: start "YYYY-MM-DD". MONTH: start "YYYY-MM". YEAR: start "YYYY". PERIOD: start and end "YYYY-MM-DD", end after start. approximate: true when the date is an estimate; it is then written "c. …".
category"CONTRACT" | "DEADLINE" | "INCIDENT" | "FILING" | "CORRESPONDENCE" | "COURT_DATE" | …What kind of event it is; OTHER when absent
importantbooleanMarks a key event; exports can be limited to key events
agreement"UNMARKED" | "AGREED" | "DISPUTED"Whether the other side agrees that it happened this way: AGREED, DISPUTED, or UNMARKED (not assessed)
opposingVersionstring | nullThe other side's account of a DISPUTED event. Kept only while agreement is DISPUTED
commentstring | nullThe owner's private note. Exports print it only when asked to
confidentialbooleanLeave this event out whenever the timeline is shared or exported
sourcesarray of objectThe case documents that evidence the event, with an optional page or section ("p. 3"). Each documentId must be a document of this case. On update, the list replaces the event's sources
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
caseIdmeħtieġstring
eventmeħtieġobject
curl
curl -X PATCH "https://attorly.ai/api/v1/cases/case_abc123/timeline/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
DELETE/api/v1/cases/{caseId}/timeline/events/{eventId}deleteTimelineEvent

Itlob it-tħassir ta' avveniment mill-kronoloġija ta' każ. L-avveniment jitħassar biss meta s-sid japprovah f'Attorly.

Ambitu:CASES_WRITE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
eventIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
caseIdmeħtieġstring
idmeħtieġstring
deletedmeħtieġbooleantrue only when the event is gone
statusmeħtieġ"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

Esporta l-kronoloġija ta' każ bħala fajl PDF, Word, ODT, Excel jew PowerPoint.

Ambitu:CASES_READ
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
layoutmeħtieġ"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
formatmeħtieġ"pdf" | "docx" | "odt" | "xlsx" | "pptx"The file type. overview and chronology: pdf, docx, odt, xlsx or pptx. numbered: pdf, docx or odt. visual: pdf or pptx
optionsobject
localestringLanguage of the file's headings, dates and file name, as a locale Attorly ships (e.g. "en", "nb", "de"); the account's language when absent or not offered
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
caseIdmeħtieġstring
layoutmeħtieġ"overview" | "chronology" | "numbered" | "visual"
formatmeħtieġ"pdf" | "docx" | "odt" | "xlsx" | "pptx"
localemeħtieġstringThe language the file is written in
eventCountmeħtieġintegerEvents in the file
exhibitCountmeħtieġintegerDocuments in the exhibit list (chronology and numbered layouts)
leftOutConfidentialmeħtieġintegerEvents left out because they are marked confidential
attachmentmeħtieġobject
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/timeline/export" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "layout": "chronology",
  "format": "docx",
  "options": {
    "markAgreement": true
  },
  "locale": "en"
}'
GET/api/v1/cases/{caseId}/deadlineslistCaseDeadlines

Elenka l-iskadenzi ta' każ, l-eqreb l-ewwel, b'ta' min hi kull skadenza u jekk hijiex lesta jew skaduta.

Ambitu:CASES_READ
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
Parametri tal-query
QasamTipDeskrizzjoni
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
casemeħtieġobject
deadlinesmeħtieġarray of objectSoonest first
countmeħtieġinteger
overdueCountmeħtieġinteger
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/deadlines?status=open" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/deadlinescreateCaseDeadline

Żid skadenza ma' każ, f'data partikolari jew magħduda minn fatt irreġistrat.

Ambitu:CASES_WRITE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
titlemeħtieġstringWhat must be done by then, in one line (at most 200 characters)
dueAtstring (date) | string (date-time)The due date. A day "YYYY-MM-DD" is due at the end of that day where the case applies (its country, else the owner's); a moment ("2026-03-02T09:00:00+01:00", a hearing) is kept as given
derivedFromobjectCount the date from a recorded date fact instead of giving dueAt: due = the fact's date + offsetDays. The deadline moves with the fact when the fact is corrected. Record the fact first with facts_record
kind"HEARING" | "FILING" | "DISCOVERY" | "STATUTE_OF_LIMITATIONS" | "CUSTOM"What kind of deadline it is; CUSTOM when absent
party"SELF" | "COUNTERPARTY"SELF: the owner must act by then. COUNTERPARTY: a window the other side set; SELF when absent
notesstring | nullA short note shown with the deadline and in its reminders (at most 500 characters), or null to clear it
Data tat-tweġiba (201)
QasamTipDeskrizzjoni
caseIdmeħtieġstring
deadlinemeħtieġobject
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/deadlines" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Reply to the landlord’s notice",
  "derivedFrom": {
    "factKey": "receivedAt",
    "offsetDays": 30
  },
  "kind": "FILING",
  "party": "SELF",
  "notes": "Object in writing"
}'
PATCH/api/v1/cases/{caseId}/deadlines/{deadlineId}updateCaseDeadline

Ibdel skadenza f'każ, jew immarkaha bħala lesta jew miftuħa mill-ġdid.

Ambitu:CASES_WRITE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
deadlineIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
titlestringWhat must be done by then, in one line (at most 200 characters)
dueAtstring (date) | string (date-time)The due date. A day "YYYY-MM-DD" is due at the end of that day where the case applies (its country, else the owner's); a moment ("2026-03-02T09:00:00+01:00", a hearing) is kept as given
derivedFromobjectCount the date from a recorded date fact instead of giving dueAt: due = the fact's date + offsetDays. The deadline moves with the fact when the fact is corrected. Record the fact first with facts_record
kind"HEARING" | "FILING" | "DISCOVERY" | "STATUTE_OF_LIMITATIONS" | "CUSTOM"What kind of deadline it is; CUSTOM when absent
party"SELF" | "COUNTERPARTY"SELF: the owner must act by then. COUNTERPARTY: a window the other side set; SELF when absent
notesstring | nullA short note shown with the deadline and in its reminders (at most 500 characters), or null to clear it
completedbooleantrue marks the deadline done; false reopens it
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
caseIdmeħtieġstring
deadlinemeħtieġobject
curl
curl -X PATCH "https://attorly.ai/api/v1/cases/case_abc123/deadlines/dl_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
GET/api/v1/cases/{caseId}/factslistCaseFacts

Elenka l-fatti rreġistrati f'każ, bis-sors tagħhom, u l-fatti li l-każ għad għandu bżonn.

Ambitu:CASES_READ
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
casemeħtieġobject
factsmeħtieġarray of object
countmeħtieġinteger
caseReadsmeħtieġobject | nullThe facts the case's rule reads, under exactly these keys; null when it reads none
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/facts" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/factsrecordCaseFact

Irreġistra fatt f'każ, jew ikkoreġih. L-iskadenzi magħduda minnu jiċċaqilqu miegħu.

Ambitu:CASES_WRITE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
keymeħtieġstringThe fact, as a camelCase key. facts_list names the facts this case reads, with their format; use one of those, or another camelCase key only for a fact none of them covers
valuemeħtieġstringThe value, in the format its key takes (a date fact: YYYY-MM-DD). It is stored in canonical form, so the result can differ from what was sent ("Lissabon" becomes LIS)
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
caseIdmeħtieġstring
outcomemeħtieġ"recorded" | "corrected" | "unchanged"recorded: a new fact; corrected: a new value replaced the old one; unchanged: it already held this value
factmeħtieġobject
movedDeadlinesmeħtieġarray of objectOpen deadlines counted from the fact that moved with the correction, due days before and after
urlmeħtieġstringWhere the case opens in Attorly
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/facts" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "receivedAt",
  "value": "2026-03-04"
}'
GET/api/v1/cases/{caseId}/partieslistCaseParties

Elenka l-partijiet ta' każ u r-rwoli li joffri l-każ.

Ambitu:CASES_READ
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
casemeħtieġobject
partiesmeħtieġarray of object
countmeħtieġinteger
rolesmeħtieġarray of objectThe roles the case offers; empty when it has no case type with roles
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/parties" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/partiescreateCaseParty

Żid parti ma' każ, f'wieħed mir-rwoli tiegħu.

Ambitu:CASES_WRITE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
roleKeymeħtieġstringThe role the party has in the case, as one of the roles parties_list returns (e.g. "landlord")
partyTypemeħtieġ"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
namemeħtieġstringThe party's name (at most 200 characters)
isSelfbooleantrue when this party is the person the connection acts for; false removes that link
orgNumberstringOrganisation number of an ENTITY
personalIdNumberstringNational identity number of a PERSON. Add it only when the owner gave it for this case
emailstring (email)E-mail address
phonestringPhone number
addressstringPostal address
representedBystringThe lawyer or representative acting for the party
notesstringThe owner's note about the party (at most 1000 characters)
positionintegerOrder within its role, 0 first
Data tat-tweġiba (201)
QasamTipDeskrizzjoni
caseIdmeħtieġstring
partymeħtieġobject
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/parties" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "roleKey": "landlord",
  "partyType": "ENTITY",
  "name": "Fjord Eiendom AS",
  "orgNumber": "999999999",
  "email": "[email protected]"
}'
PATCH/api/v1/cases/{caseId}/parties/{partyId}updateCaseParty

Ibdel id-dettalji ta' parti f'każ.

Ambitu:CASES_WRITE
Parametri tal-mogħdija
QasamTipDeskrizzjoni
caseIdmeħtieġstring
partyIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
partyType"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
namestringThe party's name (at most 200 characters)
isSelfbooleantrue when this party is the person the connection acts for; false removes that link
orgNumberstring | null
personalIdNumberstring | null
emailstring (email) | null
phonestring | null
addressstring | null
representedBystring | null
notesstring | null
positionintegerOrder within its role, 0 first
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
caseIdmeħtieġstring
partymeħtieġobject
curl
curl -X PATCH "https://attorly.ai/api/v1/cases/case_abc123/parties/party_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Operazzjonijiet

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

Ikseb l-istatus u r-riżultat ta' talba mibgħuta b'Prefer jew Idempotency-Key.

Parametri tal-mogħdija
QasamTipDeskrizzjoni
operationIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstringop_…
objectmeħtieġ"operation"
operationIdmeħtieġstringThe REST operation that was called, e.g. createRedlines
statusmeħtieġ"running" | "awaiting_approval" | "succeeded" | "failed"
livemodemeħtieġboolean
idempotencyKeystring | null
resultUrlmeħtieġstringWhere to poll: /api/v1/operations/{id}
createdAtmeħtieġstring (date-time)
completedAtmeħtieġstring (date-time) | null
expiresAtmeħtieġstring (date-time)
httpStatusmeħtieġinteger | null
resultmeħtieġanyThe data of the successful call
metaobject
errormeħtieġobject | null
curl
curl "https://attorly.ai/api/v1/operations/op_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Webhooks

GET/api/v1/webhook-endpointslistWebhookEndpoints

Elenka l-endpoints tal-webhooks tal-organizzazzjoni u tal-mod tal-key.

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

Oħloq endpoint ta' webhook. It-tweġiba fiha s-sigriet tal-iffirmar tiegħu, muri darba biss.

Kontenut tat-talba
QasamTipDeskrizzjoni
urlmeħtieġstring (uri)HTTPS URL that receives the events
descriptionstring
enabledEventsmeħtieġarray of stringEvent types to receive, or ["*"] for all
includeSnapshotsbooleanSend object snapshots instead of thin { id, object } payloads, for operations made with organization API keys (calls made with personal keys and connected apps always send thin payloads). Organization owners and admins only.
Data tat-tweġiba (201)
QasamTipDeskrizzjoni
idmeħtieġstringwe_…
objectmeħtieġ"webhook_endpoint"
urlmeħtieġstring
descriptionstring | null
enabledEventsmeħtieġarray of string
statusmeħtieġ"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodemeħtieġboolean
includeSnapshotsmeħtieġboolean
apiVersionmeħtieġstring
failingSincestring (date-time) | null
createdAtmeħtieġstring (date-time)
updatedAtmeħtieġstring (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl -X POST "https://attorly.ai/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/attorly/webhooks",
  "description": "Production receiver",
  "enabledEvents": [
    "analysis.completed",
    "operation.succeeded",
    "operation.failed"
  ]
}'
GET/api/v1/webhook-endpoints/{endpointId}getWebhookEndpoint

Ikseb endpoint ta' webhook.

Parametri tal-mogħdija
QasamTipDeskrizzjoni
endpointIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstringwe_…
objectmeħtieġ"webhook_endpoint"
urlmeħtieġstring
descriptionstring | null
enabledEventsmeħtieġarray of string
statusmeħtieġ"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodemeħtieġboolean
includeSnapshotsmeħtieġboolean
apiVersionmeħtieġstring
failingSincestring (date-time) | null
createdAtmeħtieġstring (date-time)
updatedAtmeħtieġstring (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
PATCH/api/v1/webhook-endpoints/{endpointId}updateWebhookEndpoint

Ibdel il-URL, l-avvenimenti jew is-snapshots ta' endpoint, jew iddiżattivah u attivah.

Parametri tal-mogħdija
QasamTipDeskrizzjoni
endpointIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstringwe_…
objectmeħtieġ"webhook_endpoint"
urlmeħtieġstring
descriptionstring | null
enabledEventsmeħtieġarray of string
statusmeħtieġ"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodemeħtieġboolean
includeSnapshotsmeħtieġboolean
apiVersionmeħtieġstring
failingSincestring (date-time) | null
createdAtmeħtieġstring (date-time)
updatedAtmeħtieġstring (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl -X PATCH "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
DELETE/api/v1/webhook-endpoints/{endpointId}deleteWebhookEndpoint

Ħassar endpoint ta' webhook u l-istorja tal-konsenji tiegħu.

Parametri tal-mogħdija
QasamTipDeskrizzjoni
endpointIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstring
objectmeħtieġ"webhook_endpoint"
deletedmeħtieġtrue
curl
curl -X DELETE "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
POST/api/v1/webhook-endpoints/{endpointId}/secret-rollsrollWebhookEndpointSecret

Ibdel is-sigriet tal-iffirmar. Dak l-antik jibqa' jiffirma għal 24 siegħa.

Parametri tal-mogħdija
QasamTipDeskrizzjoni
endpointIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstringwe_…
objectmeħtieġ"webhook_endpoint"
urlmeħtieġstring
descriptionstring | null
enabledEventsmeħtieġarray of string
statusmeħtieġ"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodemeħtieġboolean
includeSnapshotsmeħtieġboolean
apiVersionmeħtieġstring
failingSincestring (date-time) | null
createdAtmeħtieġstring (date-time)
updatedAtmeħtieġstring (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl -X POST "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId/secret-rolls" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
POST/api/v1/webhook-endpoints/{endpointId}/test-eventssendWebhookTestEvent

Ibgħat avveniment webhook_endpoint.test lil dan l-endpoint biss.

Parametri tal-mogħdija
QasamTipDeskrizzjoni
endpointIdmeħtieġstring
Data tat-tweġiba (202)
QasamTipDeskrizzjoni
eventIdmeħtieġstring
curl
curl -X POST "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId/test-events" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
GET/api/v1/webhook-endpoints/{endpointId}/deliverieslistWebhookDeliveries

Elenka l-konsenji ta' endpoint, l-aktar ġodda l-ewwel, bit-tentattivi u r-riżultat tagħhom.

Parametri tal-mogħdija
QasamTipDeskrizzjoni
endpointIdmeħtieġstring
Parametri tal-query
QasamTipDeskrizzjoni
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"

Avvenimenti

GET/api/v1/eventslistEvents

Elenka l-avvenimenti tal-aħħar 30 jum, l-aktar ġodda l-ewwel.

Parametri tal-query
QasamTipDeskrizzjoni
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

Ikseb avveniment kif jirċevuh l-endpoints tal-webhooks.

Parametri tal-mogħdija
QasamTipDeskrizzjoni
eventIdmeħtieġstring
Data tat-tweġiba (200)
QasamTipDeskrizzjoni
idmeħtieġstringevt_… — also sent as the webhook-id header; deduplicate on it
objectmeħtieġ"event"
typemeħtieġ"analysis.completed" | "analysis.failed" | "redlines.generated" | "due_diligence.report.completed" | "operation.succeeded" | "operation.failed" | …
apiVersionmeħtieġstring
createdAtmeħtieġstring (date-time)
livemodemeħtieġboolean
datameħtieġobject
curl
curl "https://attorly.ai/api/v1/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/events/{eventId}/redeliveriesredeliverEvent

Erġa' ibgħat avveniment, lil endpoint wieħed jew lil kull endpoint abbonat għalih.

Parametri tal-mogħdija
QasamTipDeskrizzjoni
eventIdmeħtieġstring
Kontenut tat-talba
QasamTipDeskrizzjoni
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
Data tat-tweġiba (202)
QasamTipDeskrizzjoni
eventIdmeħtieġstring
deliveriesScheduledmeħtieġinteger
curl
curl -X POST "https://attorly.ai/api/v1/events/your_eventId/redeliveries" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "endpointId": "we_abc123"
}'

Kont, użu u reġistri

GET/api/v1/organizationgetOrganization

L-organizzazzjoni tal-key: pjan, krediti tal-AI, ġurisdizzjoni awtomatika u x'tista' tagħmel il-key.

Data tat-tweġiba (200)
QasamTipDeskrizzjoni
organizationmeħtieġobject
usermeħtieġobject
planmeħtieġstringSTANDARD, PRO or ENTERPRISE
billingmeħtieġobject
defaultJurisdictionmeħtieġstring | nullISO 3166-1 alpha-2 country used when a document names no governing law
credentialmeħtieġobject
appUrlmeħtieġstring
curl
curl "https://attorly.ai/api/v1/organization" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/usagegetUsage

Talbiet kuljum, skont il-key u l-operazzjoni, bl-għadd tal-iżbalji, fuq REST u MCP.

Parametri tal-query
QasamTipDeskrizzjoni
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

Elenka t-talbiet tal-API tal-organizzazzjoni tal-aħħar 30 jum, l-aktar ġodda l-ewwel.

Parametri tal-query
QasamTipDeskrizzjoni
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

Min sejjaħ xiex, meta u b'liema key. Għas-sidien u l-amministraturi tal-organizzazzjoni.

Parametri tal-query
QasamTipDeskrizzjoni
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

Ħassar kull oġġett, avveniment u operazzjoni tal-mod tat-test tal-organizzazzjoni. Keys tat-test biss.

Data tat-tweġiba (200)
QasamTipDeskrizzjoni
objectmeħtieġ"test_data_purge"
deletedmeħtieġobject
curl
curl -X DELETE "https://attorly.ai/api/v1/test-data" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"