Ana içeriğe geç

Geliştiriciler

REST API dokümantasyonu

Attorly’nin hukuki yapay zekâsı için HTTPS üzerinden JSON kullanan bir API. MCP sunucusuyla aynı işlemleri, aynı anahtarlar, kapsamlar, sınırlar ve faturalandırmayla çalıştırır.

Hızlı başlangıç

Dört adımda bir sözleşme yükleyin ve analiz edin.

  1. 1. Bir anahtar oluşturun

    Ayarlar › Geliştiriciler’de bir anahtar oluşturun ve REST API’yi seçin. Aynı anahtar MCP sunucusu için de çalışır. Onu bir ortam değişkeninde tutun:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Bir belge yükleyin

    Dosyayı multipart/form-data olarak gönderin. Yanıttaki data.id belgenin kimliğidir. analyze=false, belgeyi arka plan analizini başlatmadan saklar, çünkü sonraki adım zaten bir analiz çalıştırır.

    bash
    curl -X POST https://attorly.ai/api/v1/documents \
      -H "Authorization: Bearer $ATTORLY_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -F "[email protected]" \
      -F "type=NDA" \
      -F "analyze=false"
  3. 3. Analiz edin

    Prefer: wait=30, sonuç için en fazla 30 saniye bekler. Tamamlanan bir analiz, sonuç data içinde olacak şekilde 200 ile döner. Daha uzun sürerse işleme işaret eden bir Location başlığıyla 202 Accepted alırsınız.

    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. Sonucu alın

    İşlemin durumu succeeded veya failed olana kadar sorgulayın. Analiz result içindedir. Retry-After, sorgular arasında kaç saniye bekleneceğini söyler.

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

Kimlik doğrulama

Kimlik bilgisini Authorization başlığında Bearer token olarak gönderin. Ayarlar › Geliştiriciler’deki anahtarlar lbmcp_ ile başlar ve Pro ile Enterprise planlarında hem REST API hem de MCP sunucusu için çalışır. Enterprise kuruluş anahtarları atly_ ile başlar (kısıtlı anahtarlar için atly_rk_, test modu için atly_test_); eski lb_ anahtarları çalışmaya devam eder. Bir kişi adına hareket eden uygulamalar OAuth kullanır.

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

Kapsamlar

Her uç nokta yanında listelenen kapsamları gerektirir. Bunlara sahip olmayan bir anahtar 403 insufficient_scope alır ve hatadaki requiredScopes, çağrının gerektirdiği her kapsamı listeler. Kuruluş API anahtarları ve OAuth bu kapsam adlarını kullanır:

KapsamKuruluş API anahtarı kapsamı
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

Hatalar

Her hata aynı biçimdedir: üzerinde dallanılacak kararlı bir kod, insanlar için bir mesaj ve desteğe iletilecek bir requestId.

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

Her kod, ne yapılacağıyla birlikte şurada açıklanmıştır: hata kodları sayfası

Sürümleme

API tarihe göre sürümlenir. Bir istek için sürüm seçmek üzere Attorly-Version gönderin; göndermezseniz istek, anahtarının oluşturulduğu sürümü kullanır (sürümlemeden önce oluşturulan anahtarlar 2026-10-01 kullanır). Her yanıt hangi sürümün cevap verdiğini söyler. Geriye dönük uyumsuz değişiklikler yalnızca yeni bir sürümle gelir ve değişiklik günlüğü bunları listeler.

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

Idempotency (tekrar güvenliği)

POST, PATCH ve DELETE isteklerinde bir Idempotency-Key başlığı gönderin, örneğin bir UUID. Aynı anahtar ve aynı istekle yapılan bir yeniden deneme, Idempotent-Replayed: true ile ilk yanıtı geri alır ve iş yeniden çalıştırılmaz veya faturalandırılmaz. Farklı bir istek için yeniden kullanılan bir anahtar 422 idempotency_key_reused alır; hâlâ çalışan bir istek ise 409 veya uzun süren bir çağrı için aynı işlemi alır. Sunucu hataları saklanmaz, bu yüzden yeniden denemeleri tekrar çalışır. Anahtarlar 24 saat saklanır.

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

Uzun süren istekler

2026-11-01 sürümünden itibaren tam analizler, değişiklik önerileri, müzakere playbook’ları, iş akışları, durum tespiti raporları ve yapay zekâ taslakları hemen bir işlemle 202 Accepted yanıtı verir. Sonuç için önce en fazla 30 saniye (en çok 60) beklemek üzere Prefer: wait=30 gönderin veya herhangi bir yazma işleminde 202 istemek için Prefer: respond-async gönderin. Durum succeeded veya failed olana kadar Location’ı sorgulayın ya da operation.succeeded’e abone olun. Sonuçlar 24 saat saklanır. Kuruluş başına aynı anda en fazla 5 uzun süren yapay zekâ işlemi çalışır; fazlası 429 concurrency_limit_exceeded alır.

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

Sayfalama

Listeler { object: "list", data, hasMore, nextCursor } döndürür ve limit (1 ila 100, varsayılan 20) ile cursor alır. Sonraki sayfayı almak için nextCursor’ı cursor olarak gönderin. Son sayfada nextCursor null’dır. Yeni öğeler eklenirken imleçler geçerli kalır.

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…

Hız sınırları

Bir istek birkaç pencereye karşı sayılır: anahtarın saatlik sınırı, kişi başına dakikada 300, kuruluş başına dakikada 600, okumalar, yazmalar ve yapay zekâ çağrıları için anahtar başına dakikalık bir sınır ve her işlemin kendi sınırı. REST ve MCP aynı sayaçları paylaşır. RateLimit-Policy ve RateLimit başlıkları her pencereyi gösterir; X-RateLimit-* tükenmeye en yakın olanı gösterir. Bir sınırı aşarsanız Retry-After ile 429 alırsınız.

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

Webhook’lar

Sorgulama yapmak yerine işlerin ne zaman bittiğinden haberdar olmak için POST /api/v1/webhook-endpoints ile bir uç nokta oluşturun. Attorly bir JSON olayıyla bir POST gönderir ve bunu Standard Webhooks uyarınca uç noktanın whsec_ gizli anahtarıyla imzalar. Gövdeye güvenmeden önce imzayı doğrulayın, 15 saniye içinde 2xx ile yanıt verin ve webhook-id üzerinden tekilleştirin: başarısız teslimatlar 72 saat boyunca yeniden denenir. Gizli anahtarı yenileyebilir, bir test olayı gönderebilir ve her teslimatı görebilirsiniz.

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

Test modu

Test anahtarları (atly_test_…) her uç noktaya ulaşır, ancak ayrı test verileri üzerinde çalışır ve sabit örnek sonuçlar döndürür: yapay zekâ çalışmaz ve kredi kullanılmaz. Bir test anahtarı canlı verileri asla görmez. Herhangi bir metin alanına __fail_credits__, __fail_consent__ veya __slow__ gibi bir sihirli değer koyarak o hatayı veya gecikmeyi alırsınız. DELETE /api/v1/test-data, bir test anahtarının oluşturduğu her şeyi temizler.

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

Bir Attorly kullanıcısı adına hareket eden uygulamalar OAuth 2.1 ile oturum açar: /.well-known/oauth-authorization-server adresinde keşif, dinamik istemci kaydı ve PKCE (S256) ile yetkilendirme kodu akışı. REST API için token almak üzere resource=https://attorly.ai/api/v1 isteyin; MCP sunucusu için verilen bir token burada reddedilir. Yenileme tokeni almak için offline_access ekleyin. Kişi kuruluşu seçer ve onay ekranında kapsamları daraltabilir.

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

Faturalandırma

Yapay zekâ çalıştıran işlemler, REST veya MCP üzerinden çağırın fark etmeksizin, Attorly uygulamasıyla aynı yapay zekâ kredilerinden, anahtar sahibinin veya kuruluşunun cüzdanından düşer. Krediler tükendiğinde 402 insufficient_credits alırsınız. Test modu çağrıları ücretsizdir.

Planlar

API, Pro ve Enterprise planlarına dâhildir. Anahtar sahibinin planı artık API erişimini içermiyorsa veya sahip kuruluştan ayrıldıysa istekler 403 ile reddedilir.

Başvuru

API’nin sunduğu OpenAPI belgesinden oluşturulan her işlem. Yollar https://attorly.ai adresine görelidir. Başarılı yanıtlar sonucu data içine sarar. Alan açıklamaları İngilizcedir.

Belgeler

GET/api/v1/documentslistDocuments

Anahtarın okuyabildiği saklanan belgeleri, en yeniden başlayarak listeler.

Kapsam:DOCUMENTS_READ
Sorgu parametreleri
AlanTürAçıklama
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

Bir belgeyi multipart/form-data olarak veya base64 içerikli ya da düz metinli JSON olarak yükler. analyze false olmadıkça arka planda analiz edilir.

Kapsam:DOCUMENTS_WRITEYapay zekâ kredisi kullanırDosya yüklemeyi kabul eder
İstek gövdesi
AlanTürAçıklama
filenamezorunlustringThe 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
Yanıt verisi (201)
AlanTürAçıklama
idzorunlustring
namezorunlustring
originalNamezorunlustring
typezorunlu"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
sizezorunluinteger
statuszorunlu"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
analysisQueuedzorunlubooleantrue when the background analysis was started
createdAtzorunlustringISO 8601 date-time
urlzorunlustringWhere 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

Anahtarın okuyabildiği belgelerin metninde anlama ve tam sözcüklere göre arama yapar.

Kapsam:DOCUMENTS_READ
Sorgu parametreleri
AlanTürAçıklama
queryzorunlustringWhat 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

Bir belgeyi, işleme durumunu ve en son analizini alır.

Kapsam:DOCUMENTS_READ
Yol parametreleri
AlanTürAçıklama
documentIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustring
namezorunlustring
originalNamezorunlustring
typezorunlu"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
mimeTypezorunlustring
sizezorunluinteger
statuszorunlu"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
archivedzorunluboolean
ownedByYouzorunluboolean
versionNumberzorunluinteger | 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.
createdAtzorunlustringISO 8601 date-time
updatedAtzorunlustringISO 8601 date-time
fileAvailablezorunlubooleanfalse when the stored file can no longer be read
governingLawRequiredzorunlubooleantrue when the analysis is held until a governing law is chosen for the document in Attorly
latestAnalysiszorunluobject | null
urlzorunlustringWhere 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

Sahibi olduğunuz bir belgenin silinmesini ister. Belge yalnızca Attorly’de onaylarsanız silinir.

Kapsam:DOCUMENTS_DELETE
Yol parametreleri
AlanTürAçıklama
documentIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustring
deletedzorunlubooleantrue only when the document is gone
statuszorunlu"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

Bir belgeyi veya satır içi metni analiz eder. mode, full (saklanan belge) veya quick’tir.

Kapsam:DOCUMENTS_ANALYZEDOCUMENTS_READYapay zekâ kredisi kullanır

Gövdenin mode alanı şunlardan birini seçer: mode: full, mode: quick.

İstek gövdesi
AlanTürAçıklama
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

Bir belgenin saklanan analizlerini, en yeniden başlayarak listeler.

Kapsam:DOCUMENTS_READ
Yol parametreleri
AlanTürAçıklama
documentIdzorunlustring
Sorgu parametreleri
AlanTürAçıklama
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

Saklanan bir belgeyi analiz eder.

Kapsam:DOCUMENTS_ANALYZEDOCUMENTS_READYapay zekâ kredisi kullanır
Yol parametreleri
AlanTürAçıklama
documentIdzorunlustring

Gövdenin mode alanı şunlardan birini seçer: mode: full, mode: quick.

İstek gövdesi
AlanTürAçıklama
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

Saklanan bir PDF veya DOCX belgesinin düz metnini çıkarır.

Kapsam:DOCUMENTS_READ
Yol parametreleri
AlanTürAçıklama
documentIdzorunlustring
Sorgu parametreleri
AlanTürAçıklama
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
Yanıt verisi (200)
AlanTürAçıklama
textzorunlustringThe document text from offset (untrusted content)
documentNamezorunlustring
documentTypezorunlustring
mimeTypezorunlustring | null
characterCountzorunluintegerCharacters in the whole document
wordCountzorunluintegerWords in the whole document
offsetzorunluinteger
nextOffsetzorunluinteger | nullPass as offset to read on; null when the text ends here
truncatedzorunlubooleantrue 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

Saklanan bir analizi alır: özet, risk, temel terimler, maddeler ve öneriler.

Kapsam:DOCUMENTS_READ
Yol parametreleri
AlanTürAçıklama
analysisIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustring
documentIdzorunlustring
documentNamezorunlustring
summaryzorunlustring | null
riskLevelzorunlu"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskScorezorunlunumber
keyTermszorunluarray of any
clauseszorunluarray of any
recommendationszorunluarray of any
modezorunlustringSINGLE or CONSENSUS
createdAtzorunlustringISO 8601 date-time
urlzorunlustring
curl
curl "https://attorly.ai/api/v1/analyses/your_analysisId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/comparisonscreateComparison

İki belgeyi veya metni satır satır karşılaştırır.

Kapsam:DOCUMENTS_READ
İstek gövdesi
AlanTürAçıklama
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
Yanıt verisi (200)
AlanTürAçıklama
differenceszorunluarray of object
summaryzorunluobject
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"
}'

Maddeler

GET/api/v1/clausessearchClauses

Madde kütüphanesinde arama yapar.

Kapsam:CLAUSES_READ
Sorgu parametreleri
AlanTürAçıklama
queryzorunlustring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
Yanıt verisi (200)
AlanTürAçıklama
clauseszorunluarray of object
countzorunluinteger
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

Bir maddenin riskini değerlendirir.

Kapsam:CLAUSES_READ
İstek gövdesi
AlanTürAçıklama
clauseTextzorunlustring
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" | …
Yanıt verisi (200)
AlanTürAçıklama
clauseTextstring
clauseTypezorunlustring
jurisdictionzorunlustring
overallRiskScorezorunlunumber
riskLevelzorunlu"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskFactorszorunluarray of object
recommendationszorunluarray 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

Bir maddeyi piyasa standardı dille karşılaştırır.

Kapsam:CLAUSES_READ
İstek gövdesi
AlanTürAçıklama
clauseTextzorunlustring
categoryzorunlu"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
Yanıt verisi (200)
AlanTürAçıklama
inputClausezorunlustring
categoryzorunlustring
marketStandardszorunluarray of object
comparisonzorunluobject
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

Bir maddeyi bir playbook’a göre kontrol eder.

Kapsam:CLAUSES_READ
İstek gövdesi
AlanTürAçıklama
clauseTextzorunlustring
playbookIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
playbookNamezorunlustring
compliantzorunluboolean
violationszorunluarray of string
warningszorunluarray of string
rulesCheckedzorunluinteger
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"
}'

Araştırma

POST/api/v1/research/searchessearchResearch

Lovdata, EUR-Lex ve CourtListener gibi hukuki kaynaklarda arama yapar.

Kapsam:RESEARCH_READYapay zekâ kredisi kullanır
İstek gövdesi
AlanTürAçıklama
queryzorunlustring
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
Yanıt verisi (200)
AlanTürAçıklama
queryzorunlustring
jurisdictionzorunlustring
resultszorunluarray of object
totalCountzorunluintegerResults 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

Bir kanunu atfına göre getirir.

Kapsam:RESEARCH_READYapay zekâ kredisi kullanır
Sorgu parametreleri
AlanTürAçıklama
citationzorunlustring
jurisdictionzorunlustringISO 3166-1 alpha-2 country code, or "EU"
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustring
titlezorunlustring
sourcezorunlustring
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"

Değişiklik önerileri

POST/api/v1/redlinescreateRedlines

Bir belge veya metin için değişiklik önerileri oluşturur.

Kapsam:REDLINES_GENERATEYapay zekâ kredisi kullanır
İstek gövdesi
AlanTürAçıklama
documentIdstring
contentstring
partyRolezorunlu"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
Yanıt verisi (200)
AlanTürAçıklama
changeszorunluarray of object
summaryobject
negotiationNotesarray of string
statisticszorunluobject
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

Bir belgedeki önerilen değişiklikleri kabul eder veya reddeder.

Kapsam:REDLINES_GENERATE
Yol parametreleri
AlanTürAçıklama
documentIdzorunlustring
İstek gövdesi
AlanTürAçıklama
changeszorunluarray of object
Yanıt verisi (200)
AlanTürAçıklama
acceptedzorunluinteger
rejectedzorunluinteger
messagezorunlustring
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"
    }
  ]
}'

Müzakereler

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

Bir müzakere pozisyonunu analiz eder.

Kapsam:NEGOTIATIONS_READYapay zekâ kredisi kullanır
İstek gövdesi
AlanTürAçıklama
documentIdstring
contentstring
partyRolezorunlu"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
Yanıt verisi (200)
AlanTürAçıklama
overallPositionzorunlustringFAVORABLE, BALANCED or UNFAVORABLE
positionszorunluarray 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

Bir stratejiden müzakere playbook’u oluşturur.

Kapsam:NEGOTIATIONS_READYapay zekâ kredisi kullanır
İstek gövdesi
AlanTürAçıklama
strategyzorunluobject
contextobject
Yanıt verisi (200)
AlanTürAçıklama
playbookzorunluarray of object
anticipatedObjectionszorunluarray of object
recommendationszorunluarray of string
summaryzorunluobject
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"
    ]
  }
}'

İş akışları

GET/api/v1/workflows/templateslistWorkflowTemplates

İş akışı şablonlarını listeler.

Kapsam:WORKFLOWS_EXECUTE
Sorgu parametreleri
AlanTürAçıklama
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

İş akışı yürütmelerini, en yeniden başlayarak, isteğe bağlı olarak tek bir proje veya durum için listeler.

Kapsam:WORKFLOWS_EXECUTE
Sorgu parametreleri
AlanTürAçıklama
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

Bir durum tespiti projesinde iş akışı başlatır.

Kapsam:WORKFLOWS_EXECUTEYapay zekâ kredisi kullanır
İstek gövdesi
AlanTürAçıklama
templateIdzorunlustring
projectIdzorunlustring
inputszorunluobject
optionsobject
Yanıt verisi (202)
AlanTürAçıklama
executionIdzorunlustring
templateIdzorunlustring
templateNamezorunlustring
statuszorunlustring
startedAtzorunlustringISO 8601 date-time
messagezorunlustring
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

Bir iş akışı yürütmesinin durumunu alır.

Kapsam:WORKFLOWS_EXECUTE
Yol parametreleri
AlanTürAçıklama
executionIdzorunlustring
Sorgu parametreleri
AlanTürAçıklama
includeStepsboolean
Yanıt verisi (200)
AlanTürAçıklama
executionIdzorunlustring
templateNamezorunlustring
statuszorunlustring
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"

Durum tespiti

GET/api/v1/due-diligence/projectslistDueDiligenceProjects

Durum tespiti projelerini, en yeniden başlayarak listeler.

Kapsam:DUE_DILIGENCE_FULL
Sorgu parametreleri
AlanTürAçıklama
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

Bir durum tespiti projesi oluşturur.

Kapsam:DUE_DILIGENCE_FULL
İstek gövdesi
AlanTürAçıklama
namezorunlustring
dealTypezorunlu"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
Yanıt verisi (201)
AlanTürAçıklama
projectIdzorunlustring
namezorunlustring
projectTypezorunlustring
statuszorunlustring
createdAtzorunlustringISO 8601 date-time
messagezorunlustring
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

Bir durum tespiti projesini belge ve bulgu sayılarıyla alır.

Kapsam:DUE_DILIGENCE_FULL
Yol parametreleri
AlanTürAçıklama
projectIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustring
namezorunlustring
descriptionzorunlustring | null
projectTypezorunlustring
statuszorunlustring
priorityzorunlustring
targetCompanyzorunlustring | null
dueDatezorunlustring | null
documentCountzorunluinteger
findingCountzorunluinteger
createdAtzorunlustringISO 8601 date-time
updatedAtzorunlustringISO 8601 date-time
completedAtzorunlustring | 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

Bir durum tespiti projesine belge ekler.

Kapsam:DUE_DILIGENCE_FULL
Yol parametreleri
AlanTürAçıklama
projectIdzorunlustring
İstek gövdesi
AlanTürAçıklama
documentIdszorunluarray of string
categorystring
Yanıt verisi (200)
AlanTürAçıklama
projectIdzorunlustring
documentsAddedzorunluinteger
totalDocumentszorunluinteger
categoryzorunlustring
messagezorunlustring
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

Bir durum tespiti projesinin bulgularını listeler.

Kapsam:DUE_DILIGENCE_FULL
Yol parametreleri
AlanTürAçıklama
projectIdzorunlustring
Sorgu parametreleri
AlanTürAçıklama
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
Yanıt verisi (200)
AlanTürAçıklama
projectIdzorunlustring
projectNamezorunlustring
findingszorunluarray of object
riskSummaryzorunluobjectNumber of findings per severity
totalFindingszorunluinteger
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

Bir durum tespiti raporu oluşturur.

Kapsam:DUE_DILIGENCE_FULL
Yol parametreleri
AlanTürAçıklama
projectIdzorunlustring
İstek gövdesi
AlanTürAçıklama
formatzorunlu"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
Yanıt verisi (201)
AlanTürAçıklama
reportIdzorunlustring
projectIdzorunlustring
projectNamestring
formatzorunlu"pdf" | "markdown"
statuszorunlustring
sectionsarray of string
documentCountinteger
findingCountinteger
markdownzorunlustring
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"
}'

Şablonlar ve taslaklar

GET/api/v1/templateslistTemplates

Belge şablonlarını listeler.

Kapsam:TEMPLATES_READ
Sorgu parametreleri
AlanTürAçıklama
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

Bir şablondan (mode template) veya yapay zekâ ile (mode ai) taslak oluşturur.

Kapsam:TEMPLATES_DRAFTYapay zekâ kredisi kullanır

Gövdenin mode alanı şunlardan birini seçer: mode: template, mode: ai.

İstek gövdesi
AlanTürAçıklama
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"
  }
}'

Dosyalar

GET/api/v1/caseslistCases

Dosyalarınızı, en son değişenden başlayarak listeler.

Kapsam:CASES_READ
Sorgu parametreleri
AlanTürAçıklama
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

Bir dosyanın zaman çizelgesini alır: her olay tarihi, kanıtı ve karşı tarafın pozisyonuyla birlikte.

Kapsam:CASES_READ
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
casezorunluobject
eventszorunluarray of objectIn date order
countzorunluinteger
needsReviewCountzorunluintegerEvents an AI added that no person has confirmed
deletionRequestedCountzorunluintegerEvents 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

Bir dosyanın zaman çizelgesine olay ekler.

Kapsam:CASES_WRITE
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
İstek gövdesi
AlanTürAçıklama
titlezorunlustringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenzorunluobjectWhen 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
Yanıt verisi (201)
AlanTürAçıklama
caseIdzorunlustring
eventzorunluobject
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

Bir dosyanın zaman çizelgesindeki bir olayı değiştirir veya yapay zekânın eklediği bir olayı onaylar.

Kapsam:CASES_WRITE
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
eventIdzorunlustring
İstek gövdesi
AlanTürAçıklama
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
Yanıt verisi (200)
AlanTürAçıklama
caseIdzorunlustring
eventzorunluobject
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

Bir dosyanın zaman çizelgesinden bir olayın silinmesini ister. Olay yalnızca sahibi Attorly’de onaylarsa silinir.

Kapsam:CASES_WRITE
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
eventIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
caseIdzorunlustring
idzorunlustring
deletedzorunlubooleantrue only when the event is gone
statuszorunlu"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

Bir dosyanın zaman çizelgesini PDF, Word, ODT, Excel veya PowerPoint dosyası olarak dışa aktarır.

Kapsam:CASES_READ
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
İstek gövdesi
AlanTürAçıklama
layoutzorunlu"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
formatzorunlu"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
Yanıt verisi (200)
AlanTürAçıklama
caseIdzorunlustring
layoutzorunlu"overview" | "chronology" | "numbered" | "visual"
formatzorunlu"pdf" | "docx" | "odt" | "xlsx" | "pptx"
localezorunlustringThe language the file is written in
eventCountzorunluintegerEvents in the file
exhibitCountzorunluintegerDocuments in the exhibit list (chronology and numbered layouts)
leftOutConfidentialzorunluintegerEvents left out because they are marked confidential
attachmentzorunluobject
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

Bir dosyanın sürelerini, en yakından başlayarak, her sürenin kime ait olduğu ve tamamlanıp tamamlanmadığı veya gecikip gecikmediğiyle listeler.

Kapsam:CASES_READ
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
Sorgu parametreleri
AlanTürAçıklama
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
Yanıt verisi (200)
AlanTürAçıklama
casezorunluobject
deadlineszorunluarray of objectSoonest first
countzorunluinteger
overdueCountzorunluinteger
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

Bir dosyaya, belirli bir tarihte veya kaydedilmiş bir olgudan itibaren sayılan bir süre ekler.

Kapsam:CASES_WRITE
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
İstek gövdesi
AlanTürAçıklama
titlezorunlustringWhat 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
Yanıt verisi (201)
AlanTürAçıklama
caseIdzorunlustring
deadlinezorunluobject
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

Bir dosyadaki bir süreyi değiştirir veya tamamlandı ya da yeniden açık olarak işaretler.

Kapsam:CASES_WRITE
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
deadlineIdzorunlustring
İstek gövdesi
AlanTürAçıklama
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
Yanıt verisi (200)
AlanTürAçıklama
caseIdzorunlustring
deadlinezorunluobject
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

Bir dosyada kaydedilen olguları kaynaklarıyla ve dosyanın hâlâ ihtiyaç duyduğu olgularla birlikte listeler.

Kapsam:CASES_READ
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
casezorunluobject
factszorunluarray of object
countzorunluinteger
caseReadszorunluobject | 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

Bir dosyaya bir olgu kaydeder veya düzeltir. Ondan itibaren sayılan süreler onunla birlikte kayar.

Kapsam:CASES_WRITE
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
İstek gövdesi
AlanTürAçıklama
keyzorunlustringThe 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
valuezorunlustringThe 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)
Yanıt verisi (200)
AlanTürAçıklama
caseIdzorunlustring
outcomezorunlu"recorded" | "corrected" | "unchanged"recorded: a new fact; corrected: a new value replaced the old one; unchanged: it already held this value
factzorunluobject
movedDeadlineszorunluarray of objectOpen deadlines counted from the fact that moved with the correction, due days before and after
urlzorunlustringWhere 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

Bir dosyanın taraflarını ve dosyanın sunduğu rolleri listeler.

Kapsam:CASES_READ
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
casezorunluobject
partieszorunluarray of object
countzorunluinteger
roleszorunluarray 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

Bir dosyaya, rollerinden birinde bir taraf ekler.

Kapsam:CASES_WRITE
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
İstek gövdesi
AlanTürAçıklama
roleKeyzorunlustringThe role the party has in the case, as one of the roles parties_list returns (e.g. "landlord")
partyTypezorunlu"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
namezorunlustringThe 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
Yanıt verisi (201)
AlanTürAçıklama
caseIdzorunlustring
partyzorunluobject
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

Bir dosyadaki bir tarafın bilgilerini değiştirir.

Kapsam:CASES_WRITE
Yol parametreleri
AlanTürAçıklama
caseIdzorunlustring
partyIdzorunlustring
İstek gövdesi
AlanTürAçıklama
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
Yanıt verisi (200)
AlanTürAçıklama
caseIdzorunlustring
partyzorunluobject
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)"

İşlemler

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

Prefer veya Idempotency-Key ile gönderilen bir isteğin durumunu ve sonucunu alır.

Yol parametreleri
AlanTürAçıklama
operationIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustringop_…
objectzorunlu"operation"
operationIdzorunlustringThe REST operation that was called, e.g. createRedlines
statuszorunlu"running" | "awaiting_approval" | "succeeded" | "failed"
livemodezorunluboolean
idempotencyKeystring | null
resultUrlzorunlustringWhere to poll: /api/v1/operations/{id}
createdAtzorunlustring (date-time)
completedAtzorunlustring (date-time) | null
expiresAtzorunlustring (date-time)
httpStatuszorunluinteger | null
resultzorunluanyThe data of the successful call
metaobject
errorzorunluobject | null
curl
curl "https://attorly.ai/api/v1/operations/op_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Webhook’lar

GET/api/v1/webhook-endpointslistWebhookEndpoints

Anahtarın kuruluşunun ve modunun webhook uç noktalarını listeler.

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

Bir webhook uç noktası oluşturur. Yanıt, yalnızca bir kez gösterilen imza gizli anahtarını içerir.

İstek gövdesi
AlanTürAçıklama
urlzorunlustring (uri)HTTPS URL that receives the events
descriptionstring
enabledEventszorunluarray 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.
Yanıt verisi (201)
AlanTürAçıklama
idzorunlustringwe_…
objectzorunlu"webhook_endpoint"
urlzorunlustring
descriptionstring | null
enabledEventszorunluarray of string
statuszorunlu"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodezorunluboolean
includeSnapshotszorunluboolean
apiVersionzorunlustring
failingSincestring (date-time) | null
createdAtzorunlustring (date-time)
updatedAtzorunlustring (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

Bir webhook uç noktasını alır.

Yol parametreleri
AlanTürAçıklama
endpointIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustringwe_…
objectzorunlu"webhook_endpoint"
urlzorunlustring
descriptionstring | null
enabledEventszorunluarray of string
statuszorunlu"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodezorunluboolean
includeSnapshotszorunluboolean
apiVersionzorunlustring
failingSincestring (date-time) | null
createdAtzorunlustring (date-time)
updatedAtzorunlustring (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

Bir uç noktanın URL’sini, olaylarını veya anlık görüntülerini değiştirir ya da uç noktayı devre dışı bırakır ve etkinleştirir.

Yol parametreleri
AlanTürAçıklama
endpointIdzorunlustring
İstek gövdesi
AlanTürAçıklama
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustringwe_…
objectzorunlu"webhook_endpoint"
urlzorunlustring
descriptionstring | null
enabledEventszorunluarray of string
statuszorunlu"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodezorunluboolean
includeSnapshotszorunluboolean
apiVersionzorunlustring
failingSincestring (date-time) | null
createdAtzorunlustring (date-time)
updatedAtzorunlustring (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

Bir webhook uç noktasını ve teslimat geçmişini siler.

Yol parametreleri
AlanTürAçıklama
endpointIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustring
objectzorunlu"webhook_endpoint"
deletedzorunlutrue
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

İmza gizli anahtarını değiştirir. Eskisi 24 saat daha imzalamaya devam eder.

Yol parametreleri
AlanTürAçıklama
endpointIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustringwe_…
objectzorunlu"webhook_endpoint"
urlzorunlustring
descriptionstring | null
enabledEventszorunluarray of string
statuszorunlu"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodezorunluboolean
includeSnapshotszorunluboolean
apiVersionzorunlustring
failingSincestring (date-time) | null
createdAtzorunlustring (date-time)
updatedAtzorunlustring (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

Yalnızca bu uç noktaya bir webhook_endpoint.test olayı gönderir.

Yol parametreleri
AlanTürAçıklama
endpointIdzorunlustring
Yanıt verisi (202)
AlanTürAçıklama
eventIdzorunlustring
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

Bir uç noktanın teslimatlarını, en yeniden başlayarak, denemeleri ve sonucuyla listeler.

Yol parametreleri
AlanTürAçıklama
endpointIdzorunlustring
Sorgu parametreleri
AlanTürAçıklama
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"

Olaylar

GET/api/v1/eventslistEvents

Son 30 günün olaylarını, en yeniden başlayarak listeler.

Sorgu parametreleri
AlanTürAçıklama
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

Bir olayı, webhook uç noktalarının aldığı şekliyle alır.

Yol parametreleri
AlanTürAçıklama
eventIdzorunlustring
Yanıt verisi (200)
AlanTürAçıklama
idzorunlustringevt_… — also sent as the webhook-id header; deduplicate on it
objectzorunlu"event"
typezorunlu"analysis.completed" | "analysis.failed" | "redlines.generated" | "due_diligence.report.completed" | "operation.succeeded" | "operation.failed" | …
apiVersionzorunlustring
createdAtzorunlustring (date-time)
livemodezorunluboolean
datazorunluobject
curl
curl "https://attorly.ai/api/v1/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/events/{eventId}/redeliveriesredeliverEvent

Bir olayı, tek bir uç noktaya veya ona abone her uç noktaya yeniden gönderir.

Yol parametreleri
AlanTürAçıklama
eventIdzorunlustring
İstek gövdesi
AlanTürAçıklama
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
Yanıt verisi (202)
AlanTürAçıklama
eventIdzorunlustring
deliveriesScheduledzorunluinteger
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"
}'

Hesap, kullanım ve günlükler

GET/api/v1/organizationgetOrganization

Anahtarın kuruluşu: plan, yapay zekâ kredileri, varsayılan hukuk düzeni ve anahtarın neler yapabileceği.

Yanıt verisi (200)
AlanTürAçıklama
organizationzorunluobject
userzorunluobject
planzorunlustringSTANDARD, PRO or ENTERPRISE
billingzorunluobject
defaultJurisdictionzorunlustring | nullISO 3166-1 alpha-2 country used when a document names no governing law
credentialzorunluobject
appUrlzorunlustring
curl
curl "https://attorly.ai/api/v1/organization" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/usagegetUsage

REST ve MCP üzerinden günlük, anahtar ve işlem başına istekler, hata sayılarıyla birlikte.

Sorgu parametreleri
AlanTürAçıklama
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

Kuruluşun son 30 gündeki API isteklerini, en yeniden başlayarak listeler.

Sorgu parametreleri
AlanTürAçıklama
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

Kim neyi ne zaman ve hangi anahtarla çağırdı. Kuruluş sahipleri ve yöneticileri için.

Sorgu parametreleri
AlanTürAçıklama
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

Kuruluşun her test modu nesnesini, olayını ve işlemini siler. Yalnızca test anahtarları.

Yanıt verisi (200)
AlanTürAçıklama
objectzorunlu"test_data_purge"
deletedzorunluobject
curl
curl -X DELETE "https://attorly.ai/api/v1/test-data" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"