Joan eduki nagusira

Garatzaileak

REST APIaren dokumentazioa

Attorlyren AA juridikorako JSON-over-HTTPS API bat. MCP zerbitzariaren eragiketa berberak exekutatzen ditu, gako, irismen, muga eta fakturazio berberekin.

Hasiera azkarra

Kargatu kontratu bat eta aztertu lau urratsetan.

  1. 1. Sortu gako bat

    Sortu gako bat Ezarpenak › Garatzaileak atalean eta aukeratu REST APIa. Gako berak MCP zerbitzarirako ere balio du. Gorde ingurune-aldagai batean:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Kargatu dokumentu bat

    Bidali fitxategia multipart/form-data gisa. Erantzuneko data.id dokumentuaren IDa da. analyze=false aukerak dokumentua gordetzen du atzeko planoko analisia abiarazi gabe, hurrengo urratsak bat exekutatzen baitu.

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

    Prefer: wait=30 goiburuak 30 segundo arte itxaroten du emaitzari. Amaitutako analisia 200 gisa itzultzen da, emaitza data barruan duela. Gehiago irauten badu, 202 Accepted jasotzen duzu, eragiketara seinalatzen duen Location goiburu batekin.

    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. Jaso emaitza

    Kontsultatu eragiketa aldizka haren status succeeded edo failed izan arte. Analisia result barruan dago. Retry-Afterek adierazten du kontsulten artean zenbat segundo itxaron.

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

Autentifikazioa

Bidali kredentzial bat Authorization goiburuan Bearer token gisa. Ezarpenak › Garatzaileak ataleko gakoek lbmcp_ hasiera dute eta Pro eta Enterprise planetan funtzionatzen dute, bai REST APIrako bai MCP zerbitzarirako. Enterprise erakundeen gakoek atly_ hasiera dute (atly_rk_ gako mugatuetarako, atly_test_ proba modurako); lb_ gako zaharrek funtzionatzen jarraitzen dute. Pertsona baten izenean jarduten duten aplikazioek OAuth erabiltzen dute.

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

Irismenak

Amaiera-puntu bakoitzak ondoan zerrendatutako irismenak behar ditu. Haiek ez dituen gako batek 403 insufficient_scope jasotzen du, eta erroreko requiredScopes eremuak deiak behar dituen irismen guztiak zerrendatzen ditu. Erakundeen API gakoek eta OAuth-ek irismen-izen hauek erabiltzen dituzte:

IrismenaErakundearen API gakoaren irismena
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

Erroreak

Errore guztiek forma bera dute: adarkatzeko kode egonkor bat, pertsonentzako mezu bat eta laguntza-zerbitzuari aipatzeko requestId bat.

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

Kode bakoitza eta harekin zer egin azaltzen dira errore-kodeen orrian

Bertsioak

APIaren bertsioak dataren arabera izendatzen dira. Bidali Attorly-Version eskaera baterako bertsio bat aukeratzeko; hura gabe, eskaera batek bere gakoa sortu zeneko bertsioa erabiltzen du (bertsioak baino lehen sortutako gakoek 2026-10-01 erabiltzen dute). Erantzun orok adierazten du zein bertsiok erantzun duen. Aldaketa hausleak bertsio berri batean bakarrik datoz, eta aldaketa-erregistroak zerrendatzen ditu.

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

Idenpotentzia

Bidali Idempotency-Key goiburu bat, adibidez UUID bat, POST, PATCH eta DELETE eskaeretan. Gako eta eskaera berarekin egindako errepikapen batek lehen erantzuna jasotzen du berriro, Idempotent-Replayed: true goiburuarekin, eta lana ez da berriro exekutatzen ezta fakturatzen ere. Beste eskaera baterako berrerabilitako gako batek 422 idempotency_key_reused jasotzen du, eta oraindik exekutatzen ari den batek 409 edo, iraupen luzeko dei batean, eragiketa bera. Zerbitzari-erroreak ez dira gordetzen; beraz, haien errepikapena berriro exekutatzen da. Gakoak 24 orduz gordetzen dira.

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

Iraupen luzeko eskaerak

2026-11-01 bertsiotik aurrera, analisi osoek, zuzenketa-markek, negoziazio-playbookek, lan-fluxuek, due diligence txostenek eta AA zirriborroek 202 Accepted erantzuten dute berehala, eragiketa batekin. Bidali Prefer: wait=30 lehenik emaitzari 30 segundo arte (gehienez 60) itxaroteko, edo Prefer: respond-async edozein idazketatan 202 eskatzeko. Kontsultatu Location aldizka status succeeded edo failed izan arte, edo harpidetu operation.succeeded gertaerara. Emaitzak 24 orduz gordetzen dira. Gehienez iraupen luzeko 5 AA eragiketa exekutatzen dira aldi berean erakunde bakoitzeko; gehiagok 429 concurrency_limit_exceeded jasotzen dute.

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

Orrikatzea

Zerrendek { object: "list", data, hasMore, nextCursor } itzultzen dute eta limit (1etik 100era, lehenespenez 20) eta cursor onartzen dituzte. Hurrengo orria lortzeko, bidali nextCursor cursor gisa. Azken orrian, nextCursor null da. Kurtsoreak baliozkoak dira elementu berriak gehitzen diren bitartean.

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…

Abiadura-mugak

Eskaera bat hainbat leihotan zenbatzen da: gakoaren orduko muga, minutuko 300 pertsona bakoitzeko, minutuko 600 erakunde bakoitzeko, gako bakoitzeko minutuko muga bat irakurketetarako, idazketetarako eta AA deietarako, eta eragiketa bakoitzaren muga propioa. RESTek eta MCPk kontagailu berberak partekatzen dituzte. RateLimit-Policy eta RateLimit goiburuek leiho guztiak erakusten dituzte; X-RateLimit-* goiburuak agortzear dagoena erakusten du. Muga bat gainditzean, 429 jasotzen duzu Retry-Afterrekin.

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

Webhookak

Sortu amaiera-puntu bat POST /api/v1/webhook-endpoints bidez lana amaitzen denean abisua jasotzeko, aldizka kontsultatu beharrean. Attorlyk POST bat bidaltzen du JSON gertaera batekin eta Standard Webhooks arauaren arabera sinatzen du amaiera-puntuaren whsec_ sekretuarekin. Egiaztatu sinadura gorputzaz fidatu aurretik, erantzun 2xx 15 segundoren barruan eta kendu bikoiztuak webhook-id erabiliz: huts egindako bidalketak 72 orduz errepikatzen dira. Sekretua berritu, proba-gertaera bat bidali eta bidalketa guztiak ikus ditzakezu.

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

Proba modua

Proba-gakoak (atly_test_…) amaiera-puntu guztietara iristen dira, baina proba-datu bereizietan lan egiten dute eta lagin-emaitza finkoak itzultzen dituzte: ez da AArik exekutatzen eta ez da krediturik erabiltzen. Proba-gako batek ez ditu inoiz benetako datuak ikusten. Jarri balio magiko bat, hala nola __fail_credits__, __fail_consent__ edo __slow__, edozein testu-eremutan huts hori edo atzerapen hori lortzeko. DELETE /api/v1/test-data eskaerak proba-gako batek sortutako guztia garbitzen du.

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

Attorly erabiltzaile baten izenean jarduten duten aplikazioek OAuth 2.1 bidez hasten dute saioa: aurkikuntza /.well-known/oauth-authorization-server helbidean, bezeroen erregistro dinamikoa eta baimen-kodearen fluxua PKCErekin (S256). Eskatu resource=https://attorly.ai/api/v1 REST APIrako token bat lortzeko; MCP zerbitzarirako igorritako token bat hemen ukatu egiten da. Gehitu offline_access freskatze-token bat lortzeko. Pertsonak erakundea aukeratzen du eta irismenak murriz ditzake baimen-pantailan.

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

Fakturazioa

AA exekutatzen duten eragiketek Attorly aplikazioaren AA kreditu berberak erabiltzen dituzte, gakoaren jabearen zorrotik edo haren erakundearenetik, REST edo MCP bidez deitu. Kredituak agortzen direnean, 402 insufficient_credits jasotzen duzu. Proba moduko deiak doakoak dira.

Planak

APIa Pro eta Enterprise planetan dago sartuta. Gakoaren jabearen planak APIrako sarbiderik ez badu jada, edo jabeak erakundea utzi badu, eskaerak 403 errorearekin ukatzen dira.

Erreferentzia

Eragiketa guztiak, APIak zerbitzatzen duen OpenAPI dokumentutik sortuak. Bideak https://attorly.ai helbidearekiko erlatiboak dira. Erantzun arrakastatsuek emaitza data barruan biltzen dute. Eremuen deskribapenak ingelesez daude.

Dokumentuak

GET/api/v1/documentslistDocuments

Zerrendatu gakoak irakur ditzakeen gordetako dokumentuak, berrienak lehenik.

Irismena:DOCUMENTS_READ
Kontsulta-parametroak
EremuaMotaDeskribapena
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

Kargatu dokumentu bat multipart/form-data gisa, edo JSON gisa base64 edukiarekin edo testu soilarekin. Atzeko planoan aztertzen da, analyze false ez bada.

Irismena:DOCUMENTS_WRITEAA kredituak erabiltzen dituFitxategi-kargak onartzen ditu
Eskaeraren gorputza
EremuaMotaDeskribapena
filenamederrigorrezkoastringThe 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
Erantzunaren datuak (201)
EremuaMotaDeskribapena
idderrigorrezkoastring
namederrigorrezkoastring
originalNamederrigorrezkoastring
typederrigorrezkoa"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
sizederrigorrezkoainteger
statusderrigorrezkoa"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
analysisQueuedderrigorrezkoabooleantrue when the background analysis was started
createdAtderrigorrezkoastringISO 8601 date-time
urlderrigorrezkoastringWhere 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

Bilatu gakoak irakur ditzakeen dokumentuen testuan, esanahiaren arabera eta hitz zehatzen arabera.

Irismena:DOCUMENTS_READ
Kontsulta-parametroak
EremuaMotaDeskribapena
queryderrigorrezkoastringWhat 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

Lortu dokumentu bat, haren prozesatze-egoera eta haren azken analisia.

Irismena:DOCUMENTS_READ
Bide-parametroak
EremuaMotaDeskribapena
documentIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastring
namederrigorrezkoastring
originalNamederrigorrezkoastring
typederrigorrezkoa"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
mimeTypederrigorrezkoastring
sizederrigorrezkoainteger
statusderrigorrezkoa"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
archivedderrigorrezkoaboolean
ownedByYouderrigorrezkoaboolean
versionNumberderrigorrezkoainteger | 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.
createdAtderrigorrezkoastringISO 8601 date-time
updatedAtderrigorrezkoastringISO 8601 date-time
fileAvailablederrigorrezkoabooleanfalse when the stored file can no longer be read
governingLawRequiredderrigorrezkoabooleantrue when the analysis is held until a governing law is chosen for the document in Attorly
latestAnalysisderrigorrezkoaobject | null
urlderrigorrezkoastringWhere 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

Eskatu zurea den dokumentu bat ezabatzeko. Dokumentua Attorlyn onartzen duzunean bakarrik ezabatzen da.

Irismena:DOCUMENTS_DELETE
Bide-parametroak
EremuaMotaDeskribapena
documentIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastring
deletedderrigorrezkoabooleantrue only when the document is gone
statusderrigorrezkoa"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

Aztertu dokumentu bat edo lerroko testua. mode full (gordetako dokumentua) edo quick da.

Irismena:DOCUMENTS_ANALYZEDOCUMENTS_READAA kredituak erabiltzen ditu

Gorputzaren mode eremuak hauetako bat hautatzen du: mode: full, mode: quick.

Eskaeraren gorputza
EremuaMotaDeskribapena
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

Zerrendatu dokumentu baten gordetako analisiak, berrienak lehenik.

Irismena:DOCUMENTS_READ
Bide-parametroak
EremuaMotaDeskribapena
documentIdderrigorrezkoastring
Kontsulta-parametroak
EremuaMotaDeskribapena
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

Aztertu gordetako dokumentu bat.

Irismena:DOCUMENTS_ANALYZEDOCUMENTS_READAA kredituak erabiltzen ditu
Bide-parametroak
EremuaMotaDeskribapena
documentIdderrigorrezkoastring

Gorputzaren mode eremuak hauetako bat hautatzen du: mode: full, mode: quick.

Eskaeraren gorputza
EremuaMotaDeskribapena
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

Atera gordetako PDF edo DOCX dokumentu baten testu soila.

Irismena:DOCUMENTS_READ
Bide-parametroak
EremuaMotaDeskribapena
documentIdderrigorrezkoastring
Kontsulta-parametroak
EremuaMotaDeskribapena
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
Erantzunaren datuak (200)
EremuaMotaDeskribapena
textderrigorrezkoastringThe document text from offset (untrusted content)
documentNamederrigorrezkoastring
documentTypederrigorrezkoastring
mimeTypederrigorrezkoastring | null
characterCountderrigorrezkoaintegerCharacters in the whole document
wordCountderrigorrezkoaintegerWords in the whole document
offsetderrigorrezkoainteger
nextOffsetderrigorrezkoainteger | nullPass as offset to read on; null when the text ends here
truncatedderrigorrezkoabooleantrue 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

Lortu gordetako analisi bat: laburpena, arriskua, funtsezko baldintzak, klausulak eta gomendioak.

Irismena:DOCUMENTS_READ
Bide-parametroak
EremuaMotaDeskribapena
analysisIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastring
documentIdderrigorrezkoastring
documentNamederrigorrezkoastring
summaryderrigorrezkoastring | null
riskLevelderrigorrezkoa"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskScorederrigorrezkoanumber
keyTermsderrigorrezkoaarray of any
clausesderrigorrezkoaarray of any
recommendationsderrigorrezkoaarray of any
modederrigorrezkoastringSINGLE or CONSENSUS
createdAtderrigorrezkoastringISO 8601 date-time
urlderrigorrezkoastring
curl
curl "https://attorly.ai/api/v1/analyses/your_analysisId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/comparisonscreateComparison

Konparatu bi dokumentu edo testu lerroz lerro.

Irismena:DOCUMENTS_READ
Eskaeraren gorputza
EremuaMotaDeskribapena
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
differencesderrigorrezkoaarray of object
summaryderrigorrezkoaobject
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"
}'

Klausulak

GET/api/v1/clausessearchClauses

Bilatu klausula-liburutegian.

Irismena:CLAUSES_READ
Kontsulta-parametroak
EremuaMotaDeskribapena
queryderrigorrezkoastring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
Erantzunaren datuak (200)
EremuaMotaDeskribapena
clausesderrigorrezkoaarray of object
countderrigorrezkoainteger
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

Ebaluatu klausula baten arriskua.

Irismena:CLAUSES_READ
Eskaeraren gorputza
EremuaMotaDeskribapena
clauseTextderrigorrezkoastring
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" | …
Erantzunaren datuak (200)
EremuaMotaDeskribapena
clauseTextstring
clauseTypederrigorrezkoastring
jurisdictionderrigorrezkoastring
overallRiskScorederrigorrezkoanumber
riskLevelderrigorrezkoa"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskFactorsderrigorrezkoaarray of object
recommendationsderrigorrezkoaarray 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

Konparatu klausula bat merkatuko hizkera estandarrarekin.

Irismena:CLAUSES_READ
Eskaeraren gorputza
EremuaMotaDeskribapena
clauseTextderrigorrezkoastring
categoryderrigorrezkoa"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
inputClausederrigorrezkoastring
categoryderrigorrezkoastring
marketStandardsderrigorrezkoaarray of object
comparisonderrigorrezkoaobject
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

Egiaztatu klausula bat playbook baten aurka.

Irismena:CLAUSES_READ
Eskaeraren gorputza
EremuaMotaDeskribapena
clauseTextderrigorrezkoastring
playbookIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
playbookNamederrigorrezkoastring
compliantderrigorrezkoaboolean
violationsderrigorrezkoaarray of string
warningsderrigorrezkoaarray of string
rulesCheckedderrigorrezkoainteger
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"
}'

Ikerketa

POST/api/v1/research/searchessearchResearch

Bilatu iturri juridikoetan, hala nola Lovdata, EUR-Lex eta CourtListener.

Irismena:RESEARCH_READAA kredituak erabiltzen ditu
Eskaeraren gorputza
EremuaMotaDeskribapena
queryderrigorrezkoastring
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
Erantzunaren datuak (200)
EremuaMotaDeskribapena
queryderrigorrezkoastring
jurisdictionderrigorrezkoastring
resultsderrigorrezkoaarray of object
totalCountderrigorrezkoaintegerResults 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

Bilatu lege bat aipuaren bidez.

Irismena:RESEARCH_READAA kredituak erabiltzen ditu
Kontsulta-parametroak
EremuaMotaDeskribapena
citationderrigorrezkoastring
jurisdictionderrigorrezkoastringISO 3166-1 alpha-2 country code, or "EU"
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastring
titlederrigorrezkoastring
sourcederrigorrezkoastring
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"

Zuzenketa-markak

POST/api/v1/redlinescreateRedlines

Sortu zuzenketa-proposamenak dokumentu edo testu baterako.

Irismena:REDLINES_GENERATEAA kredituak erabiltzen ditu
Eskaeraren gorputza
EremuaMotaDeskribapena
documentIdstring
contentstring
partyRolederrigorrezkoa"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
Erantzunaren datuak (200)
EremuaMotaDeskribapena
changesderrigorrezkoaarray of object
summaryobject
negotiationNotesarray of string
statisticsderrigorrezkoaobject
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

Onartu edo baztertu dokumentu bateko zuzenketa-aldaketak.

Irismena:REDLINES_GENERATE
Bide-parametroak
EremuaMotaDeskribapena
documentIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
changesderrigorrezkoaarray of object
Erantzunaren datuak (200)
EremuaMotaDeskribapena
acceptedderrigorrezkoainteger
rejectedderrigorrezkoainteger
messagederrigorrezkoastring
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"
    }
  ]
}'

Negoziazioak

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

Aztertu negoziazio-jarrera bat.

Irismena:NEGOTIATIONS_READAA kredituak erabiltzen ditu
Eskaeraren gorputza
EremuaMotaDeskribapena
documentIdstring
contentstring
partyRolederrigorrezkoa"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
Erantzunaren datuak (200)
EremuaMotaDeskribapena
overallPositionderrigorrezkoastringFAVORABLE, BALANCED or UNFAVORABLE
positionsderrigorrezkoaarray 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

Eraiki negoziazio-playbook bat estrategia batetik.

Irismena:NEGOTIATIONS_READAA kredituak erabiltzen ditu
Eskaeraren gorputza
EremuaMotaDeskribapena
strategyderrigorrezkoaobject
contextobject
Erantzunaren datuak (200)
EremuaMotaDeskribapena
playbookderrigorrezkoaarray of object
anticipatedObjectionsderrigorrezkoaarray of object
recommendationsderrigorrezkoaarray of string
summaryderrigorrezkoaobject
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"
    ]
  }
}'

Lan-fluxuak

GET/api/v1/workflows/templateslistWorkflowTemplates

Zerrendatu lan-fluxuen txantiloiak.

Irismena:WORKFLOWS_EXECUTE
Kontsulta-parametroak
EremuaMotaDeskribapena
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

Zerrendatu lan-fluxuen exekuzioak, berrienak lehenik, aukeran proiektu edo egoera baterako.

Irismena:WORKFLOWS_EXECUTE
Kontsulta-parametroak
EremuaMotaDeskribapena
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

Abiarazi lan-fluxu bat due diligence proiektu batean.

Irismena:WORKFLOWS_EXECUTEAA kredituak erabiltzen ditu
Eskaeraren gorputza
EremuaMotaDeskribapena
templateIdderrigorrezkoastring
projectIdderrigorrezkoastring
inputsderrigorrezkoaobject
optionsobject
Erantzunaren datuak (202)
EremuaMotaDeskribapena
executionIdderrigorrezkoastring
templateIdderrigorrezkoastring
templateNamederrigorrezkoastring
statusderrigorrezkoastring
startedAtderrigorrezkoastringISO 8601 date-time
messagederrigorrezkoastring
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

Lortu lan-fluxu baten exekuzioaren egoera.

Irismena:WORKFLOWS_EXECUTE
Bide-parametroak
EremuaMotaDeskribapena
executionIdderrigorrezkoastring
Kontsulta-parametroak
EremuaMotaDeskribapena
includeStepsboolean
Erantzunaren datuak (200)
EremuaMotaDeskribapena
executionIdderrigorrezkoastring
templateNamederrigorrezkoastring
statusderrigorrezkoastring
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

Zerrendatu due diligence proiektuak, berrienak lehenik.

Irismena:DUE_DILIGENCE_FULL
Kontsulta-parametroak
EremuaMotaDeskribapena
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

Sortu due diligence proiektu bat.

Irismena:DUE_DILIGENCE_FULL
Eskaeraren gorputza
EremuaMotaDeskribapena
namederrigorrezkoastring
dealTypederrigorrezkoa"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
Erantzunaren datuak (201)
EremuaMotaDeskribapena
projectIdderrigorrezkoastring
namederrigorrezkoastring
projectTypederrigorrezkoastring
statusderrigorrezkoastring
createdAtderrigorrezkoastringISO 8601 date-time
messagederrigorrezkoastring
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

Lortu due diligence proiektu bat, haren dokumentu- eta aurkikuntza-kopuruekin.

Irismena:DUE_DILIGENCE_FULL
Bide-parametroak
EremuaMotaDeskribapena
projectIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastring
namederrigorrezkoastring
descriptionderrigorrezkoastring | null
projectTypederrigorrezkoastring
statusderrigorrezkoastring
priorityderrigorrezkoastring
targetCompanyderrigorrezkoastring | null
dueDatederrigorrezkoastring | null
documentCountderrigorrezkoainteger
findingCountderrigorrezkoainteger
createdAtderrigorrezkoastringISO 8601 date-time
updatedAtderrigorrezkoastringISO 8601 date-time
completedAtderrigorrezkoastring | 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

Gehitu dokumentuak due diligence proiektu batera.

Irismena:DUE_DILIGENCE_FULL
Bide-parametroak
EremuaMotaDeskribapena
projectIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
documentIdsderrigorrezkoaarray of string
categorystring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
projectIdderrigorrezkoastring
documentsAddedderrigorrezkoainteger
totalDocumentsderrigorrezkoainteger
categoryderrigorrezkoastring
messagederrigorrezkoastring
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

Zerrendatu due diligence proiektu baten aurkikuntzak.

Irismena:DUE_DILIGENCE_FULL
Bide-parametroak
EremuaMotaDeskribapena
projectIdderrigorrezkoastring
Kontsulta-parametroak
EremuaMotaDeskribapena
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
Erantzunaren datuak (200)
EremuaMotaDeskribapena
projectIdderrigorrezkoastring
projectNamederrigorrezkoastring
findingsderrigorrezkoaarray of object
riskSummaryderrigorrezkoaobjectNumber of findings per severity
totalFindingsderrigorrezkoainteger
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

Sortu due diligence txosten bat.

Irismena:DUE_DILIGENCE_FULL
Bide-parametroak
EremuaMotaDeskribapena
projectIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
formatderrigorrezkoa"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
Erantzunaren datuak (201)
EremuaMotaDeskribapena
reportIdderrigorrezkoastring
projectIdderrigorrezkoastring
projectNamestring
formatderrigorrezkoa"pdf" | "markdown"
statusderrigorrezkoastring
sectionsarray of string
documentCountinteger
findingCountinteger
markdownderrigorrezkoastring
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"
}'

Txantiloiak eta zirriborroak

GET/api/v1/templateslistTemplates

Zerrendatu dokumentu-txantiloiak.

Irismena:TEMPLATES_READ
Kontsulta-parametroak
EremuaMotaDeskribapena
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

Sortu zirriborro bat txantiloi batetik (mode template) edo AArekin (mode ai).

Irismena:TEMPLATES_DRAFTAA kredituak erabiltzen ditu

Gorputzaren mode eremuak hauetako bat hautatzen du: mode: template, mode: ai.

Eskaeraren gorputza
EremuaMotaDeskribapena
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"
  }
}'

Kasuak

GET/api/v1/caseslistCases

Zerrendatu zure kasuak, azken aldiz aldatutakoak lehenik.

Irismena:CASES_READ
Kontsulta-parametroak
EremuaMotaDeskribapena
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

Lortu kasu baten kronologia: gertaera bakoitza bere datarekin, frogekin eta beste aldearen jarrerarekin.

Irismena:CASES_READ
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
casederrigorrezkoaobject
eventsderrigorrezkoaarray of objectIn date order
countderrigorrezkoainteger
needsReviewCountderrigorrezkoaintegerEvents an AI added that no person has confirmed
deletionRequestedCountderrigorrezkoaintegerEvents 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

Gehitu gertaera bat kasu baten kronologiara.

Irismena:CASES_WRITE
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
titlederrigorrezkoastringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenderrigorrezkoaobjectWhen 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
Erantzunaren datuak (201)
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
eventderrigorrezkoaobject
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

Aldatu kasu baten kronologiako gertaera bat, edo berretsi AAk gehitutako bat.

Irismena:CASES_WRITE
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
eventIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
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
Erantzunaren datuak (200)
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
eventderrigorrezkoaobject
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

Eskatu kasu baten kronologiako gertaera bat ezabatzeko. Gertaera jabeak Attorlyn onartzen duenean bakarrik ezabatzen da.

Irismena:CASES_WRITE
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
eventIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
idderrigorrezkoastring
deletedderrigorrezkoabooleantrue only when the event is gone
statusderrigorrezkoa"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

Esportatu kasu baten kronologia PDF, Word, ODT, Excel edo PowerPoint fitxategi gisa.

Irismena:CASES_READ
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
layoutderrigorrezkoa"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
formatderrigorrezkoa"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
Erantzunaren datuak (200)
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
layoutderrigorrezkoa"overview" | "chronology" | "numbered" | "visual"
formatderrigorrezkoa"pdf" | "docx" | "odt" | "xlsx" | "pptx"
localederrigorrezkoastringThe language the file is written in
eventCountderrigorrezkoaintegerEvents in the file
exhibitCountderrigorrezkoaintegerDocuments in the exhibit list (chronology and numbered layouts)
leftOutConfidentialderrigorrezkoaintegerEvents left out because they are marked confidential
attachmentderrigorrezkoaobject
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

Zerrendatu kasu baten epeak, hurbilenak lehenik, bakoitza norena den eta egina edo epez kanpo dagoen adierazita.

Irismena:CASES_READ
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
Kontsulta-parametroak
EremuaMotaDeskribapena
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
Erantzunaren datuak (200)
EremuaMotaDeskribapena
casederrigorrezkoaobject
deadlinesderrigorrezkoaarray of objectSoonest first
countderrigorrezkoainteger
overdueCountderrigorrezkoainteger
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

Gehitu epe bat kasu bati, data jakin batean edo erregistratutako datu batetik zenbatuta.

Irismena:CASES_WRITE
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
titlederrigorrezkoastringWhat 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
Erantzunaren datuak (201)
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
deadlinederrigorrezkoaobject
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

Aldatu kasu bateko epe bat, edo markatu egina edo berriro ireki.

Irismena:CASES_WRITE
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
deadlineIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
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
Erantzunaren datuak (200)
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
deadlinederrigorrezkoaobject
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

Zerrendatu kasu batean erregistratutako datuak, haien iturriarekin, eta kasuak oraindik behar dituen datuak.

Irismena:CASES_READ
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
casederrigorrezkoaobject
factsderrigorrezkoaarray of object
countderrigorrezkoainteger
caseReadsderrigorrezkoaobject | 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

Erregistratu datu bat kasu batean, edo zuzendu. Hartatik zenbatutako epeak harekin batera mugitzen dira.

Irismena:CASES_WRITE
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
keyderrigorrezkoastringThe 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
valuederrigorrezkoastringThe 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)
Erantzunaren datuak (200)
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
outcomederrigorrezkoa"recorded" | "corrected" | "unchanged"recorded: a new fact; corrected: a new value replaced the old one; unchanged: it already held this value
factderrigorrezkoaobject
movedDeadlinesderrigorrezkoaarray of objectOpen deadlines counted from the fact that moved with the correction, due days before and after
urlderrigorrezkoastringWhere 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

Zerrendatu kasu baten alderdiak eta kasuak eskaintzen dituen rolak.

Irismena:CASES_READ
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
casederrigorrezkoaobject
partiesderrigorrezkoaarray of object
countderrigorrezkoainteger
rolesderrigorrezkoaarray 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

Gehitu alderdi bat kasu bati, haren rol batean.

Irismena:CASES_WRITE
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
roleKeyderrigorrezkoastringThe role the party has in the case, as one of the roles parties_list returns (e.g. "landlord")
partyTypederrigorrezkoa"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
namederrigorrezkoastringThe 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
Erantzunaren datuak (201)
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
partyderrigorrezkoaobject
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

Aldatu kasu bateko alderdi baten datuak.

Irismena:CASES_WRITE
Bide-parametroak
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
partyIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
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
Erantzunaren datuak (200)
EremuaMotaDeskribapena
caseIdderrigorrezkoastring
partyderrigorrezkoaobject
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)"

Eragiketak

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

Lortu Prefer edo Idempotency-Key bidez bidalitako eskaera baten egoera eta emaitza.

Bide-parametroak
EremuaMotaDeskribapena
operationIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastringop_…
objectderrigorrezkoa"operation"
operationIdderrigorrezkoastringThe REST operation that was called, e.g. createRedlines
statusderrigorrezkoa"running" | "awaiting_approval" | "succeeded" | "failed"
livemodederrigorrezkoaboolean
idempotencyKeystring | null
resultUrlderrigorrezkoastringWhere to poll: /api/v1/operations/{id}
createdAtderrigorrezkoastring (date-time)
completedAtderrigorrezkoastring (date-time) | null
expiresAtderrigorrezkoastring (date-time)
httpStatusderrigorrezkoainteger | null
resultderrigorrezkoaanyThe data of the successful call
metaobject
errorderrigorrezkoaobject | null
curl
curl "https://attorly.ai/api/v1/operations/op_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Webhookak

GET/api/v1/webhook-endpointslistWebhookEndpoints

Zerrendatu gakoaren erakundeko eta moduko webhook amaiera-puntuak.

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

Sortu webhook amaiera-puntu bat. Erantzunak haren sinadura-sekretua dauka, behin bakarrik erakusten dena.

Eskaeraren gorputza
EremuaMotaDeskribapena
urlderrigorrezkoastring (uri)HTTPS URL that receives the events
descriptionstring
enabledEventsderrigorrezkoaarray 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.
Erantzunaren datuak (201)
EremuaMotaDeskribapena
idderrigorrezkoastringwe_…
objectderrigorrezkoa"webhook_endpoint"
urlderrigorrezkoastring
descriptionstring | null
enabledEventsderrigorrezkoaarray of string
statusderrigorrezkoa"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodederrigorrezkoaboolean
includeSnapshotsderrigorrezkoaboolean
apiVersionderrigorrezkoastring
failingSincestring (date-time) | null
createdAtderrigorrezkoastring (date-time)
updatedAtderrigorrezkoastring (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

Lortu webhook amaiera-puntu bat.

Bide-parametroak
EremuaMotaDeskribapena
endpointIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastringwe_…
objectderrigorrezkoa"webhook_endpoint"
urlderrigorrezkoastring
descriptionstring | null
enabledEventsderrigorrezkoaarray of string
statusderrigorrezkoa"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodederrigorrezkoaboolean
includeSnapshotsderrigorrezkoaboolean
apiVersionderrigorrezkoastring
failingSincestring (date-time) | null
createdAtderrigorrezkoastring (date-time)
updatedAtderrigorrezkoastring (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

Aldatu amaiera-puntu baten URLa, gertaerak edo argazkiak, edo desgaitu eta gaitu.

Bide-parametroak
EremuaMotaDeskribapena
endpointIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastringwe_…
objectderrigorrezkoa"webhook_endpoint"
urlderrigorrezkoastring
descriptionstring | null
enabledEventsderrigorrezkoaarray of string
statusderrigorrezkoa"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodederrigorrezkoaboolean
includeSnapshotsderrigorrezkoaboolean
apiVersionderrigorrezkoastring
failingSincestring (date-time) | null
createdAtderrigorrezkoastring (date-time)
updatedAtderrigorrezkoastring (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

Ezabatu webhook amaiera-puntu bat eta haren bidalketa-historia.

Bide-parametroak
EremuaMotaDeskribapena
endpointIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastring
objectderrigorrezkoa"webhook_endpoint"
deletedderrigorrezkoatrue
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

Ordeztu sinadura-sekretua. Zaharrak 24 orduz jarraitzen du sinatzen.

Bide-parametroak
EremuaMotaDeskribapena
endpointIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastringwe_…
objectderrigorrezkoa"webhook_endpoint"
urlderrigorrezkoastring
descriptionstring | null
enabledEventsderrigorrezkoaarray of string
statusderrigorrezkoa"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodederrigorrezkoaboolean
includeSnapshotsderrigorrezkoaboolean
apiVersionderrigorrezkoastring
failingSincestring (date-time) | null
createdAtderrigorrezkoastring (date-time)
updatedAtderrigorrezkoastring (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

Bidali webhook_endpoint.test gertaera bat amaiera-puntu honi soilik.

Bide-parametroak
EremuaMotaDeskribapena
endpointIdderrigorrezkoastring
Erantzunaren datuak (202)
EremuaMotaDeskribapena
eventIdderrigorrezkoastring
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

Zerrendatu amaiera-puntu baten bidalketak, berrienak lehenik, haien saiakerekin eta emaitzarekin.

Bide-parametroak
EremuaMotaDeskribapena
endpointIdderrigorrezkoastring
Kontsulta-parametroak
EremuaMotaDeskribapena
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"

Gertaerak

GET/api/v1/eventslistEvents

Zerrendatu azken 30 egunetako gertaerak, berrienak lehenik.

Kontsulta-parametroak
EremuaMotaDeskribapena
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

Lortu gertaera bat webhook amaiera-puntuek jasotzen duten bezala.

Bide-parametroak
EremuaMotaDeskribapena
eventIdderrigorrezkoastring
Erantzunaren datuak (200)
EremuaMotaDeskribapena
idderrigorrezkoastringevt_… — also sent as the webhook-id header; deduplicate on it
objectderrigorrezkoa"event"
typederrigorrezkoa"analysis.completed" | "analysis.failed" | "redlines.generated" | "due_diligence.report.completed" | "operation.succeeded" | "operation.failed" | …
apiVersionderrigorrezkoastring
createdAtderrigorrezkoastring (date-time)
livemodederrigorrezkoaboolean
dataderrigorrezkoaobject
curl
curl "https://attorly.ai/api/v1/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/events/{eventId}/redeliveriesredeliverEvent

Bidali gertaera bat berriro, amaiera-puntu bati edo hartara harpidetutako amaiera-puntu guztiei.

Bide-parametroak
EremuaMotaDeskribapena
eventIdderrigorrezkoastring
Eskaeraren gorputza
EremuaMotaDeskribapena
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
Erantzunaren datuak (202)
EremuaMotaDeskribapena
eventIdderrigorrezkoastring
deliveriesScheduledderrigorrezkoainteger
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"
}'

Kontua, erabilera eta erregistroak

GET/api/v1/organizationgetOrganization

Gakoaren erakundea: plana, AA kredituak, jurisdikzio lehenetsia eta gakoak egin dezakeena.

Erantzunaren datuak (200)
EremuaMotaDeskribapena
organizationderrigorrezkoaobject
userderrigorrezkoaobject
planderrigorrezkoastringSTANDARD, PRO or ENTERPRISE
billingderrigorrezkoaobject
defaultJurisdictionderrigorrezkoastring | nullISO 3166-1 alpha-2 country used when a document names no governing law
credentialderrigorrezkoaobject
appUrlderrigorrezkoastring
curl
curl "https://attorly.ai/api/v1/organization" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/usagegetUsage

Eskaerak eguneko, gakoko eta eragiketako, errore-kopuruekin, REST eta MCP bidez.

Kontsulta-parametroak
EremuaMotaDeskribapena
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

Zerrendatu erakundearen azken 30 egunetako API eskaerak, berrienak lehenik.

Kontsulta-parametroak
EremuaMotaDeskribapena
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

Nork deitu zion zeri, noiz eta zein gakorekin. Erakundeko jabe eta administratzaileentzat.

Kontsulta-parametroak
EremuaMotaDeskribapena
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

Ezabatu erakundearen proba moduko objektu, gertaera eta eragiketa guztiak. Proba-gakoetarako soilik.

Erantzunaren datuak (200)
EremuaMotaDeskribapena
objectderrigorrezkoa"test_data_purge"
deletedderrigorrezkoaobject
curl
curl -X DELETE "https://attorly.ai/api/v1/test-data" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"